+ /* thread, cpu and numa_node indices */
+ u32 thread_index;
+ u32 cpu_id;
+ u32 numa_node;
+
+ /* control-plane API queue signal pending, length indication */
+ volatile u32 queue_signal_pending;
+ volatile u32 api_queue_nonempty;
+ void (*queue_signal_callback) (struct vlib_main_t *);
+
+ /* Top of (worker) dispatch loop callback */
+ void (**volatile worker_thread_main_loop_callbacks)
+ (struct vlib_main_t *, u64 t);
+ void (**volatile worker_thread_main_loop_callback_tmp)
+ (struct vlib_main_t *, u64 t);
+ clib_spinlock_t worker_thread_main_loop_callback_lock;
+
+ /* debugging */
+ volatile int parked_at_barrier;
+
+ /* Dispatch loop time accounting */
+ u64 loops_this_reporting_interval;
+ f64 loop_interval_end;
+ f64 loop_interval_start;
+ f64 loops_per_second;
+ f64 seconds_per_loop;
+ f64 damping_constant;
+
+ /*
+ * Barrier epoch - Set to current time, each time barrier_sync or
+ * barrier_release is called with zero recursion.
+ */
+ f64 barrier_epoch;
+
+ /* Earliest barrier can be closed again */
+ f64 barrier_no_close_before;
+
+ /* Barrier counter callback */
+ void (**volatile barrier_perf_callbacks)
+ (struct vlib_main_t *, u64 t, int leave);
+ void (**volatile barrier_perf_callbacks_tmp)
+ (struct vlib_main_t *, u64 t, int leave);
+
+ /* Need to check the frame queues */
+ volatile uword check_frame_queues;
+
+ /* RPC requests, main thread only */
+ uword *pending_rpc_requests;
+ uword *processing_rpc_requests;
+ clib_spinlock_t pending_rpc_lock;
+
+ /* buffer fault injector */
+ u32 buffer_alloc_success_seed;
+ f64 buffer_alloc_success_rate;
+
+#ifdef CLIB_SANITIZE_ADDR
+ /* address sanitizer stack save */
+ void *asan_stack_save;
+#endif
+} vlib_main_t;
+
+typedef struct vlib_global_main_t
+{
+ CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
+
+ /* Per-thread Mains */
+ vlib_main_t **vlib_mains;
+
+ /* Name for e.g. syslog. */
+ char *name;
+
+ /* full path to main executable */
+ char *exec_path;
+
+ /* command line arguments */
+ u8 **argv;
+
+ /* post-mortem callbacks */
+ void (**post_mortem_callbacks) (void);
+
+ /*
+ * Need to call vlib_worker_thread_node_runtime_update before
+ * releasing worker thread barrier.
+ */
+ int need_vlib_worker_thread_node_runtime_update;
+
+ /* Command line interface. */
+ vlib_cli_main_t cli_main;