aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-29 22:45:04 -0700
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-10-03 10:08:53 +0000
commit2d986799b531e0540e50d4546491c67bb91e0ed4 (patch)
tree417640357869e7a197495c52e2da700791bbc0ac /src
parent432fe38b61831a24f34fc6c16d188dfbfe13b90f (diff)
vcl: initialize ctrl_mq in workers
Type: fix Change-Id: I1b9c8b0f9292f039b941e18d8aca5d734d5f1e77 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit 22ba3303d8e1ead33a4d032a532e38d255461c8a)
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vcl_bapi.c3
-rw-r--r--src/vcl/vcl_private.h3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/vcl/vcl_bapi.c b/src/vcl/vcl_bapi.c
index cdfc2869edc..2091a71abfb 100644
--- a/src/vcl/vcl_bapi.c
+++ b/src/vcl/vcl_bapi.c
@@ -126,7 +126,7 @@ vl_api_app_attach_reply_t_handler (vl_api_app_attach_reply_t * mp)
ctrl_mq = uword_to_pointer (mp->vpp_ctrl_mq, svm_msg_q_t *);
vec_validate (wrk->vpp_event_queues, mp->vpp_ctrl_mq_thread);
wrk->vpp_event_queues[mp->vpp_ctrl_mq_thread] = ctrl_mq;
- wrk->ctrl_mq = ctrl_mq;
+ vcm->ctrl_mq = wrk->ctrl_mq = ctrl_mq;
segment_handle = clib_net_to_host_u64 (mp->segment_handle);
if (segment_handle == VCL_INVALID_SEGMENT_HANDLE)
{
@@ -205,6 +205,7 @@ vl_api_app_worker_add_del_reply_t_handler (vl_api_app_worker_add_del_reply_t *
wrk->vpp_wrk_index = clib_net_to_host_u32 (mp->wrk_index);
wrk->app_event_queue = uword_to_pointer (mp->app_event_queue_address,
svm_msg_q_t *);
+ wrk->ctrl_mq = vcm->ctrl_mq;
segment_handle = clib_net_to_host_u64 (mp->segment_handle);
if (segment_handle == VCL_INVALID_SEGMENT_HANDLE)
diff --git a/src/vcl/vcl_private.h b/src/vcl/vcl_private.h
index cd2544c2559..7746862da60 100644
--- a/src/vcl/vcl_private.h
+++ b/src/vcl/vcl_private.h
@@ -333,6 +333,9 @@ typedef struct vppcom_main_t_
/** Mapped segments table */
uword *segment_table;
+ /** Control mq obtained from attach */
+ svm_msg_q_t *ctrl_mq;
+
fifo_segment_main_t segment_main;
#ifdef VCL_ELOG