summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-10-30 10:21:59 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-10-31 08:17:33 +0000
commit5f56d736cbd752216357357b8de6a120a41c08eb (patch)
tree783abee8a2c3e77513940734716775a88ac6bdeb /src/vnet/session/session.c
parent5a7ca7bde104b12f8dc4a751fd911819d4bd6c8e (diff)
session: prioritize postponed sessions
If sessions cannot be handled during the current dispatch loop iteration, ensure that they are first to be handled in the next. Change-Id: Ifc6215900f8cfd530d4886b58641189f0ccf9bb7 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session.c')
-rw-r--r--src/vnet/session/session.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 1802c0efd26..3dd80ad337a 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -1344,7 +1344,7 @@ session_manager_main_enable (vlib_main_t * vm)
if (num_threads < 1)
return clib_error_return (0, "n_thread_stacks not set");
- /* configure per-thread ** vectors */
+ /* Allocate cache line aligned worker contexts */
vec_validate_aligned (smm->wrk, num_threads - 1, CLIB_CACHE_LINE_BYTES);
for (i = 0; i < TRANSPORT_N_PROTO; i++)
@@ -1356,12 +1356,14 @@ session_manager_main_enable (vlib_main_t * vm)
for (i = 0; i < num_threads; i++)
{
wrk = &smm->wrk[i];
- vec_validate (wrk->free_event_vector, 0);
+ vec_validate (wrk->free_event_vector, 128);
_vec_len (wrk->free_event_vector) = 0;
- vec_validate (wrk->pending_event_vector, 0);
+ vec_validate (wrk->pending_event_vector, 128);
_vec_len (wrk->pending_event_vector) = 0;
- vec_validate (wrk->pending_disconnects, 0);
+ vec_validate (wrk->pending_disconnects, 128);
_vec_len (wrk->pending_disconnects) = 0;
+ vec_validate (wrk->postponed_event_vector, 128);
+ _vec_len (wrk->postponed_event_vector) = 0;
wrk->last_vlib_time = vlib_time_now (vlib_mains[i]);