aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiaoming Jiang <jiangxiaoming@outlook.com>2023-03-24 02:33:00 +0000
committerxm j <jiangxiaoming@outlook.com>2023-03-24 02:53:17 +0000
commit5f305184dbabc232fceff700e76e116743cbd4a2 (patch)
treebfb24fb4ac1adf71c3273befd7c05d17b0c97eea
parent49a103202e1196224098e5c21fe0bc40aa6f78a1 (diff)
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 <jiangxiaoming@outlook.com> Change-Id: Ib38fab422304efc470e20ccb7121442f05bf8bf3
-rw-r--r--src/vnet/session/session_node.c4
1 files 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);