vcl: basic support for apps that fork
- intercept fork and register a new worker with vpp
- share sessions between parent and forked child
- keep binary api state per worker
Change-Id: Ib177517d661724fa042bd2d98d18e777056352a2
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vcl/vcl_debug.h b/src/vcl/vcl_debug.h
index 48ff21a..191d400 100644
--- a/src/vcl/vcl_debug.h
+++ b/src/vcl/vcl_debug.h
@@ -23,15 +23,18 @@
#define VDBG(_lvl, _fmt, _args...) \
if (VCL_DBG_ON && vcm->debug > _lvl) \
- clib_warning ("vcl<%d:%d>: " _fmt, vcm->current_pid, \
+ clib_warning ("vcl<%d:%d>: " _fmt, \
+ vcm->workers[__vcl_worker_index].current_pid, \
__vcl_worker_index, ##_args)
#define VWRN(_fmt, _args...) \
-clib_warning ("vcl<%d:%d>: " _fmt, vcm->current_pid, \
- __vcl_worker_index, ##_args)
+ clib_warning ("vcl<%d:%d>: " _fmt, \
+ vcm->workers[__vcl_worker_index].current_pid, \
+ __vcl_worker_index, ##_args)
#define VERR(_fmt, _args...) \
- clib_warning ("vcl<%d:%d>: ERROR " _fmt, vcm->current_pid, \
+ clib_warning ("vcl<%d:%d>: ERROR " _fmt, \
+ vcm->workers[__vcl_worker_index].current_pid, \
__vcl_worker_index, ##_args)
#define foreach_vcl_dbg_evt \