session: add startup option to poll in main
[vpp.git] / src / vnet / session / session.h
index 956bff0..9b9cd29 100644 (file)
@@ -142,7 +142,7 @@ typedef struct session_main_
   /** Worker contexts */
   session_worker_t *wrk;
 
-  /** Event queues memfd segment initialized only if so configured */
+  /** Event queues memfd segment */
   ssvm_private_t evt_qs_segment;
 
   /** Unique segment name counter */
@@ -164,9 +164,16 @@ typedef struct session_main_
 
   /** Session manager is enabled */
   u8 is_enabled;
+
+  /** Session manager initialized (not necessarily enabled) */
+  u8 is_initialized;
+
   /** Enable session manager at startup */
   u8 session_enable_asap;
 
+  /** Poll session node in main thread */
+  u8 poll_main;
+
   /** vpp fifo event queue configured length */
   u32 configured_event_queue_length;
 
@@ -174,7 +181,6 @@ typedef struct session_main_
   uword session_baseva;
   uword session_va_space_size;
   uword evt_qs_segment_size;
-  u8 evt_qs_use_memfd_seg;
 
   /** Session table size parameters */
   u32 configured_v4_session_table_buckets;
@@ -293,6 +299,8 @@ session_evt_alloc_old (session_worker_t * wrk)
 session_t *session_alloc (u32 thread_index);
 void session_free (session_t * s);
 void session_free_w_fifos (session_t * s);
+void session_cleanup_half_open (transport_proto_t tp,
+                               session_handle_t ho_handle);
 u8 session_is_valid (u32 si, u8 thread_index);
 
 always_inline session_t *
@@ -462,6 +470,8 @@ int session_dgram_connect_notify (transport_connection_t * tc,
 int session_stream_accept_notify (transport_connection_t * tc);
 void session_transport_closing_notify (transport_connection_t * tc);
 void session_transport_delete_notify (transport_connection_t * tc);
+void session_half_open_delete_notify (transport_proto_t tp,
+                                     session_handle_t ho_handle);
 void session_transport_closed_notify (transport_connection_t * tc);
 void session_transport_reset_notify (transport_connection_t * tc);
 int session_stream_accept (transport_connection_t * tc, u32 listener_index,