summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-01-20 18:10:26 -0800
committerDave Barach <openvpp@barachs.net>2022-01-22 00:29:30 +0000
commit5384cca85573f553452254abc888f0153a26c15e (patch)
treecec0101efd61ec4d0240ca11165772b8d6268de9 /src/vnet/session/session.h
parent77e69ae2d172dce74f4da4cae52bb63e28daa3ae (diff)
session: update time for list of subscribers
Instead of constantly scanning all transport vfts for update time functions, build list at transport enable time. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id5c07cc03ee1fdd072ebbbd40119d1a440a5e3b1
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r--src/vnet/session/session.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index 9d6c945bb4d..c2984198bf7 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -171,11 +171,16 @@ extern session_fifo_rx_fn session_tx_fifo_dequeue_internal;
u8 session_node_lookup_fifo_event (svm_fifo_t * f, session_event_t * e);
+typedef void (*session_update_time_fn) (f64 time_now, u8 thread_index);
+
typedef struct session_main_
{
/** Worker contexts */
session_worker_t *wrk;
+ /** Vector of transport update time functions */
+ session_update_time_fn *update_time_fns;
+
/** Event queues memfd segment */
fifo_segment_t wrk_mqs_segment;
@@ -528,6 +533,7 @@ void session_register_transport (transport_proto_t transport_proto,
const transport_proto_vft_t * vft, u8 is_ip4,
u32 output_node);
transport_proto_t session_add_transport_proto (void);
+void session_register_update_time_fn (session_update_time_fn fn, u8 is_add);
int session_tx_fifo_peek_bytes (transport_connection_t * tc, u8 * buffer,
u32 offset, u32 max_bytes);
u32 session_tx_fifo_dequeue_drop (transport_connection_t * tc, u32 max_bytes);