vlib:process node scheduling use timing_wheel have problem.

The time wheel should not be started in the loop while processing expired events.
can be set  p->stop_timer_handle = ~0 to solve.

Type: fix

Signed-off-by: jinsh <jinsh11@chinatelecom.cn>
Change-Id: Ie9a4293f39f981f50d280b39a5d958d319ee2300
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
(cherry picked from commit b7756b26a9cc6e04a969dec3914ad7e148086e91)
This commit is contained in:
jinsh
2023-03-07 14:32:06 +08:00
committed by Dave Wallace
parent feb08c9c40
commit 3be288f0d9
2 changed files with 6 additions and 2 deletions

View File

@ -1649,6 +1649,7 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
vlib_get_node (vm, te->process_node_index); vlib_get_node (vm, te->process_node_index);
vlib_process_t *p = vlib_process_t *p =
vec_elt (nm->processes, n->runtime_index); vec_elt (nm->processes, n->runtime_index);
p->stop_timer_handle = ~0;
void *data; void *data;
data = data =
vlib_process_signal_event_helper (nm, n, p, vlib_process_signal_event_helper (nm, n, p,

View File

@ -998,8 +998,11 @@ vlib_process_signal_event_helper (vlib_node_main_t * nm,
p->flags = p_flags | VLIB_PROCESS_RESUME_PENDING; p->flags = p_flags | VLIB_PROCESS_RESUME_PENDING;
vec_add1 (nm->data_from_advancing_timing_wheel, x); vec_add1 (nm->data_from_advancing_timing_wheel, x);
if (delete_from_wheel) if (delete_from_wheel)
TW (tw_timer_stop) ((TWT (tw_timer_wheel) *) nm->timing_wheel, {
p->stop_timer_handle); TW (tw_timer_stop)
((TWT (tw_timer_wheel) *) nm->timing_wheel, p->stop_timer_handle);
p->stop_timer_handle = ~0;
}
} }
return data_to_be_written_by_caller; return data_to_be_written_by_caller;