aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-04-03 17:23:42 +0000
committerFlorin Coras <fcoras@cisco.com>2020-04-03 17:27:33 +0000
commite33c0021c3234b679fe2fdd3d8a603542500873f (patch)
tree56be508790ff2f6ae026fa5bd301761ff2bf0ff9 /src/vnet/session
parentd85666fdfd49a2b0a3ce5166c22c9efadf6ca239 (diff)
session: init port_proto_type asap
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idc9b1423846edb46755a255ecc14070e9250d192
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index ce3f581a263..33514008dd0 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1570,7 +1570,6 @@ session_manager_main_enable (vlib_main_t * vm)
if (num_threads < 1)
return clib_error_return (0, "n_thread_stacks not set");
- smm->last_transport_proto_type = TRANSPORT_PROTO_QUIC;
/* Allocate cache line aligned worker contexts */
vec_validate_aligned (smm->wrk, num_threads - 1, CLIB_CACHE_LINE_BYTES);
@@ -1686,10 +1685,14 @@ vnet_session_enable_disable (vlib_main_t * vm, u8 is_en)
}
clib_error_t *
-session_manager_main_init (vlib_main_t * vm)
+session_main_init (vlib_main_t * vm)
{
session_main_t *smm = &session_main;
+
+ smm->is_enabled = 0;
+ smm->session_enable_asap = 0;
smm->session_baseva = HIGH_SEGMENT_BASEVA;
+
#if (HIGH_SEGMENT_BASEVA > (4ULL << 30))
smm->session_va_space_size = 128ULL << 30;
smm->evt_qs_segment_size = 64 << 20;
@@ -1697,13 +1700,14 @@ session_manager_main_init (vlib_main_t * vm)
smm->session_va_space_size = 128 << 20;
smm->evt_qs_segment_size = 1 << 20;
#endif
- smm->is_enabled = 0;
- smm->session_enable_asap = 0;
+
+ smm->last_transport_proto_type = TRANSPORT_PROTO_QUIC;
+
return 0;
}
static clib_error_t *
-session_main_init (vlib_main_t * vm)
+session_main_loop_init (vlib_main_t * vm)
{
session_main_t *smm = &session_main;
if (smm->session_enable_asap)
@@ -1715,8 +1719,8 @@ session_main_init (vlib_main_t * vm)
return 0;
}
-VLIB_INIT_FUNCTION (session_manager_main_init);
-VLIB_MAIN_LOOP_ENTER_FUNCTION (session_main_init);
+VLIB_INIT_FUNCTION (session_main_init);
+VLIB_MAIN_LOOP_ENTER_FUNCTION (session_main_loop_init);
static clib_error_t *
session_config_fn (vlib_main_t * vm, unformat_input_t * input)