aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2023-03-10 10:22:21 -0800
committerDave Barach <vpp@barachs.net>2023-03-14 17:02:15 +0000
commitaeb7c1cb6e11dde259d954f7fabb95073a3b4c54 (patch)
treeb57271893e5550a96b267ab288e5589968677590 /src/vnet/session/session_api.c
parent48d2e15e3d5afa34ab75112a949dacc2759d472c (diff)
session vcl: refactor builtin tx event for main tx
Rename unused SESSION_IO_EVT_BUILTIN_TX to SESSION_IO_EVT_TX_MAIN and leverage it for non-connected udp tx. Non-connected udp sessions are listeners and are therefore allocated on main thread. Consequently, whenever session queue node is not polling main, tx events generated by external applications might be missed or processed with some delay. To solve this, request that apps use SESSION_IO_EVT_TX_MAIN tx events as opposed to SESSION_IO_EVT_TX and send that to first worker as opposed to main. Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I5df5ac3dc80c0f192b2eefb1d465e9deefe8786b
Diffstat (limited to 'src/vnet/session/session_api.c')
-rw-r--r--src/vnet/session/session_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 2502ef6a70a..3481cdf8730 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -314,6 +314,8 @@ mq_send_session_bound_cb (u32 app_wrk_index, u32 api_context,
if (session_transport_service_type (ls) == TRANSPORT_SERVICE_CL &&
ls->rx_fifo)
{
+ m.mq_index = transport_cl_thread ();
+ m.vpp_evt_q = fifo_segment_msg_q_offset (eq_seg, m.mq_index);
m.rx_fifo = fifo_segment_fifo_offset (ls->rx_fifo);
m.tx_fifo = fifo_segment_fifo_offset (ls->tx_fifo);
m.segment_handle = session_segment_handle (ls);