40 #ifndef included_vlib_node_h 41 #define included_vlib_node_h 76 typedef struct _vlib_node_registration {
93 char ** error_strings;
112 u16 process_log2_n_stack_bytes;
115 u8 runtime_data_bytes;
133 struct _vlib_node_registration * next_registration;
140 #define VLIB_REGISTER_NODE(x,...) \ 141 __VA_ARGS__ vlib_node_registration_t x; \ 142 static void __vlib_add_node_registration_##x (void) \ 143 __attribute__((__constructor__)) ; \ 144 static void __vlib_add_node_registration_##x (void) \ 146 vlib_main_t * vm = vlib_get_main(); \ 147 x.next_registration = vm->node_main.node_registrations; \ 148 vm->node_main.node_registrations = &x; \ 150 __VA_ARGS__ vlib_node_registration_t x 166 #define foreach_vlib_node_state \ 176 #define _(f) VLIB_NODE_STATE_##f, 216 #define VLIB_NODE_FLAG_FRAME_NO_FREE_AFTER_DISPATCH (1 << 0) 219 #define VLIB_NODE_FLAG_IS_OUTPUT (1 << 1) 220 #define VLIB_NODE_FLAG_IS_DROP (1 << 2) 221 #define VLIB_NODE_FLAG_IS_PUNT (1 << 3) 222 #define VLIB_NODE_FLAG_IS_HANDOFF (1 << 4) 225 #define VLIB_NODE_FLAG_TRACE (1 << 5) 227 #define VLIB_NODE_FLAG_SWITCH_FROM_INTERRUPT_TO_POLLING_MODE (1 << 6) 228 #define VLIB_NODE_FLAG_SWITCH_FROM_POLLING_TO_INTERRUPT_MODE (1 << 7) 289 #define VLIB_INVALID_NODE_INDEX ((u32) ~0) 292 #define VLIB_FRAME_SIZE 256 293 #define VLIB_FRAME_ALIGN VLIB_MAX_CPUS 327 #define VLIB_FRAME_NO_FREE_AFTER_DISPATCH \ 328 VLIB_NODE_FLAG_FRAME_NO_FREE_AFTER_DISPATCH 332 #define VLIB_FRAME_OWNER (1 << 15) 335 #define VLIB_FRAME_IS_ALLOCATED VLIB_NODE_FLAG_IS_OUTPUT 338 #define VLIB_FRAME_PENDING VLIB_NODE_FLAG_IS_DROP 341 #define VLIB_FRAME_FREE_AFTER_DISPATCH VLIB_NODE_FLAG_IS_PUNT 344 #define VLIB_FRAME_TRACE VLIB_NODE_FLAG_TRACE 353 memset (nf, 0,
sizeof (nf[0]));
370 #define VLIB_PENDING_FRAME_NO_NEXT_FRAME ((u32) ~0) 409 u32 main_loop_vector_stats[2];
428 uword runtime_data[(128
455 #define VLIB_PROCESS_RETURN_LONGJMP_RETURN ((uword) ~0 - 0) 456 #define VLIB_PROCESS_RETURN_LONGJMP_SUSPEND ((uword) ~0 - 1) 460 #define VLIB_PROCESS_RESUME_LONGJMP_SUSPEND 0 461 #define VLIB_PROCESS_RESUME_LONGJMP_RESUME 1 464 #define VLIB_PROCESS_IS_SUSPENDED_WAITING_FOR_CLOCK (1 << 0) 465 #define VLIB_PROCESS_IS_SUSPENDED_WAITING_FOR_EVENT (1 << 1) 467 #define VLIB_PROCESS_RESUME_PENDING (1 << 2) 470 #define VLIB_PROCESS_IS_RUNNING (1 << 3) 506 #define PAGE_SIZE_MULTIPLE 0x1000 507 #define ALIGN_ON_MULTIPLE_PAGE_BOUNDARY_FOR_MPROTECT __attribute__ ((aligned (PAGE_SIZE_MULTIPLE))) 509 #define ALIGN_ON_MULTIPLE_PAGE_BOUNDARY_FOR_MPROTECT 515 #define VLIB_PROCESS_STACK_MAGIC (0xdead7ead) 545 u8 inline_event_data[64 - 3 *
sizeof (
u32) - 2 *
sizeof (
u16)];
576 #define VLIB_NODE_MAIN_RUNTIME_STARTED (1 << 0)
uword output_function_arg
uword( vlib_node_function_t)(struct vlib_main_t *vm, struct vlib_node_runtime_t *node, struct vlib_frame_t *frame)
struct vlib_node_t vlib_node_t
sll srl srl sll sra u16x4 i
u32 interrupt_threshold_vector_length
vlib_process_t ** processes
vlib_node_runtime_t node_runtime
always_inline uword vlib_timing_wheel_data_is_timed_event(u32 d)
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
format_function_t * format_trace
void ** pending_event_data_by_type_index
u32 current_process_index
u64 cpu_time_next_process_ready
struct _vlib_node_registration vlib_node_registration_t
u32 clocks_since_last_overflow
u8 * event_data_as_vector
always_inline u32 vlib_timing_wheel_data_set_timed_event(u32 i)
u32 * pending_interrupt_node_runtime_indices
u32 input_main_loops_per_call
vlib_node_stats_t stats_last_clear
u32 main_loop_count_last_dispatch
always_inline uword vlib_timing_wheel_data_get_index(u32 d)
void ** recycled_event_data_vectors
u32 vectors_since_last_overflow
always_inline void vlib_next_frame_init(vlib_next_frame_t *nf)
u32 calls_since_last_overflow
vlib_node_stats_t stats_total
vlib_signal_timed_event_data_t * signal_timed_event_data_pool
f64 time_last_runtime_stats_clear
vlib_node_registration_t * node_registrations
u32 polling_threshold_vector_length
u64 * n_vectors_by_next_node
format_function_t * format_buffer
#define foreach_vlib_node_state
timing_wheel_t timing_wheel
vlib_pending_frame_t * pending_frames
unformat_function_t * unformat_buffer
u32 stack[0] ALIGN_ON_MULTIPLE_PAGE_BOUNDARY_FOR_MPROTECT
struct vlib_node_runtime_t vlib_node_runtime_t
always_inline u32 vlib_timing_wheel_data_set_suspended_process(u32 i)
uword * one_time_event_type_bitmap
#define clib_elf_section_data_next(a, extra)
struct vlib_frame_t vlib_frame_t
void( vlib_cli_output_function_t)(uword arg, u8 *buffer, uword buffer_bytes)
vhost_vring_state_t state
uword * next_slot_by_node
#define PAGE_SIZE_MULTIPLE
char assert_process_stack_must_be_aligned_exactly_to_page_size_multiple[(sizeof(vlib_process_t)-PAGE_SIZE_MULTIPLE)==0?0:-1]
vlib_process_event_type_t * event_type_pool
u32 * data_from_advancing_timing_wheel
vlib_pending_frame_t * suspended_process_frames
vlib_next_frame_t * next_frames
uword * event_type_index_by_type_opaque
vlib_frame_size_t * frame_sizes
u32 suspended_process_frame_index
always_inline vlib_node_registration_t * vlib_node_next_registered(vlib_node_registration_t *c)
clib_longjmp_t return_longjmp
vlib_cli_output_function_t * output_function
clib_longjmp_t resume_longjmp
#define CLIB_CACHE_LINE_BYTES
u32 vectors_since_last_overflow
uword * non_empty_event_type_bitmap