+ TW (tw_timer_wheel_init)
+ ((TWT (tw_timer_wheel) *) nm->timing_wheel,
+ process_expired_timer_cb /* callback */, 10e-6 /* timer period 10us */,
+ ~0 /* max expirations per call */);
+
+ vec_validate (vm->pending_rpc_requests, 0);
+ vec_set_len (vm->pending_rpc_requests, 0);
+ vec_validate (vm->processing_rpc_requests, 0);
+ vec_set_len (vm->processing_rpc_requests, 0);
+
+ /* Default params for the buffer allocator fault injector, if configured */
+ if (VLIB_BUFFER_ALLOC_FAULT_INJECTOR > 0)
+ {
+ vm->buffer_alloc_success_seed = 0xdeaddabe;
+ vm->buffer_alloc_success_rate = 0.80;
+ }
+
+ if ((error = vlib_call_all_config_functions (vm, input, 0 /* is_early */ )))
+ goto done;
+
+ /*
+ * Use exponential smoothing, with a half-life of 1 second
+ * reported_rate(t) = reported_rate(t-1) * K + rate(t)*(1-K)
+ *
+ * Sample every 20ms, aka 50 samples per second
+ * K = exp (-1.0/20.0);
+ * K = 0.95
+ */
+ vm->damping_constant = exp (-1.0 / 20.0);
+
+ /* Sort per-thread init functions before we start threads */
+ vlib_sort_init_exit_functions (&vgm->worker_init_function_registrations);
+
+ /* 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);
+ }