summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-07-08 15:15:07 -0700
committerFlorin Coras <florin.coras@gmail.com>2024-07-08 21:49:32 +0000
commit129ff04e3c564f040a8c00783ebe7f28cfadcbff (patch)
treefb39ad41fcaf08da5dacd7b3eebc625027399391 /src/vnet/session/session.c
parent5874dd0365161271c7183a525983b29fe66d6f2f (diff)
session: add api to program rx io evts
Type: improvement Change-Id: I5a4a33604ecb8a29ef6932cc5826835d3bec7f23 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index f1598519363..c1becf2c5ea 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -104,6 +104,22 @@ session_program_tx_io_evt (session_handle_tu_t sh, session_evt_type_t evt_type)
}
int
+session_program_rx_io_evt (session_handle_tu_t sh)
+{
+ if (sh.thread_index == vlib_get_thread_index ())
+ {
+ session_t *s = session_get_from_handle (sh);
+ return session_enqueue_notify (s);
+ }
+ else
+ {
+ return session_send_evt_to_thread ((void *) &sh.session_index, 0,
+ (u32) sh.thread_index,
+ SESSION_IO_EVT_BUILTIN_RX);
+ }
+}
+
+int
session_send_ctrl_evt_to_thread (session_t * s, session_evt_type_t evt_type)
{
/* only events supported are disconnect, shutdown and reset */