aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r--src/vnet/session/session.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index 364c6462dec..a6118d12766 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -114,6 +114,7 @@ typedef int
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_fifo_event_t * e);
@@ -233,6 +234,8 @@ stream_session_is_valid (u32 si, u8 thread_index)
}
stream_session_t *session_alloc (u32 thread_index);
+int session_alloc_fifos (segment_manager_t * sm, stream_session_t * s);
+void session_free (stream_session_t * s);
always_inline stream_session_t *
session_get (u32 si, u32 thread_index)
@@ -453,7 +456,6 @@ transport_connection_t *session_get_transport (stream_session_t * s);
u32 stream_session_tx_fifo_max_dequeue (transport_connection_t * tc);
-stream_session_t *session_alloc (u32 thread_index);
int
session_enqueue_stream_connection (transport_connection_t * tc,
vlib_buffer_t * b, u32 offset,
@@ -531,6 +533,13 @@ listen_session_get_from_handle (session_handle_t handle)
return s;
}
+always_inline void
+listen_session_parse_handle (session_handle_t handle, u32 * type, u32 * index)
+{
+ *type = handle >> 32;
+ *index = handle & 0xFFFFFFFF;
+}
+
always_inline stream_session_t *
listen_session_new (session_type_t type)
{
@@ -573,18 +582,6 @@ session_manager_get_listener (u8 session_type, u32 index)
index);
}
-/**
- * Set peek or dequeue function for given session type
- *
- * Reliable transport protocols will probably want to use a peek function
- */
-always_inline void
-session_manager_set_transport_rx_fn (session_type_t type, u8 is_peek)
-{
- session_manager_main.session_tx_fns[type] = (is_peek) ?
- session_tx_fifo_peek_and_snd : session_tx_fifo_dequeue_and_snd;
-}
-
always_inline u8
session_manager_is_enabled ()
{