FD.io VPP  v21.01.1
Vector Packet Processing
main.h File Reference
+ Include dependency graph for main.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  vnet_pcap_t
 
struct  vlib_trace_filter_t
 
struct  vlib_node_runtime_perf_callback_args_t
 
struct  vlib_node_runtime_perf_callback_data_t
 
struct  vlib_main_t
 
struct  vlib_pcap_dispatch_trace_args_t
 

Macros

#define VLIB_ELOG_MAIN_LOOP   0
 
#define VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE   7
 
#define VLIB_MAIN_LOOP_EXIT_NONE   0
 
#define VLIB_MAIN_LOOP_EXIT_PANIC   1
 
#define VLIB_MAIN_LOOP_EXIT_CLI   2
 
#define vlib_time_code(vm, body)
 
#define vlib_wait_with_timeout(vm, suspend_time, timeout_time, test)
 
#define vlib_panic_with_msg(vm, args...)   vlib_panic_with_error (vm, clib_error_return (0, args))
 
#define VLIB_PCAP_MAJOR_VERSION   1
 
#define VLIB_PCAP_MINOR_VERSION   0
 

Typedefs

typedef 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)
 
typedef struct vlib_node_runtime_perf_callback_data_t vlib_node_runtime_perf_callback_data_t
 
typedef struct vlib_main_t vlib_main_t
 

Enumerations

enum  vlib_node_runtime_perf_call_type_t { VLIB_NODE_RUNTIME_PERF_BEFORE, VLIB_NODE_RUNTIME_PERF_AFTER, VLIB_NODE_RUNTIME_PERF_RESET }
 

Functions

 clib_callback_data_typedef (vlib_node_runtime_perf_callback_set_t, vlib_node_runtime_perf_callback_data_t)
 
void vlib_worker_loop (vlib_main_t *vm)
 
static f64 vlib_time_now (vlib_main_t *vm)
 
static f64 vlib_time_now_ticks (vlib_main_t *vm, u64 n)
 
static void vlib_time_wait (vlib_main_t *vm, f64 wait)
 
static void vlib_panic_with_error (vlib_main_t *vm, clib_error_t *error)
 
static void vlib_panic (vlib_main_t *vm)
 
static f64 vlib_internal_node_vector_rate (vlib_main_t *vm)
 
static void vlib_clear_internal_node_vector_rate (vlib_main_t *vm)
 
static void vlib_increment_main_loop_counter (vlib_main_t *vm)
 
static u32 vlib_last_vectors_per_main_loop (vlib_main_t *vm)
 
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)
 
static void vlib_set_queue_signal_callback (vlib_main_t *vm, void(*fp)(vlib_main_t *))
 
int vlib_main (vlib_main_t *vm, unformat_input_t *input)
 
u32 vlib_app_num_thread_stacks_needed (void)
 
void vlib_node_sync_stats (vlib_main_t *vm, vlib_node_t *n)
 
int vlib_pcap_dispatch_trace_configure (vlib_pcap_dispatch_trace_args_t *)
 
vlib_main_tvlib_get_main_not_inline (void)
 
elog_main_tvlib_get_elog_main_not_inline ()
 

Variables

vlib_main_t vlib_global_main
 
u8 ** vlib_thread_stacks
 

Macro Definition Documentation

◆ VLIB_ELOG_MAIN_LOOP

#define VLIB_ELOG_MAIN_LOOP   0

Definition at line 59 of file main.h.

◆ VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE

#define VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE   7

Definition at line 154 of file main.h.

◆ VLIB_MAIN_LOOP_EXIT_CLI

#define VLIB_MAIN_LOOP_EXIT_CLI   2

Definition at line 164 of file main.h.

◆ VLIB_MAIN_LOOP_EXIT_NONE

#define VLIB_MAIN_LOOP_EXIT_NONE   0

Definition at line 161 of file main.h.

◆ VLIB_MAIN_LOOP_EXIT_PANIC

#define VLIB_MAIN_LOOP_EXIT_PANIC   1

Definition at line 162 of file main.h.

◆ vlib_panic_with_msg

#define vlib_panic_with_msg (   vm,
  args... 
)    vlib_panic_with_error (vm, clib_error_return (0, args))

Definition at line 392 of file main.h.

◆ VLIB_PCAP_MAJOR_VERSION

#define VLIB_PCAP_MAJOR_VERSION   1

Definition at line 479 of file main.h.

◆ VLIB_PCAP_MINOR_VERSION

#define VLIB_PCAP_MINOR_VERSION   0

Definition at line 480 of file main.h.

◆ vlib_time_code

#define vlib_time_code (   vm,
  body 
)
Value:
do { \
f64 _t[2]; \
_t[0] = vlib_time_now (vm); \
do { body; } while (0); \
_t[1] = vlib_time_now (vm); \
clib_warning ("%.7e", _t[1] - _t[0]); \
} while (0)
static f64 vlib_time_now(vlib_main_t *vm)
Definition: main.h:334
vlib_main_t * vm
Definition: in2out_ed.c:1580

