X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvlib%2Fmain.c;h=6783068b42bf59f7b17e4b16b9bc25d8bef25de5;hb=e3248989586ade29baba635aae66b06995917221;hp=f9b38b27061dd0c476ef0e827f98ca65eaa1749e;hpb=acc1fbcb5e13961c1fcf1a00952b19b154b296b6;p=vpp.git diff --git a/src/vlib/main.c b/src/vlib/main.c index f9b38b27061..6783068b42b 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -1547,6 +1547,13 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) } } } + /* Input nodes may have added work to the pending vector. + Process pending vector until there is nothing left. + All pending vectors will be processed from input -> output. */ + for (i = 0; i < _vec_len (nm->pending_frames); i++) + cpu_time_now = dispatch_pending_node (vm, i, cpu_time_now); + /* Reset pending vector for next iteration. */ + _vec_len (nm->pending_frames) = 0; if (is_main) { @@ -1565,7 +1572,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) { uword i; - processes_timing_wheel_data: for (i = 0; i < _vec_len (nm->data_from_advancing_timing_wheel); i++) { @@ -1608,19 +1614,6 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) _vec_len (nm->data_from_advancing_timing_wheel) = 0; } } - - /* Input nodes may have added work to the pending vector. - Process pending vector until there is nothing left. - All pending vectors will be processed from input -> output. */ - for (i = 0; i < _vec_len (nm->pending_frames); i++) - cpu_time_now = dispatch_pending_node (vm, i, cpu_time_now); - /* Reset pending vector for next iteration. */ - _vec_len (nm->pending_frames) = 0; - - /* Pending internal nodes may resume processes. */ - if (is_main && _vec_len (nm->data_from_advancing_timing_wheel) > 0) - goto processes_timing_wheel_data; - vlib_increment_main_loop_counter (vm); /* Record time stamp in case there are no enabled nodes and above