summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
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_node.c
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_node.c')
-rw-r--r--src/vnet/session/session_node.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index d0936c7e13d..db5123b8b2d 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -74,9 +74,9 @@ session_mq_accepted_reply_handler (void *data)
if (!session_has_transport (s))
{
+ s->session_state = SESSION_STATE_READY;
if (ct_session_connect_notify (s))
return;
- s->session_state = SESSION_STATE_READY;
}
else
{
@@ -1234,6 +1234,26 @@ VLIB_REGISTER_NODE (session_queue_process_node) =
};
/* *INDENT-ON* */
+static_always_inline uword
+session_queue_pre_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
+ vlib_frame_t * frame)
+{
+ session_main_t *sm = &session_main;
+ if (!sm->wrk[0].vpp_event_queue)
+ return 0;
+ return session_queue_node_fn (vm, node, frame);
+}
+
+/* *INDENT-OFF* */
+VLIB_REGISTER_NODE (session_queue_pre_input_node) =
+{
+ .function = session_queue_pre_input_inline,
+ .type = VLIB_NODE_TYPE_PRE_INPUT,
+ .name = "session-queue-main",
+ .state = VLIB_NODE_STATE_DISABLED,
+};
+/* *INDENT-ON* */
+
/*
* fd.io coding-style-patch-verification: ON
*