FD.io VPP  v16.06
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  vlib_main_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))
 

Typedefs

typedef struct vlib_main_t vlib_main_t
 

Functions

always_inline f64 vlib_time_now (vlib_main_t *vm)
 
always_inline f64 vlib_time_now_ticks (vlib_main_t *vm, u64 n)
 
always_inline void vlib_time_wait (vlib_main_t *vm, f64 wait)
 
always_inline void vlib_panic_with_error (vlib_main_t *vm, clib_error_t *error)
 
always_inline void vlib_panic (vlib_main_t *vm)
 
always_inline u32 vlib_vector_input_stats_index (vlib_main_t *vm, word delta)
 
always_inline u32 vlib_last_vectors_per_main_loop (vlib_main_t *vm)
 
always_inline f64 vlib_last_vectors_per_main_loop_as_f64 (vlib_main_t *vm)
 
always_inline f64 vlib_last_vector_length_per_node (vlib_main_t *vm)
 
always_inline void vlib_increment_main_loop_counter (vlib_main_t *vm)
 
always_inline 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)
 

Variables

vlib_main_t vlib_global_main
 
u32 wraps
 
u8 ** vlib_thread_stacks
 

Macro Definition Documentation

#define VLIB_ELOG_MAIN_LOOP   0

Definition at line 56 of file main.h.

#define VLIB_LOG2_MAIN_LOOPS_PER_STATS_UPDATE   7

Definition at line 83 of file main.h.

#define VLIB_MAIN_LOOP_EXIT_CLI   2

Definition at line 91 of file main.h.

#define VLIB_MAIN_LOOP_EXIT_NONE   0

Definition at line 88 of file main.h.

#define VLIB_MAIN_LOOP_EXIT_PANIC   1

Definition at line 89 of file main.h.

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

Definition at line 229 of file main.h.

#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)
#define clib_warning(format, args...)
Definition: error.h:59
double f64
Definition: types.h:140
always_inline f64 vlib_time_now(vlib_main_t *vm)
Definition: main.h:182

Definition at line 200 of file main.h.

#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; \
})
always_inline uword vlib_process_suspend(vlib_main_t *vm, f64 dt)
Definition: node_funcs.h:326
u64 uword
Definition: types.h:112
double f64
Definition: types.h:140

Definition at line 209 of file main.h.

Typedef Documentation

typedef struct vlib_main_t vlib_main_t

Function Documentation

u32 vlib_app_num_thread_stacks_needed ( void  )

Definition at line 293 of file main.c.

always_inline void vlib_increment_main_loop_counter ( vlib_main_t vm)

Definition at line 278 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline f64 vlib_last_vector_length_per_node ( vlib_main_t vm)

Definition at line 267 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline u32 vlib_last_vectors_per_main_loop ( vlib_main_t vm)

Definition at line 249 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline f64 vlib_last_vectors_per_main_loop_as_f64 ( vlib_main_t vm)

Definition at line 258 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vlib_main ( vlib_main_t vm,
unformat_input_t input 
)

Definition at line 1538 of file main.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void vlib_panic ( vlib_main_t vm)

Definition at line 233 of file main.h.

+ Here is the call graph for this function:

always_inline void vlib_panic_with_error ( vlib_main_t vm,
clib_error_t error 
)

Definition at line 223 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void vlib_set_queue_signal_callback ( vlib_main_t vm,
void(*)(vlib_main_t *)  fp 
)

Definition at line 303 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline f64 vlib_time_now ( vlib_main_t vm)

Definition at line 182 of file main.h.

+ Here is the call graph for this function:

always_inline f64 vlib_time_now_ticks ( vlib_main_t vm,
u64  n 
)

Definition at line 186 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

always_inline void vlib_time_wait ( vlib_main_t vm,
f64  wait 
)

Definition at line 191 of file main.h.

+ Here is the call graph for this function:

always_inline u32 vlib_vector_input_stats_index ( vlib_main_t vm,
word  delta 
)

Definition at line 237 of file main.h.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_main_t vlib_global_main

Definition at line 179 of file main.h.

u8** vlib_thread_stacks

Definition at line 312 of file main.h.

u32 wraps

Definition at line 275 of file main.h.