X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fsession%2Fsession.h;h=1e08cccb6f7ffcf6662b96805dbe8903bdf4694e;hb=ef91534e665cf343af2389df11d46559a1f83d78;hp=5e94c41f927775f9ccf6213bf828ada6385ce2a4;hpb=460dce6e2d017cc7b2151fd0fa61d464570489d7;p=vpp.git diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h index 5e94c41f927..1e08cccb6f7 100644 --- a/src/vnet/session/session.h +++ b/src/vnet/session/session.h @@ -24,7 +24,7 @@ #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 */ @@ -38,7 +38,9 @@ typedef enum 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, @@ -549,17 +551,18 @@ void stream_session_reset_notify (transport_connection_t * tc); 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); @@ -571,6 +574,15 @@ void session_register_transport (transport_proto_t transport_proto, 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 *