|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
50 #define VLIB_FRAME_SIZE_ALLOC (VLIB_FRAME_SIZE + 4)
63 #define VLIB_FRAME_SIZE_EXTRA 4
68 #define VLIB_FRAME_MAGIC (0xabadc0ed)
91 u32 n_scalar_bytes,
u32 n_vector_bytes)
93 #ifdef VLIB_SUPPORTS_ARBITRARY_SCALAR_SIZES
94 uword key = (n_scalar_bytes << 16) | n_vector_bytes;
123 u32 l, n, scalar_size, vector_size;
208 else if (
from[
i] == 0xfefefefe)
285 fs -
nm->frame_sizes, n_alloc,
n_free);
293 .path =
"show vlib frame-allocation",
294 .short_help =
"Show node dispatch frame statistics",
334 tmp = owner_next_frame[0];
335 owner_next_frame[0] = next_frame[0];
345 if (next_frame->
frame != NULL)
420 if (n_used >=
VLIB_FRAME_SIZE || (allocate_new_next_frame && n_used > 0) ||
458 u32 n_before, n_after;
470 ASSERT (n_after >= n_before);
495 u32 n_vectors_in_frame;
562 v1 = v0 + n_vectors_in_frame;
584 r->calls_since_last_overflow = 0;
585 r->vectors_since_last_overflow = 0;
586 r->clocks_since_last_overflow = 0;
636 for (
i = 0;
i <
rt->n_next_nodes;
i++)
652 u32 ca0, ca1, v0, v1, cl0, cl1,
r;
654 cl0 = cl1 =
node->clocks_since_last_overflow;
655 ca0 = ca1 =
node->calls_since_last_overflow;
656 v0 = v1 =
node->vectors_since_last_overflow;
660 cl1 = cl0 + n_clocks;
662 node->calls_since_last_overflow = ca1;
663 node->clocks_since_last_overflow = cl1;
664 node->vectors_since_last_overflow = v1;
666 node->max_clock_n =
node->max_clock > n_clocks ?
668 node->max_clock =
node->max_clock > n_clocks ?
node->max_clock : n_clocks;
674 node->calls_since_last_overflow = ca0;
675 node->clocks_since_last_overflow = cl0;
676 node->vectors_since_last_overflow = v0;
703 .path =
"event-logger clear",
704 .short_help =
"Clear the event log",
715 char *file, *chroot_file;
726 if (strstr (file,
"..") ||
index (file,
'/'))
732 chroot_file = (
char *)
format (0,
"/tmp/%s%c", file, 0);
758 .path =
"event-logger save",
759 .short_help =
"event-logger save <filename> (saves log in /tmp/<filename>)",
778 .path =
"event-logger stop",
779 .short_help =
"Stop the event-logger",
798 .path =
"event-logger restart",
799 .short_help =
"Restart the event-logger",
828 .path =
"event-logger resize",
829 .short_help =
"event-logger resize <nnn>",
851 "running" :
"stopped");
857 if (n_events_to_show == 0)
868 u32 n_events_to_show;
871 n_events_to_show = 250;
874 if (
unformat (input,
"%d", &n_events_to_show))
877 n_events_to_show = ~0;
887 .path =
"show event-logger",
888 .short_help =
"Show event logger info",
940 #if VLIB_BUFFER_TRACE_TRAJECTORY > 0
941 if (
PREDICT_FALSE (
b->trajectory_nb >= VLIB_BUFFER_TRACE_TRAJECTORY_MAX))
970 return last_time_stamp;
974 && dispatch_state != VLIB_NODE_STATE_INTERRUPT)
976 u32 c =
node->input_main_loops_per_call;
980 node->input_main_loops_per_call =
c - 1;
981 return last_time_stamp;
986 if (
node->n_next_nodes > 0)
995 last_time_stamp,
frame ?
frame->n_vectors : 0,
1011 for (
i = 0;
i <
frame->n_vectors;
i++)
1042 t - last_time_stamp);
1051 .function = (
char *) __FUNCTION__,
1052 .
format =
"%s vector length %d, switching to %s",
1053 .format_args =
"T4i4t4",
1054 .n_enum_strings = 2,
1056 "interrupt",
"polling",
1062 u32 node_name, vector_length, is_polling;
1065 if ((dispatch_state == VLIB_NODE_STATE_INTERRUPT
1066 && v >=
nm->polling_threshold_vector_length) &&
1071 n->
state = VLIB_NODE_STATE_POLLING;
1072 node->state = VLIB_NODE_STATE_POLLING;
1076 nm->input_node_counts_by_state[VLIB_NODE_STATE_INTERRUPT] -= 1;
1077 nm->input_node_counts_by_state[VLIB_NODE_STATE_POLLING] += 1;
1088 ed->vector_length = v;
1092 else if (dispatch_state == VLIB_NODE_STATE_POLLING
1093 && v <= nm->interrupt_threshold_vector_length)
1101 n->
state = VLIB_NODE_STATE_INTERRUPT;
1102 node->state = VLIB_NODE_STATE_INTERRUPT;
1105 nm->input_node_counts_by_state[VLIB_NODE_STATE_POLLING] -= 1;
1106 nm->input_node_counts_by_state[VLIB_NODE_STATE_INTERRUPT] += 1;
1121 ed->vector_length = v;
1133 u64 last_time_stamp)
1143 p =
nm->pending_frames + pending_frame_index;
1152 nf = &nf_placeholder;
1163 restore_frame = NULL;
1169 restore_frame = p->
frame;
1185 VLIB_NODE_STATE_POLLING,
1186 f, last_time_stamp);
1197 if (restore_frame != NULL)
1216 p =
nm->pending_frames + pending_frame_index;
1225 if (NULL == nf->
frame)
1228 nf->
frame = restore_frame;
1248 return last_time_stamp;
1343 u32 old_process_index;
1347 if (
node->state != VLIB_NODE_STATE_POLLING
1350 return last_time_stamp;
1354 t = last_time_stamp;
1359 old_process_index =
nm->current_process_index;
1360 nm->current_process_index =
node->runtime_index;
1367 nm->current_process_index = old_process_index;
1386 TWT (tw_timer_wheel) * tw =
1387 (
TWT (tw_timer_wheel) *)
nm->timing_wheel;
1391 (
node->runtime_index) ,
1410 t - last_time_stamp);
1425 uword process_index,
u64 last_time_stamp)
1435 t = last_time_stamp;
1437 p =
vec_elt (
nm->processes, process_index);
1439 return last_time_stamp;
1455 nm->current_process_index =
node->runtime_index;
1463 nm->current_process_index = ~0;
1476 (
node->runtime_index) ,
1499 t - last_time_stamp);
1519 u32 frame_queue_check_counter = 0;
1525 _vec_len (
nm->pending_frames) = 0;
1541 if (!
nm->polling_threshold_vector_length)
1542 nm->polling_threshold_vector_length = 10;
1543 if (!
nm->interrupt_threshold_vector_length)
1544 nm->interrupt_threshold_vector_length = 5;
1562 nm->current_process_index = ~0;
1589 frame_queue_check_counter = 100;
1594 processed += (fn) (
vm, fqm);
1598 frame_queue_check_counter = 100;
1600 frame_queue_check_counter--;
1612 VLIB_NODE_STATE_POLLING,
1620 VLIB_NODE_STATE_POLLING,
1627 if (__atomic_load_n (
nm->pending_interrupts, __ATOMIC_ACQUIRE))
1630 *
nm->pending_interrupts = 0;
1640 VLIB_NODE_STATE_INTERRUPT,
1648 for (
i = 0;
i < _vec_len (
nm->pending_frames);
i++)
1651 _vec_len (
nm->pending_frames) = 0;
1658 .format =
"process tw start",
1663 .format =
"process tw end: %d",
1664 .format_args =
"i4",
1674 ASSERT (
nm->data_from_advancing_timing_wheel != 0);
1679 nm->data_from_advancing_timing_wheel =
1682 nm->data_from_advancing_timing_wheel);
1684 ASSERT (
nm->data_from_advancing_timing_wheel != 0);
1690 _vec_len (
nm->data_from_advancing_timing_wheel);
1694 (_vec_len (
nm->data_from_advancing_timing_wheel) > 0))
1698 for (
i = 0;
i < _vec_len (
nm->data_from_advancing_timing_wheel);
1701 u32 d =
nm->data_from_advancing_timing_wheel[
i];
1728 pool_put (
nm->signal_timed_event_data_pool, te);
1737 _vec_len (
nm->data_from_advancing_timing_wheel) = 0;
1752 f64 this_loops_per_second;
1754 this_loops_per_second =
1816 filename =
format (0,
"/tmp/elog_post_mortem.%d%c", getpid (), 0);
1829 int turn_on_mem_trace = 0;
1833 if (
unformat (input,
"memory-trace"))
1834 turn_on_mem_trace = 1;
1836 else if (
unformat (input,
"elog-events %d",
1840 else if (
unformat (input,
"elog-post-mortem-dump"))
1843 else if (
unformat (input,
"buffer-alloc-success-rate %f",
1846 if (VLIB_BUFFER_ALLOC_FAULT_INJECTOR == 0)
1848 (0,
"Buffer fault injection not configured");
1850 else if (
unformat (input,
"buffer-alloc-success-seed %u",
1853 if (VLIB_BUFFER_ALLOC_FAULT_INJECTOR == 0)
1855 (0,
"Buffer fault injection not configured");
1864 if (turn_on_mem_trace)
1877 #define foreach_weak_reference_stub \
1878 _(vlib_map_stat_segment_init) \
1880 _(vlibmemory_init) \
1881 _(map_api_segment_init)
1884 clib_error_t *name (vlib_main_t *vm) __attribute__((weak)); \
1885 clib_error_t *name (vlib_main_t *vm) { return 0; }
2008 _vec_len (
nm->data_from_advancing_timing_wheel) = 0;
2022 if (VLIB_BUFFER_ALLOC_FAULT_INJECTOR > 0)
clib_error_t * vlib_sort_init_exit_functions(_vlib_init_function_list_elt_t **head)
Topological sorter for init function chains.
static vlib_frame_t * vlib_get_frame(vlib_main_t *vm, vlib_frame_t *f)
void vlib_node_sync_stats(vlib_main_t *vm, vlib_node_t *n)
uword clib_calljmp(uword(*func)(uword func_arg), uword func_arg, void *stack)
static void vlib_process_sync_stats(vlib_main_t *vm, vlib_process_t *p, uword n_calls, uword n_vectors, uword n_clocks)
void vlib_add_del_post_mortem_callback(void *cb, int is_add)
__clib_export void elog_alloc(elog_main_t *em, u32 n_events)
static u32 vlib_frame_bytes(u32 n_scalar_bytes, u32 n_vector_bytes)
#define VLIB_PROCESS_RESUME_PENDING
u16 flags
Copy of main node flags.
static void elog_reset_buffer(elog_main_t *em)
Reset the event buffer.
void vlib_worker_thread_barrier_release(vlib_main_t *vm)
clib_random_buffer_t random_buffer
static clib_error_t * elog_show_buffer(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
f64 time
Absolute time as floating point number in seconds.
#define hash_set(h, key, value)
static vlib_cli_command_t elog_save_cli
(constructor) VLIB_CLI_COMMAND (elog_save_cli)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
static uword vlib_timing_wheel_data_is_timed_event(u32 d)
static clib_error_t * show_frame_stats(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_FRAME_NO_FREE_AFTER_DISPATCH
static vlib_cli_command_t elog_restart_cli
(constructor) VLIB_CLI_COMMAND (elog_restart_cli)
elog_main_t * vlib_get_elog_main_not_inline()
nat44_ei_hairpin_src_next_t next_index
@ VLIB_NODE_TYPE_PRE_INPUT
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
#define VLIB_MAIN_LOOP_EXIT_NONE
static_always_inline void vlib_process_finish_switch_stack(vlib_main_t *vm)
static uword pointer_to_uword(const void *p)
#define VLIB_INVALID_NODE_INDEX
#define VLIB_NODE_FLAG_FRAME_NO_FREE_AFTER_DISPATCH
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static f64 clib_time_now_internal(clib_time_t *c, u64 n)
static void vlib_worker_thread_barrier_check(void)
void vlib_exit_with_status(vlib_main_t *vm, int status)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
@ VLIB_NODE_TYPE_INTERNAL
u32 n_total_events_disable_limit
When count reaches limit logging is disabled.
vlib_node_function_t * dispatch_wrapper_fn
static_always_inline int clib_interrupt_get_next(void *in, int last)
elog_time_stamp_t init_time
Timestamps.
vlib_main_t vlib_node_runtime_t * node
static u32 vlib_node_runtime_update_main_loop_vector_stats(vlib_main_t *vm, vlib_node_runtime_t *node, uword n_vectors)
static vlib_cli_command_t elog_stop_cli
(constructor) VLIB_CLI_COMMAND (elog_stop_cli)
__clib_export u32 *TW() tw_timer_expire_timers_vec(TWT(tw_timer_wheel) *tw, f64 now, u32 *vec)
uword clib_setjmp(clib_longjmp_t *save, uword return_value_not_taken)
#define clib_error_return(e, args...)
static uword vlib_process_stack_is_valid(vlib_process_t *p)
static vlib_frame_t * vlib_frame_alloc_to_node(vlib_main_t *vm, u32 to_node_index, u32 frame_flags)
void vlib_node_runtime_sync_stats_node(vlib_node_t *n, vlib_node_runtime_t *r, uword n_calls, uword n_vectors, uword n_clocks)
vlib_main_t * vlib_get_main_not_inline(void)
static void validate_frame_magic(vlib_main_t *vm, vlib_frame_t *f, vlib_node_t *n, uword next_index)
#define VLIB_PROCESS_RESUME_LONGJMP_RESUME
elog_event_type_t * node_call_elog_event_types
void vlib_register_all_node_march_variants(vlib_main_t *vm)
vlib_node_main_t node_main
static void vlib_next_frame_change_ownership(vlib_main_t *vm, vlib_node_runtime_t *node_runtime, u32 next_index)
clib_error_t * vlib_call_all_main_loop_exit_functions(vlib_main_t *vm)
#define pool_put(P, E)
Free an object E in pool P.
__clib_export u8 * format_elog_event(u8 *s, va_list *va)
void vl_api_send_pending_rpc_requests(vlib_main_t *)
u32 elog_trace_graph_circuit_node_index
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
void(* queue_signal_callback)(struct vlib_main_t *)
#define foreach_weak_reference_stub
@ VLIB_NODE_RUNTIME_PERF_BEFORE
vlib_node_runtime_t node_runtime
static u64 dispatch_process(vlib_main_t *vm, vlib_process_t *p, vlib_frame_t *f, u64 last_time_stamp)
#define VLIB_NODE_FLAG_ADAPTIVE_MODE
__clib_export u32 clib_get_current_cpu_id()
u8 inline_event_data[64 - 3 *sizeof(u32) - 2 *sizeof(u16)]
void vlib_worker_loop(vlib_main_t *vm)
#define clib_error_report(e)
__clib_export void clib_random_buffer_init(clib_random_buffer_t *b, uword seed)
static void * vlib_process_signal_event_helper(vlib_node_main_t *nm, vlib_node_t *n, vlib_process_t *p, uword t, uword n_data_elts, uword n_data_elt_bytes)
vnet_hw_if_output_node_runtime_t * r
static vlib_cli_command_t show_frame_stats_cli
(constructor) VLIB_CLI_COMMAND (show_frame_stats_cli)
#define VLIB_PROCESS_RETURN_LONGJMP_SUSPEND
vlib_worker_thread_t * vlib_worker_threads
elog_event_type_t * node_return_elog_event_types
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
void vlib_start_process(vlib_main_t *vm, uword process_index)
#define pool_put_index(p, i)
Free pool element with given index.
volatile u32 queue_signal_pending
volatile uword check_frame_queues
static vlib_global_main_t * vlib_get_global_main(void)
int vl_api_get_elog_trace_api_messages(void)
#define VLIB_EARLY_CONFIG_FUNCTION(x, n,...)
static void elog_show_buffer_internal(vlib_main_t *vm, u32 n_events_to_show)
f64 buffer_alloc_success_rate
void vlib_register_all_static_nodes(vlib_main_t *vm)
u16 thread_index
thread this node runs on
static uword max_log2(uword x)
clib_error_t * main_loop_error
#define vec_elt(v, i)
Get vector value at index i.
vlib_next_frame_t * next_frames
void clib_longjmp(clib_longjmp_t *save, uword return_value)
static uword elog_buffer_capacity(elog_main_t *em)
Return number of events which can fit in the event buffer.
u64 loops_this_reporting_interval
uword * processing_rpc_requests
static uword round_pow2(uword x, uword pow2)
#define CLIB_PREFETCH(addr, size, type)
#define vec_alloc_aligned(V, N, A)
Allocate space for N more elements (no header, given alignment)
static clib_error_t * elog_stop(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static vlib_cli_command_t elog_show_cli
(constructor) VLIB_CLI_COMMAND (elog_show_cli)
static void elog_track(elog_main_t *em, elog_event_type_t *type, elog_track_t *track, u32 data)
Log a single-datum event to a specific track, non-inline version.
u32 buffer_alloc_success_seed
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define ELOG_TYPE_DECLARE(f)
vlib_buffer_func_main_t vlib_buffer_func_main
#define VLIB_FRAME_FREE_AFTER_DISPATCH
int elog_trace_graph_dispatch
volatile u32 main_loop_exit_now
u32 n_total_events
Total number of events in buffer.
#define vec_add2(V, P, N)
Add N elements to end of vector V, return pointer to new elements in P.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
static_always_inline void clib_interrupt_clear(void *in, int int_num)
u64 cpu
CPU cycle counter.
#define ELOG_TRACK_DATA(em, f, track)
static void elog_post_mortem_dump(void)
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
u32 vectors_since_last_overflow
#define VLIB_NODE_FLAG_TRACE
#define vlib_worker_thread_barrier_sync(X)
static u64 dispatch_suspended_process(vlib_main_t *vm, uword process_index, u64 last_time_stamp)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
u32 main_loop_vectors_processed
clib_error_t * vlib_node_main_init(vlib_main_t *vm)
vlib_global_main_t vlib_global_main
clib_error_t * map_api_segment_init(vlib_main_t *vm)
#define VLIB_MAIN_LOOP_EXIT_CLI
#define static_always_inline
static vlib_process_t * vlib_get_process_from_node(vlib_main_t *vm, vlib_node_t *node)
u32 internal_node_last_vectors_per_main_loop
#define VLIB_BUFFER_TRACE_TRAJECTORY
Compile time buffer trajectory tracing option Turn this on if you run into "bad monkey" contexts,...
#define VLIB_FRAME_IS_ALLOCATED
static u32 vlib_timing_wheel_data_set_suspended_process(u32 i)
#define VLIB_NODE_FLAG_SWITCH_FROM_INTERRUPT_TO_POLLING_MODE
void(** post_mortem_callbacks)(void)
static u32 vlib_frame_vector_byte_offset(u32 scalar_size)
vlib_frame_t ** free_frames
elog_track_t default_track
Default track.
uword event_ring_size
Power of 2 number of elements in ring.
#define VLIB_PROCESS_STACK_MAGIC
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
static elog_main_t * vlib_get_elog_main()
int vl_api_set_elog_trace_api_messages(int enable)
u64 cpu_time_last_node_dispatch
static_always_inline void vlib_process_start_switch_stack(vlib_main_t *vm, vlib_process_t *p)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
__clib_export void TW() tw_timer_wheel_init(TWT(tw_timer_wheel) *tw, void *expired_timer_callback, f64 timer_interval_in_seconds, u32 max_expirations)
Initialize a tw timer wheel template instance.
static_always_inline void vlib_main_or_worker_loop(vlib_main_t *vm, int is_main)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
static void vlib_process_update_stats(vlib_main_t *vm, vlib_process_t *p, uword n_calls, uword n_vectors, uword n_clocks)
#define VLIB_CLI_COMMAND(x,...)
static vlib_frame_t * vlib_frame_alloc(vlib_main_t *vm, vlib_node_runtime_t *from_node_runtime, u32 to_next_index)
uword * pending_rpc_requests
static vlib_cli_command_t elog_resize_cli
(constructor) VLIB_CLI_COMMAND (elog_resize_cli)
static vlib_frame_size_t * get_frame_size_info(vlib_node_main_t *nm, u32 n_scalar_bytes, u32 n_vector_bytes)
__clib_export u32 clib_get_current_numa_node()
u8 *(* validate_frame)(struct vlib_main_t *vm, struct vlib_node_runtime_t *, struct vlib_frame_t *f)
static_always_inline void os_set_numa_index(uword numa_index)
static uword vlib_timing_wheel_data_get_index(u32 d)
#define clib_mem_alloc_aligned_no_fail(size, align)
#define CLIB_CACHE_LINE_BYTES
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
void vlib_frame_free(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_frame_t *f)
clib_error_t * vlib_call_all_config_functions(vlib_main_t *vm, unformat_input_t *input, int is_early)
static clib_error_t * elog_save_buffer(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_FRAME_SIZE_EXTRA
static vlib_cli_command_t elog_clear_cli
(constructor) VLIB_CLI_COMMAND (elog_clear_cli)
int elog_trace_graph_circuit
static vlib_node_t * vlib_get_next_node(vlib_main_t *vm, u32 node_index, u32 next_index)
Get vlib node by graph arc (next) index.
#define vec_free(V)
Free vector's memory (no header).
static uword elog_is_enabled(elog_main_t *em)
event logging enabled predicate
__clib_export void elog_resize(elog_main_t *em, u32 n_events)
u32 node_index
Node index.
__clib_export u32 TW() tw_timer_start(TWT(tw_timer_wheel) *tw, u32 user_id, u32 timer_id, u64 interval)
Start a Tw Timer.
clib_error_t * vlib_call_all_init_functions(vlib_main_t *vm)
volatile int main_loop_exit_status
static vlib_next_frame_t * vlib_node_get_next_frame(vlib_main_t *vm, u32 node_index, u32 next_index)
Get pointer to frame by (node_index, next_index).
clib_error_t * vlib_physmem_init(vlib_main_t *vm)
#define clib_call_callbacks(h,...)
call the specified callback set
static clib_error_t * elog_restart(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
description fragment has unexpected format
#define VLIB_PROCESS_IS_SUSPENDED_WAITING_FOR_EVENT
void vlib_post_mortem_dump(void)
#define VLIB_FRAME_NO_APPEND
static clib_error_t * elog_write_file(elog_main_t *em, char *clib_file, int flush_ring)
vlib_node_stats_t stats_total
static vlib_main_t * vlib_get_first_main(void)
vlib_node_runtime_t * nodes_by_type[VLIB_N_NODE_TYPE]
void vlib_gdb_show_event_log(void)
#define vec_foreach(var, vec)
Vector iterator.
clib_error_t * vpe_api_init(vlib_main_t *vm)
static u64 dispatch_pending_node(vlib_main_t *vm, uword pending_frame_index, u64 last_time_stamp)
static void placeholder_queue_signal_callback(vlib_main_t *vm)
u8 * event_data_as_vector
static void vlib_validate_frame_indices(vlib_frame_t *f)
clib_error_t * vlibmemory_init(vlib_main_t *vm)
static u32 * vlib_frame_find_magic(vlib_frame_t *f, vlib_node_t *node)
#define VLIB_PROCESS_IS_SUSPENDED_WAITING_FOR_CLOCK
static void vlib_put_next_frame_validate(vlib_main_t *vm, vlib_node_runtime_t *rt, u32 next_index, u32 n_vectors_left)
void vlib_node_runtime_sync_stats(vlib_main_t *vm, vlib_node_runtime_t *r, uword n_calls, uword n_vectors, uword n_clocks)
static uword vlib_process_bootstrap(uword _a)
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
#define vec_resize(V, N)
Resize a vector (no header, unspecified alignment) Add N elements to end of given vector V,...
void vlib_worker_thread_initial_barrier_sync_and_release(vlib_main_t *vm)
static clib_error_t * vlib_main_configure(vlib_main_t *vm, unformat_input_t *input)
u64 internal_node_vectors
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
u64 * n_vectors_by_next_node
#define VLIB_FRAME_PENDING
clib_error_t * vlib_map_stat_segment_init(void)
static vlib_main_t * vlib_get_main(void)
vnet_interface_output_runtime_t * rt
u64 resume_clock_interval
u32 main_loop_nodes_processed
#define uword_to_pointer(u, type)
static void vlib_increment_main_loop_counter(vlib_main_t *vm)
_vlib_init_function_list_elt_t * worker_init_function_registrations
static_always_inline uword vlib_process_startup(vlib_main_t *vm, vlib_process_t *p, vlib_frame_t *f)
static clib_error_t * vlib_cli_elog_clear(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
u32 suspended_process_frame_index
#define clib_warning(format, args...)
clib_error_t * vlib_call_all_main_loop_enter_functions(vlib_main_t *vm)
static void * clib_mem_alloc_aligned(uword size, uword align)
static_always_inline uword vlib_process_resume(vlib_main_t *vm, vlib_process_t *p)
vlib_pending_frame_t * pending_frames
void(**volatile worker_thread_main_loop_callbacks)(struct vlib_main_t *, u64 t)
clib_longjmp_t resume_longjmp
uword * init_functions_called
u32() vlib_frame_queue_dequeue_fn_t(vlib_main_t *vm, vlib_frame_queue_main_t *fqm)
static f64 vlib_time_now(vlib_main_t *vm)
int vlib_main(vlib_main_t *volatile vm, unformat_input_t *input)
vlib_frame_queue_dequeue_fn_t * frame_queue_dequeue_fn
static_always_inline u64 dispatch_node(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_node_type_t type, vlib_node_state_t dispatch_state, vlib_frame_t *frame, u64 last_time_stamp)
#define VLIB_PROCESS_IS_RUNNING
clib_error_t * vlib_buffer_main_init(struct vlib_main_t *vm)
static u32 vlib_node_runtime_update_stats(vlib_main_t *vm, vlib_node_runtime_t *node, uword n_calls, uword n_vectors, uword n_clocks)
static void add_trajectory_trace(vlib_buffer_t *b, u32 node_index)
static u64 clib_cpu_time_now(void)
static vlib_thread_main_t * vlib_get_thread_main()
#define hash_create(elts, value_bytes)
__clib_export elog_event_t * elog_peek_events(elog_main_t *em)
convert event ring events to events, and return them as a vector.
vlib_frame_queue_main_t * frame_queue_mains
@ VLIB_NODE_RUNTIME_PERF_AFTER
clib_error_t * vlib_thread_init(vlib_main_t *vm)
clib_longjmp_t return_longjmp
u64 cpu_time_main_loop_start
#define VLIB_PROCESS_RETURN_LONGJMP_RETURN
clib_longjmp_t main_loop_exit
#define VLIB_PENDING_FRAME_NO_NEXT_FRAME
void clib_mem_trace(int enable)
vl_api_fib_path_type_t type
static vlib_next_frame_t * vlib_node_runtime_get_next_frame(vlib_main_t *vm, vlib_node_runtime_t *n, u32 next_index)
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
#define vec_del1(v, i)
Delete the element at index I.
static clib_error_t * elog_resize_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static uword elog_n_events_in_buffer(elog_main_t *em)
Return number of events in the event-log buffer.
static void vlib_main_loop(vlib_main_t *vm)
vlib_frame_t * vlib_get_next_frame_internal(vlib_main_t *vm, vlib_node_runtime_t *node, u32 next_index, u32 allocate_new_next_frame)
void vl_api_set_elog_main(elog_main_t *m)
static void vlib_elog_main_loop_event(vlib_main_t *vm, u32 node_index, u64 time, u32 n_vectors, u32 is_return)
VLIB buffer representation.
#define VLIB_NODE_FLAG_SWITCH_FROM_POLLING_TO_INTERRUPT_MODE
vl_api_wireguard_peer_flags_t flags