summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-11-25 08:44:16 -0800
committerDamjan Marion <dmarion@me.com>2020-11-25 19:02:59 +0000
commite92c946498f544d6d435353eb06aa07fb20e054e (patch)
tree60e27e57cb7e26099bf0ab4fc4e27416d38d4f49 /src/vnet/session
parentbc867c3d2137dab4b1395196c1936233517980ab (diff)
session: add startup option to poll in main
Type: improvement Needed to support multi-worker tests Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I68d5590cece24a744513dc6c324dfb2861a38a94
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c7
-rw-r--r--src/vnet/session/session.h3
2 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 1f248057745..b0a17bbb214 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1780,8 +1780,8 @@ session_node_enable_disable (u8 is_en)
session_queue_process_node.index,
SESSION_Q_PROCESS_STOP, 0);
}
-
- continue;
+ if (!session_main.poll_main)
+ continue;
}
vlib_node_set_state (this_vlib_main, session_queue_node.index,
state);
@@ -1818,6 +1818,7 @@ session_main_init (vlib_main_t * vm)
smm->is_enabled = 0;
smm->session_enable_asap = 0;
+ smm->poll_main = 0;
smm->session_baseva = HIGH_SEGMENT_BASEVA;
#if (HIGH_SEGMENT_BASEVA > (4ULL << 30))
@@ -1935,6 +1936,8 @@ session_config_fn (vlib_main_t * vm, unformat_input_t * input)
;
else if (unformat (input, "use-app-socket-api"))
appns_sapi_enable ();
+ else if (unformat (input, "poll-main"))
+ smm->poll_main = 1;
else
return clib_error_return (0, "unknown input `%U'",
format_unformat_error, input);
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index f6997fb18f6..9b9cd29114d 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -171,6 +171,9 @@ typedef struct session_main_
/** Enable session manager at startup */
u8 session_enable_asap;
+ /** Poll session node in main thread */
+ u8 poll_main;
+
/** vpp fifo event queue configured length */
u32 configured_event_queue_length;