From 5f305184dbabc232fceff700e76e116743cbd4a2 Mon Sep 17 00:00:00 2001 From: Xiaoming Jiang Date: Fri, 24 Mar 2023 02:33:00 +0000 Subject: session: fix session node switching to interrupt mode failded if no user events wrk->event_elts has 5 elements if no user events Type: fix Signed-off-by: Xiaoming Jiang Change-Id: Ib38fab422304efc470e20ccb7121442f05bf8bf3 --- src/vnet/session/session_node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c index 6011704c8d0..b0f4a93ee76 100644 --- a/src/vnet/session/session_node.c +++ b/src/vnet/session/session_node.c @@ -1885,7 +1885,7 @@ session_wrk_update_state (session_worker_t *wrk) if (wrk->state == SESSION_WRK_POLLING) { - if (clib_llist_elts (wrk->event_elts) == 4 && + if (clib_llist_elts (wrk->event_elts) == 5 && vlib_last_vectors_per_main_loop (vm) < 1) { session_wrk_set_state (wrk, SESSION_WRK_INTERRUPT); @@ -1895,7 +1895,7 @@ session_wrk_update_state (session_worker_t *wrk) } else if (wrk->state == SESSION_WRK_INTERRUPT) { - if (clib_llist_elts (wrk->event_elts) > 4 || + if (clib_llist_elts (wrk->event_elts) > 5 || vlib_last_vectors_per_main_loop (vm) > 1) { session_wrk_set_state (wrk, SESSION_WRK_POLLING); -- cgit 1.2.3-korg