FD.io VPP  v21.01.1
Vector Packet Processing
feature.c File Reference
+ Include dependency graph for feature.c:

Go to the source code of this file.

Data Structures

struct  vnet_feature_upd_registration_t_
 

Typedefs

typedef struct vnet_feature_upd_registration_t_ vnet_feature_upd_registration_t
 

Functions

void vnet_feature_register (vnet_feature_update_cb_t cb, void *data)
 
static void vnet_feature_reg_invoke (u32 sw_if_index, u8 arc_index, u8 is_enable)
 
static clib_error_tvnet_feature_init (vlib_main_t *vm)
 
u8 vnet_get_feature_arc_index (const char *s)
 
vnet_feature_registration_tvnet_get_feature_reg (const char *arc_name, const char *node_name)
 
u32 vnet_get_feature_index (u8 arc, const char *s)
 
int vnet_feature_enable_disable_with_index (u8 arc_index, u32 feature_index, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
 
int vnet_feature_enable_disable (const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
 
int vnet_feature_is_enabled (const char *arc_name, const char *feature_node_name, u32 sw_if_index)
 
u32 vnet_feature_modify_end_node (u8 arc_index, u32 sw_if_index, u32 end_node_index)
 
static int feature_cmp (void *a1, void *a2)
 
static clib_error_tshow_features_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 Display the set of available driver features. More...
 
void vnet_interface_features_show (vlib_main_t *vm, u32 sw_if_index, int verbose)
 Display the set of driver features configured on a specific interface Called by "show interface" handler. More...
 
static clib_error_tset_interface_features_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tvnet_feature_add_del_sw_interface (vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
 
 VNET_SW_INTERFACE_ADD_DEL_FUNCTION_PRIO (vnet_feature_add_del_sw_interface, VNET_ITF_FUNC_PRIORITY_HIGH)
 

Variables

vnet_feature_main_t feature_main
 
static vnet_feature_upd_registration_tregs
 
static vlib_cli_command_t show_features_command
 (constructor) VLIB_CLI_COMMAND (show_features_command) More...
 
static vlib_cli_command_t set_interface_feature_command
 (constructor) VLIB_CLI_COMMAND (set_interface_feature_command) More...
 

Typedef Documentation

◆ vnet_feature_upd_registration_t

Function Documentation

◆ feature_cmp()

static int feature_cmp ( void *  a1,
void *  a2 
)
static

Definition at line 407 of file feature.c.

+ Here is the caller graph for this function:

◆ set_interface_features_command_fn()

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

Definition at line 552 of file feature.c.

+ Here is the call graph for this function:

◆ show_features_command_fn()

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

Display the set of available driver features.

Useful for verifying that expected features are present

Definition at line 420 of file feature.c.

+ Here is the call graph for this function:

◆ vnet_feature_add_del_sw_interface()

static clib_error_t* vnet_feature_add_del_sw_interface ( vnet_main_t vnm,
u32  sw_if_index,
u32  is_add 
)
static

Definition at line 655 of file feature.c.

+ Here is the call graph for this function:

◆ vnet_feature_enable_disable()

int vnet_feature_enable_disable ( const char *  arc_name,
const char *  node_name,
u32  sw_if_index,
int  enable_disable,
void *  feature_config,
u32  n_feature_config_bytes 
)

Definition at line 303 of file feature.c.

+ Here is the call graph for this function:

◆ vnet_feature_enable_disable_with_index()

int vnet_feature_enable_disable_with_index ( u8  arc_index,
u32  feature_index,
u32  sw_if_index,
int  enable_disable,
void *  feature_config,
u32  n_feature_config_bytes 
)

Definition at line 251 of file feature.c.

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

◆ vnet_feature_init()

static clib_error_t* vnet_feature_init ( vlib_main_t vm)
static

Definition at line 50 of file feature.c.

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

◆ vnet_feature_is_enabled()

int vnet_feature_is_enabled ( const char *  arc_name,
const char *  feature_node_name,
u32  sw_if_index 
)

Definition at line 324 of file feature.c.

+ Here is the call graph for this function:

◆ vnet_feature_modify_end_node()

u32 vnet_feature_modify_end_node ( u8  arc_index,
u32  sw_if_index,
u32  end_node_index 
)

Definition at line 380 of file feature.c.

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

◆ vnet_feature_reg_invoke()

static void vnet_feature_reg_invoke ( u32  sw_if_index,
u8  arc_index,
u8  is_enable 
)
static

Definition at line 40 of file feature.c.

+ Here is the caller graph for this function:

◆ vnet_feature_register()

void vnet_feature_register ( vnet_feature_update_cb_t  cb,
void *  data 
)

Definition at line 29 of file feature.c.

+ Here is the caller graph for this function:

◆ vnet_get_feature_arc_index()

u8 vnet_get_feature_arc_index ( const char *  s)

Definition at line 197 of file feature.c.

+ Here is the caller graph for this function:

◆ vnet_get_feature_index()

u32 vnet_get_feature_index ( u8  arc,
const char *  s 
)

Definition at line 233 of file feature.c.

+ Here is the caller graph for this function:

◆ vnet_get_feature_reg()

vnet_feature_registration_t* vnet_get_feature_reg ( const char *  arc_name,
const char *  node_name 
)

Definition at line 212 of file feature.c.

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

◆ vnet_interface_features_show()

void vnet_interface_features_show ( vlib_main_t vm,
u32  sw_if_index,
int  verbose 
)

Display the set of driver features configured on a specific interface Called by "show interface" handler.

Definition at line 491 of file feature.c.

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

◆ VNET_SW_INTERFACE_ADD_DEL_FUNCTION_PRIO()

VNET_SW_INTERFACE_ADD_DEL_FUNCTION_PRIO ( vnet_feature_add_del_sw_interface  ,
VNET_ITF_FUNC_PRIORITY_HIGH   
)
+ Here is the caller graph for this function:

Variable Documentation

◆ feature_main

vnet_feature_main_t feature_main

Definition at line 18 of file feature.c.

◆ regs

Definition at line 26 of file feature.c.

◆ set_interface_feature_command

vlib_cli_command_t set_interface_feature_command
static
Initial value:
= {
.path = "set interface feature",
.short_help = "set interface feature <intfc> <feature_name> arc <arc_name> "
"[disable]",
}
static clib_error_t * set_interface_features_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: feature.c:552

(constructor) VLIB_CLI_COMMAND (set_interface_feature_command)

Definition at line 646 of file feature.c.

◆ show_features_command

vlib_cli_command_t show_features_command
static
Initial value:
= {
.path = "show features",
.short_help = "show features [verbose]",
}
static clib_error_t * show_features_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Display the set of available driver features.
Definition: feature.c:420

(constructor) VLIB_CLI_COMMAND (show_features_command)

Definition at line 479 of file feature.c.