Definition at line 363 of file main.h.

◆ vlib_wait_with_timeout

#define vlib_wait_with_timeout (   vm,
  suspend_time,
  timeout_time,
  test 
)
Value:
({ \
uword __vlib_wait_with_timeout = 0; \
f64 __vlib_wait_time = 0; \
while (! (__vlib_wait_with_timeout = (test)) \
&& __vlib_wait_time < (timeout_time)) \
{ \
vlib_process_suspend (vm, suspend_time); \
__vlib_wait_time += suspend_time; \
} \
__vlib_wait_with_timeout; \
})
vlib_main_t * vm
Definition: in2out_ed.c:1580

Definition at line 372 of file main.h.

Typedef Documentation

◆ vlib_main_t

typedef struct vlib_main_t vlib_main_t

◆ vlib_node_runtime_perf_callback_data_t

◆ vlib_node_runtime_perf_callback_fp_t

typedef 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)

Definition at line 103 of file main.h.

Enumeration Type Documentation

◆ vlib_node_runtime_perf_call_type_t

Enumerator
VLIB_NODE_RUNTIME_PERF_BEFORE 
VLIB_NODE_RUNTIME_PERF_AFTER 
VLIB_NODE_RUNTIME_PERF_RESET 

Definition at line 83 of file main.h.

Function Documentation

◆ clib_callback_data_typedef()

clib_callback_data_typedef ( vlib_node_runtime_perf_callback_set_t  ,
vlib_node_runtime_perf_callback_data_t   
)

◆ vlib_app_num_thread_stacks_needed()

u32 vlib_app_num_thread_stacks_needed ( void  )

Definition at line 460 of file main.c.

+ Here is the caller graph for this function:

◆ vlib_clear_internal_node_vector_rate()

static void vlib_clear_internal_node_vector_rate ( vlib_main_t vm)
inlinestatic

Definition at line 419 of file main.h.

+ Here is the caller graph for this function:

◆ vlib_get_elog_main_not_inline()

elog_main_t* vlib_get_elog_main_not_inline ( )

Definition at line 2588 of file main.c.

◆ vlib_get_main_not_inline()

vlib_main_t* vlib_get_main_not_inline ( void  )

Definition at line 2582 of file main.c.

+ Here is the call graph for this function:

◆ vlib_increment_main_loop_counter()

static void vlib_increment_main_loop_counter ( vlib_main_t vm)
inlinestatic

Definition at line 426 of file main.h.

+ Here is the call graph for this function:

◆ vlib_internal_node_vector_rate()

static f64 vlib_internal_node_vector_rate ( vlib_main_t vm)
inlinestatic

Definition at line 403 of file main.h.

+ Here is the caller graph for this function:

◆ vlib_last_vectors_per_main_loop()

static u32 vlib_last_vectors_per_main_loop ( vlib_main_t vm)
inlinestatic

Definition at line 436 of file main.h.

+ Here is the caller graph for this function:

◆ vlib_main()

int vlib_main ( vlib_main_t vm,
unformat_input_t input 
)

Definition at line 2130 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_node_runtime_perf_counter()

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 
)
inlinestatic

Definition at line 442 of file main.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_node_sync_stats()

void vlib_node_sync_stats ( vlib_main_t vm,
vlib_node_t n 
)

Definition at line 599 of file main.c.

+ Here is the caller graph for this function:

◆ vlib_panic()

static void vlib_panic ( vlib_main_t vm)
inlinestatic

Definition at line 396 of file main.h.

+ Here is the call graph for this function:

◆ vlib_panic_with_error()

static void vlib_panic_with_error ( vlib_main_t vm,
clib_error_t error 
)
inlinestatic

Definition at line 386 of file main.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_pcap_dispatch_trace_configure()

int vlib_pcap_dispatch_trace_configure ( vlib_pcap_dispatch_trace_args_t )

Definition at line 2296 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_set_queue_signal_callback()

static void vlib_set_queue_signal_callback ( vlib_main_t vm,
void(*)(vlib_main_t *)  fp 
)
inlinestatic

Definition at line 463 of file main.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_time_now()

static f64 vlib_time_now ( vlib_main_t vm)
inlinestatic

Definition at line 334 of file main.h.

◆ vlib_time_now_ticks()

static f64 vlib_time_now_ticks ( vlib_main_t vm,
u64  n 
)
inlinestatic

Definition at line 347 of file main.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_time_wait()

static void vlib_time_wait ( vlib_main_t vm,
f64  wait 
)
inlinestatic

Definition at line 354 of file main.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ vlib_worker_loop()

void vlib_worker_loop ( vlib_main_t vm)

Definition at line 2036 of file main.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ vlib_global_main

vlib_main_t vlib_global_main

Definition at line 2041 of file main.c.

◆ vlib_thread_stacks

u8** vlib_thread_stacks

Definition at line 658 of file main.c.