|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
40 #ifndef included_vlib_main_h
41 #define included_vlib_main_h
56 #ifndef VLIB_ELOG_MAIN_LOOP
57 #define VLIB_ELOG_MAIN_LOOP 0
140 #define VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE 7
147 #define VLIB_MAIN_LOOP_EXIT_NONE 0
148 #define VLIB_MAIN_LOOP_EXIT_PANIC 1
150 #define VLIB_MAIN_LOOP_EXIT_CLI 2
268 #ifdef CLIB_SANITIZE_ADDR
270 void *asan_stack_save;
328 extern __thread
uword __os_thread_index;
348 f64 limit = t + wait;
354 #define vlib_time_code(vm,body) \
357 _t[0] = vlib_time_now (vm); \
358 do { body; } while (0); \
359 _t[1] = vlib_time_now (vm); \
360 clib_warning ("%.7e", _t[1] - _t[0]); \
363 #define vlib_wait_with_timeout(vm,suspend_time,timeout_time,test) \
365 uword __vlib_wait_with_timeout = 0; \
366 f64 __vlib_wait_time = 0; \
367 while (! (__vlib_wait_with_timeout = (test)) \
368 && __vlib_wait_time < (timeout_time)) \
370 vlib_process_suspend (vm, suspend_time); \
371 __vlib_wait_time += suspend_time; \
373 __vlib_wait_with_timeout; \
383 #define vlib_panic_with_msg(vm,args...) \
384 vlib_panic_with_error (vm, clib_error_return (0, args))
406 return (
f64) vectors / (
f64) calls;
447 .call_type = call_type,
clib_random_buffer_t random_buffer
f64 barrier_no_close_before
vlib_one_time_waiting_process_t * procs_waiting_for_mc_stream_join
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
volatile u32 main_loop_count
struct vlib_global_main_t vlib_global_main_t
_vlib_init_function_list_elt_t * main_loop_exit_function_registrations
_vlib_init_function_list_elt_t * main_loop_enter_function_registrations
static f64 clib_time_now_internal(clib_time_t *c, u64 n)
clib_spinlock_t pending_rpc_lock
vlib_node_function_t * dispatch_wrapper_fn
vlib_main_t vlib_node_runtime_t * node
static void vlib_clear_internal_node_vector_rate(vlib_main_t *vm)
u32 vlib_app_num_thread_stacks_needed(void)
elog_event_type_t * node_call_elog_event_types
vlib_error_main_t error_main
vlib_node_main_t node_main
void(**volatile barrier_perf_callbacks)(struct vlib_main_t *, u64 t, int leave)
int vlib_main(vlib_main_t *vm, unformat_input_t *input)
volatile int parked_at_barrier
vlib_global_main_t vlib_global_main
u32 elog_trace_graph_circuit_node_index
vlib_buffer_main_t * buffer_main
static void vlib_time_wait(vlib_main_t *vm, f64 wait)
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void(* queue_signal_callback)(struct vlib_main_t *)
@ VLIB_NODE_RUNTIME_PERF_BEFORE
uword() vlib_node_function_t(struct vlib_main_t *vm, struct vlib_node_runtime_t *node, struct vlib_frame_t *frame)
@ VLIB_NODE_RUNTIME_PERF_RESET
#define hash_create(elts, value_bytes)
elog_event_type_t * node_return_elog_event_types
volatile u32 queue_signal_pending
volatile uword check_frame_queues
int elog_trace_cli_commands
f64 buffer_alloc_success_rate
static void vlib_panic_with_error(vlib_main_t *vm, clib_error_t *error)
#define clib_callback_data_check_and_get(set_)
Check for and get current callback set.
vlib_config_function_runtime_t * config_function_registrations
vlib_trace_filter_t trace_filter
void(* vlib_node_runtime_perf_callback_fp_t)(struct vlib_node_runtime_perf_callback_data_t *data, vlib_node_runtime_perf_callback_args_t *args)
clib_error_t * main_loop_error
void clib_longjmp(clib_longjmp_t *save, uword return_value)
u64 loops_this_reporting_interval
uword * processing_rpc_requests
int need_vlib_worker_thread_node_runtime_update
vlib_main_t * vlib_get_main_not_inline(void)
vlib_node_runtime_t * node
elog_event_type_t * error_elog_event_types
u32 buffer_alloc_success_seed
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
int elog_trace_graph_dispatch
volatile u32 main_loop_exit_now
vlib_physmem_main_t physmem_main
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static u32 vlib_last_vectors_per_main_loop(vlib_main_t *vm)
vlib_node_runtime_perf_call_type_t
#define VLIB_MAIN_LOOP_EXIT_PANIC
void vlib_worker_loop(vlib_main_t *vm)
Callback multiplex scheme.
u32 main_loop_vectors_processed
#define VLIB_MAIN_LOOP_EXIT_CLI
u32 internal_node_last_vectors_per_main_loop
int elog_trace_api_messages
_vlib_init_function_list_elt_t * api_init_function_registrations
void(** post_mortem_callbacks)(void)
void vlib_add_del_post_mortem_callback(void *cb, int is_add)
Fixed length block allocator. Pools are built from clib vectors and bitmaps. Use pools when repeatedl...
uword * worker_init_functions_called
void(* os_punt_frame)(struct vlib_main_t *vm, struct vlib_node_runtime_t *node, vlib_frame_t *frame)
vlib_node_registration_t * node_registrations
u64 cpu_time_last_node_dispatch
uword * pending_rpc_requests
static f64 clib_time_now(clib_time_t *c)
vlib_node_runtime_perf_callback_fp_t fp
void(**volatile barrier_perf_callbacks_tmp)(struct vlib_main_t *, u64 t, int leave)
static void vlib_main_init()
volatile u32 api_queue_nonempty
#define CLIB_CACHE_LINE_BYTES
struct _vlib_node_registration vlib_node_registration_t
vlib_node_runtime_perf_callback_set_t vlib_node_runtime_perf_callbacks
#define clib_callback_data_call_vec(vec_,...)
Iterate and call a callback vector.
elog_main_t * vlib_get_elog_main_not_inline()
int elog_trace_graph_circuit
void(**volatile worker_thread_main_loop_callback_tmp)(struct vlib_main_t *, u64 t)
_vlib_init_function_list_elt_t * init_function_registrations
static void vlib_panic(vlib_main_t *vm)
vlib_node_runtime_perf_call_type_t call_type
static f64 vlib_time_now_ticks(vlib_main_t *vm, u64 n)
u64 internal_node_calls_last_clear
clib_spinlock_t worker_thread_main_loop_callback_lock
u64 internal_node_vectors
static f64 vlib_internal_node_vector_rate(vlib_main_t *vm)
static void vlib_set_queue_signal_callback(vlib_main_t *vm, void(*fp)(vlib_main_t *))
clib_callback_data_typedef(vlib_node_runtime_perf_callback_set_t, vlib_node_runtime_perf_callback_data_t)
u32 main_loop_nodes_processed
struct vlib_node_runtime_perf_callback_data_t vlib_node_runtime_perf_callback_data_t
static void vlib_increment_main_loop_counter(vlib_main_t *vm)
_vlib_init_function_list_elt_t * worker_init_function_registrations
static void * clib_mem_alloc_aligned(uword size, uword align)
void(**volatile worker_thread_main_loop_callbacks)(struct vlib_main_t *, u64 t)
uword * init_functions_called
static f64 vlib_time_now(vlib_main_t *vm)
vlib_trace_main_t trace_main
struct vlib_main_t vlib_main_t
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
u64 internal_node_vectors_last_clear
CLIB_CACHE_LINE_ALIGN_MARK(cacheline0)
vlib_main_t ** vlib_mains
@ VLIB_NODE_RUNTIME_PERF_AFTER
u64 cpu_time_main_loop_start
clib_longjmp_t main_loop_exit
static void vlib_node_runtime_perf_counter(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, uword n, u64 t, vlib_node_runtime_perf_call_type_t call_type)
u32 configured_elog_ring_size
f64 time_last_barrier_release