return r;
}
-static inline void
-vlib_node_runtime_perf_counter (vlib_main_t * vm, u64 * pmc0, u64 * pmc1)
+always_inline void
+vlib_node_runtime_perf_counter (vlib_main_t * vm, u64 * pmc0, u64 * pmc1,
+ vlib_node_runtime_t * node,
+ vlib_frame_t * frame, int before_or_after)
{
*pmc0 = 0;
*pmc1 = 0;
if (PREDICT_FALSE (vm->vlib_node_runtime_perf_counter_cb != 0))
- (*vm->vlib_node_runtime_perf_counter_cb) (vm, pmc0, pmc1);
+ (*vm->vlib_node_runtime_perf_counter_cb) (vm, pmc0, pmc1, node,
+ frame, before_or_after);
}
always_inline void
last_time_stamp, frame ? frame->n_vectors : 0,
/* is_after */ 0);
- vlib_node_runtime_perf_counter (vm, &pmc_before[0], &pmc_before[1]);
+ vlib_node_runtime_perf_counter (vm, &pmc_before[0], &pmc_before[1],
+ node, frame, 0 /* before */ );
/*
* Turn this on if you run into
* To validate accounting: pmc_delta = t - pmc_before;
* perf ticks should equal clocks/pkt...
*/
- vlib_node_runtime_perf_counter (vm, &pmc_after[0], &pmc_after[1]);
+ vlib_node_runtime_perf_counter (vm, &pmc_after[0], &pmc_after[1], node,
+ frame, 1 /* after */ );
pmc_delta[0] = pmc_after[0] - pmc_before[0];
pmc_delta[1] = pmc_after[1] - pmc_before[1];
vec_validate (vm->processing_rpc_requests, 0);
_vec_len (vm->processing_rpc_requests) = 0;
+ if ((error = vlib_call_all_config_functions (vm, input, 0 /* is_early */ )))
+ goto done;
+
+ /* Call all main loop enter functions. */
+ {
+ clib_error_t *sub_error;
+ sub_error = vlib_call_all_main_loop_enter_functions (vm);
+ if (sub_error)
+ clib_error_report (sub_error);
+ }
+
switch (clib_setjmp (&vm->main_loop_exit, VLIB_MAIN_LOOP_EXIT_NONE))
{
case VLIB_MAIN_LOOP_EXIT_NONE:
goto done;
}
- if ((error = vlib_call_all_config_functions (vm, input, 0 /* is_early */ )))
- goto done;
-
- /* Call all main loop enter functions. */
- {
- clib_error_t *sub_error;
- sub_error = vlib_call_all_main_loop_enter_functions (vm);
- if (sub_error)
- clib_error_report (sub_error);
- }
-
vlib_main_loop (vm);
done: