diff options
Diffstat (limited to 'src/vnet/session/session_api.c')
-rw-r--r-- | src/vnet/session/session_api.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c index d080ae44925..a8f92c3cc00 100644 --- a/src/vnet/session/session_api.c +++ b/src/vnet/session/session_api.c @@ -147,8 +147,8 @@ mq_send_session_accepted_cb (session_t * s) mp = (session_accepted_msg_t *) evt->data; clib_memset (mp, 0, sizeof (*mp)); mp->context = app->app_index; - mp->server_rx_fifo = pointer_to_uword (s->rx_fifo); - mp->server_tx_fifo = pointer_to_uword (s->tx_fifo); + mp->server_rx_fifo = pointer_to_uword (s->rx_fifo->shr); + mp->server_tx_fifo = pointer_to_uword (s->tx_fifo->shr); mp->segment_handle = session_segment_handle (s); mp->flags = s->flags; @@ -221,9 +221,9 @@ mq_notify_close_subscribers (u32 app_index, session_handle_t sh, if (!app) return; - for (i = 0; i < f->n_subscribers; i++) + for (i = 0; i < f->shr->n_subscribers; i++) { - if (!(app_wrk = application_get_worker (app, f->subscribers[i]))) + if (!(app_wrk = application_get_worker (app, f->shr->subscribers[i]))) continue; mq_send_session_close_evt (app_wrk, sh, SESSION_CTRL_EVT_DISCONNECTED); } @@ -305,8 +305,8 @@ mq_send_session_connected_cb (u32 app_wrk_index, u32 api_context, session_get_endpoint (s, &mp->lcl, 1 /* is_lcl */ ); - mp->server_rx_fifo = pointer_to_uword (s->rx_fifo); - mp->server_tx_fifo = pointer_to_uword (s->tx_fifo); + mp->server_rx_fifo = pointer_to_uword (s->rx_fifo->shr); + mp->server_tx_fifo = pointer_to_uword (s->tx_fifo->shr); mp->segment_handle = session_segment_handle (s); } else @@ -320,12 +320,12 @@ mq_send_session_connected_cb (u32 app_wrk_index, u32 api_context, mp->lcl.is_ip4 = cct->c_is_ip4; vpp_mq = session_main_get_vpp_event_queue (s->thread_index); mp->vpp_event_queue_address = pointer_to_uword (vpp_mq); - mp->server_rx_fifo = pointer_to_uword (s->rx_fifo); - mp->server_tx_fifo = pointer_to_uword (s->tx_fifo); + mp->server_rx_fifo = pointer_to_uword (s->rx_fifo->shr); + mp->server_tx_fifo = pointer_to_uword (s->tx_fifo->shr); mp->segment_handle = session_segment_handle (s); ss = ct_session_get_peer (s); - mp->ct_rx_fifo = pointer_to_uword (ss->tx_fifo); - mp->ct_tx_fifo = pointer_to_uword (ss->rx_fifo); + mp->ct_rx_fifo = pointer_to_uword (ss->tx_fifo->shr); + mp->ct_tx_fifo = pointer_to_uword (ss->rx_fifo->shr); mp->ct_segment_handle = session_segment_handle (ss); } @@ -386,8 +386,9 @@ mq_send_session_bound_cb (u32 app_wrk_index, u32 api_context, if (session_transport_service_type (ls) == TRANSPORT_SERVICE_CL) { - mp->rx_fifo = pointer_to_uword (ls->rx_fifo); - mp->tx_fifo = pointer_to_uword (ls->tx_fifo); + mp->rx_fifo = pointer_to_uword (ls->rx_fifo->shr); + mp->tx_fifo = pointer_to_uword (ls->tx_fifo->shr); + mp->segment_handle = session_segment_handle (ls); } done: @@ -443,6 +444,7 @@ mq_send_session_migrate_cb (session_t * s, session_handle_t new_sh) mp->vpp_thread_index = session_thread_from_handle (new_sh); vpp_evt_q = session_main_get_vpp_event_queue (mp->vpp_thread_index); mp->vpp_evt_q = pointer_to_uword (vpp_evt_q); + mp->segment_handle = session_segment_handle (s); svm_msg_q_add_and_unlock (app_mq, msg); } |