vlib_main_t **vlib_mains;
-static inline uword
-vlib_get_cpu_number_inline (void)
-{
- void * sp;
- uword n;
- u32 len;
-
- /* Get any old stack address. */
- sp = &sp;
-
- n = ((uword)sp - (uword)vlib_thread_stacks[0]) >> 20;
-
- /* "processes" have their own stacks, and they always run in thread 0 */
- n = n >= len ? 0 : n;
-
- return n;
-}
-
void
vlib_set_thread_name (char *name);
int fixed_count;
u32 count;
int no_data_structure_clone;
+ u32 frame_queue_nelts;
+
/* All threads of this type run on pthreads */
int use_pthreads;
u32 first_index;
uword * coremask;
} vlib_thread_registration_t;
-#define VLIB_MAX_CPUS 32
-
-/*
- * Objects passed around by "index" are cache-line aligned.
- * We can stick the owner CPU into the low 6 bits.
+/*
+ * Frames have their cpu / vlib_main_t index in the low-order N bits
+ * Make VLIB_MAX_CPUS a power-of-two, please...
*/
-#if VLIB_MAX_CPUS > 64
-#error VLIB_MAX_CPUS must be <= 64
+
+#ifndef VLIB_MAX_CPUS
+#define VLIB_MAX_CPUS 256
+#endif
+
+#if VLIB_MAX_CPUS > CLIB_MAX_MHEAPS
+#error Please increase number of per-cpu mheaps
#endif
#define VLIB_CPU_MASK (VLIB_MAX_CPUS - 1) /* 0x3f, max */
u32 instance_id;
vlib_thread_registration_t *registration;
u8 *name;
+ u64 barrier_sync_count;
long lwp;
int dpdk_lcore_id;
vlib_worker_thread_t * worker_threads;
- /* thread / cpu / io thread parameters */
- u32 main_thread_is_io_node;
-
/*
* Launch all threads as pthreads,
* not eal_rte_launch (strict affinity) threads
uword * cpu_socket_bitmap;
vlib_efd_t efd;
-
+
+ /* handoff node index */
+ u32 handoff_dispatch_node_index;
+
+ /* for frame queue tracing */
+ frame_queue_trace_t *frame_queue_traces;
+ frame_queue_nelt_counter_t *frame_queue_histogram;
+
+ /* worker thread initialization barrier */
+ volatile u32 worker_thread_release;
+
} vlib_thread_main_t;
vlib_thread_main_t vlib_thread_main;