Go to the source code of this file.
|
void | vlib_set_thread_name (char *name) |
|
clib_error_t * | vlib_thread_init (vlib_main_t *vm) |
|
int | vlib_frame_queue_enqueue (vlib_main_t *vm, u32 node_runtime_index, u32 frame_queue_index, vlib_frame_t *frame, vlib_frame_queue_msg_type_t type) |
|
int | vlib_frame_queue_dequeue (vlib_main_t *vm, vlib_frame_queue_main_t *fqm) |
|
void | vlib_worker_thread_node_runtime_update (void) |
|
void | vlib_create_worker_threads (vlib_main_t *vm, int n, void(*thread_function)(void *)) |
|
void | vlib_worker_thread_init (vlib_worker_thread_t *w) |
|
u32 | vlib_frame_queue_main_init (u32 node_index, u32 frame_queue_nelts) |
|
void | vlib_worker_thread_barrier_sync_int (vlib_main_t *vm, const char *func_name) |
|
void | vlib_worker_thread_barrier_release (vlib_main_t *vm) |
|
u8 | vlib_worker_thread_barrier_held (void) |
| Return true if the wroker thread barrier is held. More...
|
|
void | vlib_worker_thread_initial_barrier_sync_and_release (vlib_main_t *vm) |
|
void | vlib_worker_thread_node_refork (void) |
|
void | vlib_worker_wait_one_loop (void) |
| Wait until each of the workers has been once around the track. More...
|
|
static_always_inline uword | vlib_get_thread_index (void) |
|
static void | vlib_smp_unsafe_warning (void) |
|
void | vlib_worker_thread_fork_fixup (vlib_fork_fixup_t which) |
|
static u32 | vlib_num_workers () |
|
static u32 | vlib_get_worker_thread_index (u32 worker_index) |
|
static u32 | vlib_get_worker_index (u32 thread_index) |
|
static u32 | vlib_get_current_worker_index () |
|
static void | vlib_worker_thread_barrier_check (void) |
|
static vlib_main_t * | vlib_get_worker_vlib_main (u32 worker_index) |
|
static u8 | vlib_thread_is_main_w_barrier (void) |
|
static void | vlib_put_frame_queue_elt (vlib_frame_queue_elt_t *hf) |
|
static vlib_frame_queue_elt_t * | vlib_get_frame_queue_elt (u32 frame_queue_index, u32 index) |
|
static vlib_frame_queue_t * | is_vlib_frame_queue_congested (u32 frame_queue_index, u32 index, u32 queue_hi_thresh, vlib_frame_queue_t **handoff_queue_by_worker_index) |
|
static vlib_frame_queue_elt_t * | vlib_get_worker_handoff_queue_elt (u32 frame_queue_index, u32 vlib_worker_index, vlib_frame_queue_elt_t **handoff_queue_elt_by_worker_index) |
|
u8 * | vlib_thread_stack_init (uword thread_index) |
|
int | vlib_thread_cb_register (struct vlib_main_t *vm, vlib_thread_callbacks_t *cb) |
|
void | vlib_process_signal_event_mt_helper (vlib_process_signal_event_mt_args_t *args) |
|
void | vlib_rpc_call_main_thread (void *function, u8 *args, u32 size) |
|
◆ BARRIER_SYNC_DELAY
#define BARRIER_SYNC_DELAY (0.030000) |
◆ BARRIER_SYNC_TIMEOUT
#define BARRIER_SYNC_TIMEOUT (600.1) |
◆ foreach_sched_policy
#define foreach_sched_policy |
Value:_(SCHED_OTHER, OTHER, "other") \
_(SCHED_BATCH, BATCH, "batch") \
_(SCHED_IDLE, IDLE, "idle") \
_(SCHED_FIFO, FIFO, "fifo") \
_(SCHED_RR, RR, "rr")
Definition at line 264 of file threads.h.
◆ foreach_vlib_main
#define foreach_vlib_main |
( |
|
body | ) |
|
Value:do { \
vlib_main_t ** __vlib_mains = 0, *this_vlib_main; \
{ \
ASSERT (ii == 0 || \
this_vlib_main->parked_at_barrier == 1); \
if (this_vlib_main) \
vec_add1 (__vlib_mains, this_vlib_main); \
{ \
this_vlib_main = __vlib_mains[ii]; \
\
(body); \
} \
vec_free (__vlib_mains); \
} while (0);
for(i=1;i<=collision_buckets;i++)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_main_t ** vlib_mains
Definition at line 241 of file threads.h.
◆ VLIB_CPU_MASK
◆ VLIB_LOG2_THREAD_STACK_SIZE
#define VLIB_LOG2_THREAD_STACK_SIZE (21) |
◆ VLIB_MAX_CPUS
#define VLIB_MAX_CPUS 256 |
◆ VLIB_OFFSET_MASK
◆ VLIB_REGISTER_THREAD
#define VLIB_REGISTER_THREAD |
( |
|
x, |
|
|
|
... |
|
) |
| |
Value:static void __vlib_add_thread_registration_##x (void) \
__attribute__((__constructor__)) ; \
static void __vlib_add_thread_registration_##x (void) \
{ \
} \
static void __vlib_rm_thread_registration_##x (void) \
__attribute__((__destructor__)) ; \
static void __vlib_rm_thread_registration_##x (void) \
{ \
VLIB_REMOVE_FROM_LINKED_LIST (tm->next, &x, next); \
} \
struct vlib_thread_registration_ * next
vlib_thread_registration_t * next
vlib_thread_main_t vlib_thread_main
Definition at line 352 of file threads.h.
◆ VLIB_THREAD_STACK_SIZE
◆ vlib_worker_thread_barrier_sync
◆ vlib_thread_function_t
typedef void() vlib_thread_function_t(void *arg) |
◆ vlib_thread_registration_t
◆ sched_policy_t
◆ vlib_fork_fixup_t
Enumerator |
---|
VLIB_WORKER_THREAD_FORK_FIXUP_ILLEGAL | |
VLIB_WORKER_THREAD_FORK_FIXUP_NEW_SW_IF_INDEX | |
Definition at line 233 of file threads.h.
◆ vlib_frame_queue_msg_type_t
Enumerator |
---|
VLIB_FRAME_QUEUE_ELT_DISPATCH_FRAME | |
Definition at line 68 of file threads.h.
◆ is_vlib_frame_queue_congested()
◆ vlib_create_worker_threads()
void vlib_create_worker_threads |
( |
vlib_main_t * |
vm, |
|
|
int |
n, |
|
|
void(*)(void *) |
thread_function |
|
) |
| |
◆ vlib_frame_queue_dequeue()
◆ vlib_frame_queue_enqueue()
◆ vlib_frame_queue_main_init()
u32 vlib_frame_queue_main_init |
( |
u32 |
node_index, |
|
|
u32 |
frame_queue_nelts |
|
) |
| |
◆ vlib_get_current_worker_index()
static u32 vlib_get_current_worker_index |
( |
| ) |
|
|
inlinestatic |
◆ vlib_get_frame_queue_elt()
◆ vlib_get_thread_index()
◆ vlib_get_worker_handoff_queue_elt()
◆ vlib_get_worker_index()
static u32 vlib_get_worker_index |
( |
u32 |
thread_index | ) |
|
|
inlinestatic |
◆ vlib_get_worker_thread_index()
static u32 vlib_get_worker_thread_index |
( |
u32 |
worker_index | ) |
|
|
inlinestatic |
◆ vlib_get_worker_vlib_main()
◆ vlib_num_workers()
static u32 vlib_num_workers |
( |
| ) |
|
|
inlinestatic |
◆ vlib_process_signal_event_mt_helper()
◆ vlib_put_frame_queue_elt()
◆ vlib_rpc_call_main_thread()
void vlib_rpc_call_main_thread |
( |
void * |
function, |
|
|
u8 * |
args, |
|
|
u32 |
size |
|
) |
| |
◆ vlib_set_thread_name()
void vlib_set_thread_name |
( |
char * |
name | ) |
|
◆ vlib_smp_unsafe_warning()
static void vlib_smp_unsafe_warning |
( |
void |
| ) |
|
|
inlinestatic |
◆ vlib_thread_cb_register()
◆ vlib_thread_init()
◆ vlib_thread_is_main_w_barrier()
static u8 vlib_thread_is_main_w_barrier |
( |
void |
| ) |
|
|
inlinestatic |
◆ vlib_thread_stack_init()
u8* vlib_thread_stack_init |
( |
uword |
thread_index | ) |
|
◆ vlib_worker_thread_barrier_check()
static void vlib_worker_thread_barrier_check |
( |
void |
| ) |
|
|
inlinestatic |
◆ vlib_worker_thread_barrier_held()
u8 vlib_worker_thread_barrier_held |
( |
void |
| ) |
|
Return true if the wroker thread barrier is held.
Definition at line 1421 of file threads.c.
◆ vlib_worker_thread_barrier_release()
void vlib_worker_thread_barrier_release |
( |
vlib_main_t * |
vm | ) |
|
◆ vlib_worker_thread_barrier_sync_int()
void vlib_worker_thread_barrier_sync_int |
( |
vlib_main_t * |
vm, |
|
|
const char * |
func_name |
|
) |
| |
◆ vlib_worker_thread_fork_fixup()
◆ vlib_worker_thread_init()
◆ vlib_worker_thread_initial_barrier_sync_and_release()
void vlib_worker_thread_initial_barrier_sync_and_release |
( |
vlib_main_t * |
vm | ) |
|
◆ vlib_worker_thread_node_refork()
void vlib_worker_thread_node_refork |
( |
void |
| ) |
|
◆ vlib_worker_thread_node_runtime_update()
void vlib_worker_thread_node_runtime_update |
( |
void |
| ) |
|
◆ vlib_worker_wait_one_loop()
void vlib_worker_wait_one_loop |
( |
void |
| ) |
|
Wait until each of the workers has been once around the track.
Definition at line 1629 of file threads.c.
◆ rpc_call_main_thread_cb_fn
void* rpc_call_main_thread_cb_fn |
◆ vlib_mains
◆ vlib_thread_main
◆ vlib_worker_threads