From b0761fd464936870a65f8d49eca8daa8215efdf2 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 18 Jun 2024 22:00:41 -0700 Subject: session svm: track session indices in private struct Type: improvement Signed-off-by: Florin Coras Change-Id: I898baf3e2a7586124f4678eaeaa4516db7186f8f --- src/vcl/vppcom.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/vcl/vppcom.c') diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c index e1eba2993ca..19d58c349b7 100644 --- a/src/vcl/vppcom.c +++ b/src/vcl/vppcom.c @@ -659,8 +659,7 @@ vcl_session_migrated_handler (vcl_worker_t * wrk, void *data) /* Generate new tx event if we have outstanding data */ if (svm_fifo_has_event (s->tx_fifo)) - app_send_io_evt_to_vpp (s->vpp_evt_q, - s->tx_fifo->shr->master_session_index, + app_send_io_evt_to_vpp (s->vpp_evt_q, s->tx_fifo->vpp_session_index, SESSION_IO_EVT_TX, SVM_Q_WAIT); VDBG (0, "Migrated 0x%lx to thread %u 0x%lx", mp->handle, @@ -2201,8 +2200,7 @@ read_again: if (PREDICT_FALSE (svm_fifo_needs_deq_ntf (rx_fifo, n_read))) { svm_fifo_clear_deq_ntf (rx_fifo); - app_send_io_evt_to_vpp (s->vpp_evt_q, - s->rx_fifo->shr->master_session_index, + app_send_io_evt_to_vpp (s->vpp_evt_q, s->rx_fifo->vpp_session_index, SESSION_IO_EVT_RX, SVM_Q_WAIT); } @@ -2407,8 +2405,8 @@ vppcom_session_write_inline (vcl_worker_t *wrk, vcl_session_t *s, void *buf, } if (svm_fifo_set_event (s->tx_fifo)) - app_send_io_evt_to_vpp ( - s->vpp_evt_q, s->tx_fifo->shr->master_session_index, et, SVM_Q_WAIT); + app_send_io_evt_to_vpp (s->vpp_evt_q, s->tx_fifo->vpp_session_index, et, + SVM_Q_WAIT); /* The underlying fifo segment can run out of memory */ if (PREDICT_FALSE (n_write < 0)) -- cgit 1.2.3-korg