nat: change nat44-ed test pool address
[vpp.git] / src / vlib / main.c
index f833aa2..2f21995 100644 (file)
@@ -1581,6 +1581,8 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
       if (PREDICT_FALSE (vm->check_frame_queues + frame_queue_check_counter))
        {
          u32 processed = 0;
+         vlib_frame_queue_dequeue_fn_t *fn =
+           vlib_buffer_func_main.frame_queue_dequeue_fn;
 
          if (vm->check_frame_queues)
            {
@@ -1589,7 +1591,7 @@ vlib_main_or_worker_loop (vlib_main_t * vm, int is_main)
            }
 
          vec_foreach (fqm, tm->frame_queue_mains)
-           processed += vlib_frame_queue_dequeue (vm, fqm);
+           processed += (fn) (vm, fqm);
 
          /* No handoff queue work found? */
          if (processed)
@@ -2077,7 +2079,7 @@ done:
   if (error)
     clib_error_report (error);
 
-  return 0;
+  return vm->main_loop_exit_status;
 }
 
 vlib_main_t *
@@ -2092,6 +2094,13 @@ vlib_get_elog_main_not_inline ()
   return &vlib_global_main.elog_main;
 }
 
+void
+vlib_exit_with_status (vlib_main_t *vm, int status)
+{
+  vm->main_loop_exit_status = status;
+  __atomic_store_n (&vm->main_loop_exit_now, 1, __ATOMIC_RELEASE);
+}
+
 /*
  * fd.io coding-style-patch-verification: ON
  *