+ /** Head of list of pending events */
+ clib_llist_index_t old_head;
+
+ /** Peekers rw lock */
+ clib_rwlock_t peekers_rw_locks;
+
+ /** Vector of buffers to be sent */
+ u32 *pending_tx_buffers;
+
+ /** Vector of nexts for the pending tx buffers */
+ u16 *pending_tx_nexts;
+
+#if SESSION_DEBUG
+ /** last event poll time by thread */
+ clib_time_type_t last_event_poll;
+#endif
+} session_worker_t;
+
+typedef int (session_fifo_rx_fn) (session_worker_t * wrk,
+ vlib_node_runtime_t * node,
+ session_evt_elt_t * e, int *n_tx_packets);
+
+extern session_fifo_rx_fn session_tx_fifo_peek_and_snd;
+extern session_fifo_rx_fn session_tx_fifo_dequeue_and_snd;
+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 struct session_main_
+{
+ /** Worker contexts */
+ session_worker_t *wrk;
+
+ /** Event queues memfd segment initialized only if so configured */
+ ssvm_private_t evt_qs_segment;
+
+ /** Unique segment name counter */
+ u32 unique_segment_name_counter;
+
+ /** Per transport rx function that can either dequeue or peek */
+ session_fifo_rx_fn **session_tx_fns;
+
+ /** Per session type output nodes. Could optimize to group nodes by
+ * fib but lookup would then require session type parsing in session node.
+ * Trade memory for speed, for now */
+ u32 *session_type_to_next;
+
+ transport_proto_t last_transport_proto_type;
+
+ /*
+ * Config parameters
+ */
+
+ /** Session manager is enabled */
+ u8 is_enabled;
+ /** Enable session manager at startup */
+ u8 session_enable_asap;