session: add api to program rx io evts
Type: improvement Change-Id: I5a4a33604ecb8a29ef6932cc5826835d3bec7f23 Signed-off-by: Florin Coras <fcoras@cisco.com>
This commit is contained in:

committed by
Florin Coras

parent
5874dd0365
commit
129ff04e3c
@ -103,6 +103,22 @@ session_program_tx_io_evt (session_handle_tu_t sh, session_evt_type_t evt_type)
|
|||||||
(u32) sh.thread_index, evt_type);
|
(u32) sh.thread_index, 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
|
int
|
||||||
session_send_ctrl_evt_to_thread (session_t * s, session_evt_type_t evt_type)
|
session_send_ctrl_evt_to_thread (session_t * s, session_evt_type_t evt_type)
|
||||||
{
|
{
|
||||||
|
@ -461,6 +461,7 @@ int session_send_io_evt_to_thread_custom (void *data, u32 thread_index,
|
|||||||
session_evt_type_t evt_type);
|
session_evt_type_t evt_type);
|
||||||
int session_program_tx_io_evt (session_handle_tu_t sh,
|
int session_program_tx_io_evt (session_handle_tu_t sh,
|
||||||
session_evt_type_t evt_type);
|
session_evt_type_t evt_type);
|
||||||
|
int session_program_rx_io_evt (session_handle_tu_t sh);
|
||||||
void session_send_rpc_evt_to_thread (u32 thread_index, void *fp,
|
void session_send_rpc_evt_to_thread (u32 thread_index, void *fp,
|
||||||
void *rpc_args);
|
void *rpc_args);
|
||||||
void session_send_rpc_evt_to_thread_force (u32 thread_index, void *fp,
|
void session_send_rpc_evt_to_thread_force (u32 thread_index, void *fp,
|
||||||
|
Reference in New Issue
Block a user