FD.io VPP  v19.08.3-2-gbabecb413
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)
 
clib_error_tvlib_call_init_exit_functions (vlib_main_t *vm, _vlib_init_function_list_elt_t **headp, int call_once)
 
clib_error_tvlib_call_init_exit_functions_no_sort (vlib_main_t *vm, _vlib_init_function_list_elt_t **headp, int call_once)
 
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 
)
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 call graph for this function:
+ 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 491 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 405 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 378 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 391 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 398 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 
)

Definition at line 360 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 
)

Definition at line 369 of file init.c.

+ Here is the caller graph for this function:

◆ vlib_init_dump()

void vlib_init_dump ( void  )

Definition at line 474 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:
+ Here is the caller 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]]",
}
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:491

(constructor) VLIB_CLI_COMMAND (show_init_function)

Definition at line 663 of file init.c.