diff options
Diffstat (limited to 'src/vcl/vcl_sapi.c')
-rw-r--r-- | src/vcl/vcl_sapi.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vcl/vcl_sapi.c b/src/vcl/vcl_sapi.c index 1bab7eaba13..5258722a484 100644 --- a/src/vcl/vcl_sapi.c +++ b/src/vcl/vcl_sapi.c @@ -71,10 +71,6 @@ vcl_api_attach_reply_handler (app_sapi_attach_reply_msg_t * mp, int *fds) SSVM_SEGMENT_MEMFD, fds[n_fds_used++])) goto failed; - vcl_segment_attach_mq (vcl_vpp_worker_segment_handle (0), mp->vpp_ctrl_mq, - mp->vpp_ctrl_mq_thread, &wrk->ctrl_mq); - vcm->ctrl_mq = wrk->ctrl_mq; - if (mp->fd_flags & SESSION_FD_F_MEMFD_SEGMENT) { segment_name = format (0, "memfd-%ld%c", segment_handle, 0); @@ -93,6 +89,12 @@ vcl_api_attach_reply_handler (app_sapi_attach_reply_msg_t * mp, int *fds) vcl_mq_epoll_add_evfd (wrk, wrk->app_event_queue); } + vcl_segment_discover_mqs (vcl_vpp_worker_segment_handle (0), + fds + n_fds_used, mp->n_fds - n_fds_used); + vcl_segment_attach_mq (vcl_vpp_worker_segment_handle (0), mp->vpp_ctrl_mq, + mp->vpp_ctrl_mq_thread, &wrk->ctrl_mq); + vcm->ctrl_mq = wrk->ctrl_mq; + vcm->app_index = mp->app_index; return 0; |