FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
init.c File Reference

Init function ordering and execution implementation Topological sort for all classes of init functions, and a relatively simple API routine to invoke them. More...

+ Include dependency graph for init.c:

Go to the source code of this file.

Functions

static int comma_split (u8 *s, u8 **a, u8 **b)
 
clib_error_tvlib_sort_init_exit_functions (_vlib_init_function_list_elt_t **head)
 Topological sorter for init function chains. More...
 
**and **static clib_error_tinit_runs_first (vlib_main_t *vm) *
 
**The first form will[most likely] call init_runs_next on the *spot The second form means that init_runs_first runs before possibly much earlier in the sequence **Please DO NOT construct sets of init functions where A before B *actually means A *right before *B It s not necessary simply combine *A and B and it leads to hugely annoying debugging exercises *static clib_error_tcall_init_exit_functions_internal (vlib_main_t *vm, _vlib_init_function_list_elt_t **headp, int call_once, int do_sort, int is_global)
 
clib_error_tvlib_call_init_exit_functions (vlib_main_t *vm, _vlib_init_function_list_elt_t **headp, int call_once, int is_global)
 
clib_error_tvlib_call_init_exit_functions_no_sort (vlib_main_t *vm, _vlib_init_function_list_elt_t **headp, int call_once, int is_global)
 
clib_error_tvlib_call_all_init_functions (vlib_main_t *vm)
 
clib_error_tvlib_call_all_main_loop_enter_functions (vlib_main_t *vm)
 
clib_error_tvlib_call_all_main_loop_exit_functions (vlib_main_t *vm)
 
clib_error_tvlib_call_all_config_functions (vlib_main_t *vm, unformat_input_t *input, int is_early)
 
void vlib_init_dump (void)
 
static clib_error_tshow_init_function_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

**The first form will[most likely] call init_runs_next on the *spot The second form means that init_runs_first runs before * init_runs_next
 
static vlib_cli_command_t show_init_function
 (constructor) VLIB_CLI_COMMAND (show_init_function) More...
 

Detailed Description

Init function ordering and execution implementation Topological sort for all classes of init functions, and a relatively simple API routine to invoke them.

Definition in file init.c.

Function Documentation

◆ call_init_exit_functions_internal()

* * The first form will [most likely] call init_runs_next on the* spot The second form means that init_runs_first runs before possibly much earlier in the sequence* * Please DO NOT construct sets of init functions where A before B* actually means A* right before* B It s not necessary simply combine* A and B and it leads to hugely annoying debugging exercises* static clib_error_t* call_init_exit_functions_internal ( vlib_main_t vm,
_vlib_init_function_list_elt_t **  headp,
int  call_once,
int  do_sort,
int  is_global 
)
inlinestatic

Definition at line 333 of file init.c.

◆ comma_split()

static int comma_split ( u8 s,
u8 **  a,
u8 **  b 
)
static

Definition at line 53 of file init.c.

+ Here is the caller graph for this function:

◆ init_runs_first()

* * and* * static clib_error_t* init_runs_first ( vlib_main_t vm)
static

Definition at line 314 of file init.c.

◆ show_init_function_command_fn()

static clib_error_t* show_init_function_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 510 of file init.c.

◆ vlib_call_all_config_functions()

clib_error_t* vlib_call_all_config_functions ( vlib_main_t vm,
unformat_input_t input,
int  is_early 
)

Definition at line 423 of file init.c.

+ Here is the caller graph for this function:

◆ vlib_call_all_init_functions()

clib_error_t* vlib_call_all_init_functions ( vlib_main_t vm)

Definition at line 391 of file init.c.

+ Here is the caller graph for this function:

◆ vlib_call_all_main_loop_enter_functions()

clib_error_t* vlib_call_all_main_loop_enter_functions ( vlib_main_t vm)

Definition at line 405 of file init.c.

◆ vlib_call_all_main_loop_exit_functions()

clib_error_t* vlib_call_all_main_loop_exit_functions ( vlib_main_t vm)

Definition at line 414 of file init.c.

◆ vlib_call_init_exit_functions()

clib_error_t* vlib_call_init_exit_functions ( vlib_main_t vm,
_vlib_init_function_list_elt_t **  headp,
int  call_once,
int  is_global 
)

Definition at line 373 of file init.c.

+ Here is the caller graph for this function:

◆ vlib_call_init_exit_functions_no_sort()

clib_error_t* vlib_call_init_exit_functions_no_sort ( vlib_main_t vm,
_vlib_init_function_list_elt_t **  headp,
int  call_once,
int  is_global 
)

Definition at line 382 of file init.c.

+ Here is the caller graph for this function:

◆ vlib_init_dump()

void vlib_init_dump ( void  )

Definition at line 493 of file init.c.

◆ vlib_sort_init_exit_functions()

clib_error_t* vlib_sort_init_exit_functions ( _vlib_init_function_list_elt_t **  head)

Topological sorter for init function chains.

Parameters
head[in/out] address of the listhead to be sorted
Returns
0 on success, otherwise a clib_error_t *.

Definition at line 76 of file init.c.

+ Here is the call graph for this function:

Variable Documentation

◆ init_runs_next

* * The first form will [most likely] call init_runs_next on the* spot The second form means that init_runs_first runs before* init_runs_next

Definition at line 325 of file init.c.

◆ show_init_function

vlib_cli_command_t show_init_function
static
Initial value:
= {
.path = "show init-function",
.short_help = "show init-function [init | enter | exit][verbose [nn]]",
}

(constructor) VLIB_CLI_COMMAND (show_init_function)

Definition at line 683 of file init.c.

show_init_function_command_fn
static clib_error_t * show_init_function_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: init.c:510