diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vlib/main.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/src/vlib/main.c b/src/vlib/main.c index 912f5a5fb90..8b5611a8e39 100644 --- a/src/vlib/main.c +++ b/src/vlib/main.c @@ -1773,28 +1773,26 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main) } if (!is_main) + vlib_worker_thread_barrier_check (); + + if (PREDICT_FALSE (vm->check_frame_queues + frame_queue_check_counter)) { - vlib_worker_thread_barrier_check (); - if (PREDICT_FALSE (vm->check_frame_queues + - frame_queue_check_counter)) - { - u32 processed = 0; + u32 processed = 0; - if (vm->check_frame_queues) - { - frame_queue_check_counter = 100; - vm->check_frame_queues = 0; - } + if (vm->check_frame_queues) + { + frame_queue_check_counter = 100; + vm->check_frame_queues = 0; + } - vec_foreach (fqm, tm->frame_queue_mains) - processed += vlib_frame_queue_dequeue (vm, fqm); + vec_foreach (fqm, tm->frame_queue_mains) + processed += vlib_frame_queue_dequeue (vm, fqm); - /* No handoff queue work found? */ - if (processed) - frame_queue_check_counter = 100; - else - frame_queue_check_counter--; - } + /* No handoff queue work found? */ + if (processed) + frame_queue_check_counter = 100; + else + frame_queue_check_counter--; } if (PREDICT_FALSE (vec_len (vm->worker_thread_main_loop_callbacks))) |