From: Damjan Marion Date: Wed, 23 Jul 2025 12:41:16 +0000 (+0000) Subject: vlib: remove timer when sched node is dispatched by interrupt X-Git-Tag: v26.02-rc0~149 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F74%2F43474%2F4;p=vpp.git vlib: remove timer when sched node is dispatched by interrupt Type: fix Change-Id: I48a0da4a3af50101e2d2c1ed3cd8734b7e907f77 Signed-off-by: Damjan Marion --- diff --git a/src/vlib/main.c b/src/vlib/main.c index ffa4a696422..121d70b54a1 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -1597,6 +1597,8 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) { vlib_node_runtime_t *n; n = vec_elt_at_index (nm->nodes_by_type[nt], int_num); + if (n->stop_timer_handle_plus_1) + vlib_node_unschedule (vm, n->node_index); cpu_time_now = dispatch_node ( vm, n, nt, /* frame */ 0, VLIB_NODE_DISPATCH_REASON_INTERRUPT, @@ -1615,11 +1617,14 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) { vlib_node_runtime_t *nr = vlib_node_get_runtime (vm, n->index); - nr->stop_timer_handle_plus_1 = 0; - cpu_time_now = dispatch_node ( - vm, nr, VLIB_NODE_TYPE_SCHED, - /* frame */ 0, VLIB_NODE_DISPATCH_REASON_SCHED, - cpu_time_now); + if (nr->stop_timer_handle_plus_1) + { + nr->stop_timer_handle_plus_1 = 0; + cpu_time_now = dispatch_node ( + vm, nr, VLIB_NODE_TYPE_SCHED, + /* frame */ 0, VLIB_NODE_DISPATCH_REASON_SCHED, + cpu_time_now); + } } } vec_reset_length (nm->sched_node_pending);