diff options
author | Florin Coras <fcoras@cisco.com> | 2018-11-13 15:52:38 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-11-18 19:46:38 +0000 |
commit | 053a0e44edb21713e0825f9c09ba4af12e686b38 (patch) | |
tree | 950e303daf1b367eab26cc823c0efc23ae170b1d /src/vcl/vcl_private.h | |
parent | 0c4fec0134f32bc913299b37d048a99293b1a851 (diff) |
vcl/session: apps with process workers
Allow apps to register child processes as app workers. In particular,
on fork vcl now registers the child process with vpp as a new worker.
Change-Id: I52a65fbc3292962b1f6e1fe0f6153f739e6e0d4a
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vcl_private.h')
-rw-r--r-- | src/vcl/vcl_private.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h index d1a40b933a7..7bb0dbc5a66 100644 --- a/src/vcl/vcl_private.h +++ b/src/vcl/vcl_private.h @@ -219,8 +219,12 @@ typedef struct vcl_worker_ /* Session pool */ vcl_session_t *sessions; + /** Worker/thread index in current process */ u32 wrk_index; + /** Worker index in vpp*/ + u32 vpp_wrk_index; + /** Message queues epoll fd. Initialized only if using mqs with eventfds */ int mqs_epfd; @@ -272,15 +276,26 @@ typedef struct vppcom_main_t_ u32 debug; pthread_t main_cpu; - /** VPP binary api input queue */ - svm_queue_t *vl_input_queue; + /** Main process pid */ + pid_t main_pid; + + /** Current pid, may be different from main_pid if forked child */ + pid_t current_pid; + + /** Main process api client index. It's used by vpp to identify the app */ + u32 main_api_client_index; /** API client handle */ u32 my_client_index; + /** VPP binary api input queue */ + svm_queue_t *vl_input_queue; + /** State of the connection, shared between msg RX thread and main thread */ volatile app_state_t app_state; + u8 *app_name; + /** VCL configuration */ vppcom_cfg_t cfg; |