summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-03-04 10:56:23 -0800
committerDave Barach <openvpp@barachs.net>2019-03-06 17:53:39 +0000
commit653e43f06a974121343b2c1f0e4533926020877b (patch)
tree6ab92561e8eccbda6b29316f794de531032a1259 /src/vnet/session/session.h
parenta55df1081762b4e40698ef7d9196551851be646a (diff)
session: use vpp to switch io events for ct sessions
Instead of allocating pairs of message queues per cut-thru session and having the applications map them, this uses vpp as an io event message switch. Change-Id: I51db1c7564df479a7d1a3288342394251fd188bb Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.h')
-rw-r--r--src/vnet/session/session.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index a7c91949eb3..cea1b375108 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -187,6 +187,7 @@ typedef struct session_main_
extern session_main_t session_main;
extern vlib_node_registration_t session_queue_node;
extern vlib_node_registration_t session_queue_process_node;
+extern vlib_node_registration_t session_queue_pre_input_node;
#define SESSION_Q_PROCESS_FLUSH_FRAMES 1
#define SESSION_Q_PROCESS_STOP 2
@@ -196,6 +197,9 @@ session_is_valid (u32 si, u8 thread_index)
{
session_t *s;
s = pool_elt_at_index (session_main.wrk[thread_index].sessions, si);
+ if (s->session_state == SESSION_STATE_CLOSED)
+ return 1;
+
if (s->thread_index != thread_index || s->session_index != si)
return 0;
return 1;
@@ -331,6 +335,7 @@ void session_transport_close (session_t * s);
void session_transport_cleanup (session_t * s);
int session_send_io_evt_to_thread (svm_fifo_t * f,
session_evt_type_t evt_type);
+int session_enqueue_notify (session_t * s);
int session_dequeue_notify (session_t * s);
int session_send_io_evt_to_thread_custom (void *data, u32 thread_index,
session_evt_type_t evt_type);