#define HALF_OPEN_LOOKUP_INVALID_VALUE ((u64)~0)
#define INVALID_INDEX ((u32)~0)
-#define SESSION_PROXY_LISTENER_INDEX ((u32)~0 - 1)
+#define SESSION_PROXY_LISTENER_INDEX ((u8)~0 - 1)
#define SESSION_LOCAL_HANDLE_PREFIX 0x7FFFFFFF
/* TODO decide how much since we have pre-data as well */
typedef enum
{
FIFO_EVENT_APP_RX,
+ SESSION_IO_EVT_CT_RX,
FIFO_EVENT_APP_TX,
+ SESSION_IO_EVT_CT_TX,
FIFO_EVENT_DISCONNECT,
FIFO_EVENT_BUILTIN_RX,
+ FIFO_EVENT_BUILTIN_TX,
FIFO_EVENT_RPC,
+ SESSION_CTRL_EVT_BOUND,
SESSION_CTRL_EVT_ACCEPTED,
SESSION_CTRL_EVT_ACCEPTED_REPLY,
SESSION_CTRL_EVT_CONNECTED,
int stream_session_accept (transport_connection_t * tc, u32 listener_index,
u8 notify);
int session_open (u32 app_index, session_endpoint_t * tep, u32 opaque);
-int stream_session_listen (stream_session_t * s, session_endpoint_t * tep);
-int stream_session_stop_listen (stream_session_t * s);
+int session_listen (stream_session_t * s, session_endpoint_extended_t * sep);
+int session_stop_listen (stream_session_t * s);
void stream_session_disconnect (stream_session_t * s);
void stream_session_disconnect_transport (stream_session_t * s);
void stream_session_cleanup (stream_session_t * s);
int session_send_io_evt_to_thread (svm_fifo_t * f,
session_evt_type_t evt_type);
-int session_send_io_evt_to_thread_custom (svm_fifo_t * f, u32 thread_index,
+int session_send_io_evt_to_thread_custom (void *data, u32 thread_index,
session_evt_type_t evt_type);
void session_send_rpc_evt_to_thread (u32 thread_index, void *fp,
void *rpc_args);
+
ssvm_private_t *session_manager_get_evt_q_segment (void);
u8 *format_stream_session (u8 * s, va_list * args);
const transport_proto_vft_t * vft, u8 is_ip4,
u32 output_node);
+always_inline void
+transport_add_tx_event (transport_connection_t * tc)
+{
+ stream_session_t *s = session_get (tc->s_index, tc->thread_index);
+ if (svm_fifo_has_event (s->server_tx_fifo))
+ return;
+ session_send_io_evt_to_thread (s->server_tx_fifo, FIFO_EVENT_APP_TX);
+}
+
clib_error_t *vnet_session_enable_disable (vlib_main_t * vm, u8 is_en);
always_inline svm_msg_q_t *