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

Go to the source code of this file.

Data Structures

struct  gbp_itf_t_
 Attributes and configurations attached to interfaces by GBP. More...
 

Macros

#define foreach_gbp_itf_mode
 

Typedefs

typedef enum gbp_ift_mode_t_ gbp_itf_mode_t
 
typedef struct gbp_itf_t_ gbp_itf_t
 Attributes and configurations attached to interfaces by GBP. More...
 

Enumerations

enum  gbp_ift_mode_t_ { foreach_gbp_itf_mode }
 

Functions

u8format_gbp_itf_l3_feat (u8 *s, va_list *args)
 
void gbp_itf_hdl_reset (gbp_itf_hdl_t *gh)
 
bool gbp_itf_hdl_is_valid (gbp_itf_hdl_t gh)
 
static gbp_itf_tgbp_itf_get (index_t gii)
 
static gbp_itf_tgbp_itf_find (u32 sw_if_index)
 
static gbp_itf_tgbp_itf_find_hdl (gbp_itf_hdl_t gh)
 
u32 gbp_itf_get_sw_if_index (gbp_itf_hdl_t hdl)
 
static gbp_itf_hdl_t gbp_itf_mk_hdl (gbp_itf_t *gi)
 
static gbp_itf_hdl_t gbp_itf_l2_add_and_lock_i (u32 sw_if_index, index_t gbi, gbp_itf_free_fn_t ff)
 
gbp_itf_hdl_t gbp_itf_l2_add_and_lock (u32 sw_if_index, index_t gbi)
 
gbp_itf_hdl_t gbp_itf_l2_add_and_lock_w_free (u32 sw_if_index, index_t gbi, gbp_itf_free_fn_t ff)
 
gbp_itf_hdl_t gbp_itf_l3_add_and_lock_i (u32 sw_if_index, index_t gri, gbp_itf_free_fn_t ff)
 
gbp_itf_hdl_t gbp_itf_l3_add_and_lock (u32 sw_if_index, index_t gri)
 
gbp_itf_hdl_t gbp_itf_l3_add_and_lock_w_free (u32 sw_if_index, index_t gri, gbp_itf_free_fn_t ff)
 
void gbp_itf_lock (gbp_itf_hdl_t gh)
 
gbp_itf_hdl_t gbp_itf_clone_and_lock (gbp_itf_hdl_t gh)
 
void gbp_itf_unlock (gbp_itf_hdl_t *gh)
 
void gbp_itf_l3_set_input_feature (gbp_itf_hdl_t gh, gbp_itf_l3_feat_t feats)
 
void gbp_itf_l2_set_input_feature (gbp_itf_hdl_t gh, l2input_feat_masks_t feats)
 
void gbp_itf_l2_set_output_feature (gbp_itf_hdl_t gh, l2output_feat_masks_t feats)
 
static u8format_gbp_itf_mode (u8 *s, va_list *args)
 
static u8format_gbp_itf (u8 *s, va_list *args)
 
u8format_gbp_itf_hdl (u8 *s, va_list *args)
 
static clib_error_tgbp_itf_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static gbp_itf_tgbp_itf_pool
 
static uwordgbp_itf_db
 
static const char * gbp_itf_feat_bit_pos_to_arc []
 
static const char * gbp_itf_feat_bit_pos_to_feat []
 
static vlib_cli_command_t gbp_contract_show_node
 (constructor) VLIB_CLI_COMMAND (gbp_contract_show_node) More...
 

Macro Definition Documentation

◆ foreach_gbp_itf_mode

#define foreach_gbp_itf_mode
Value:
_(L2, "l2") \
_(L3, "L3")

Definition at line 22 of file gbp_itf.c.

Typedef Documentation

◆ gbp_itf_mode_t

◆ gbp_itf_t

typedef struct gbp_itf_t_ gbp_itf_t

Attributes and configurations attached to interfaces by GBP.

Enumeration Type Documentation

◆ gbp_ift_mode_t_

Enumerator
foreach_gbp_itf_mode 

Definition at line 26 of file gbp_itf.c.

Function Documentation

◆ format_gbp_itf()

static u8* format_gbp_itf ( u8 s,
va_list *  args 
)
static

Definition at line 492 of file gbp_itf.c.

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

◆ format_gbp_itf_hdl()

u8* format_gbp_itf_hdl ( u8 s,
va_list *  args 
)

Definition at line 522 of file gbp_itf.c.

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

◆ format_gbp_itf_l3_feat()

u8* format_gbp_itf_l3_feat ( u8 s,
va_list *  args 
)

Definition at line 97 of file gbp_itf.c.

+ Here is the caller graph for this function:

◆ format_gbp_itf_mode()

static u8* format_gbp_itf_mode ( u8 s,
va_list *  args 
)
static

Definition at line 476 of file gbp_itf.c.

+ Here is the caller graph for this function:

◆ gbp_itf_clone_and_lock()

gbp_itf_hdl_t gbp_itf_clone_and_lock ( gbp_itf_hdl_t  gh)

Definition at line 273 of file gbp_itf.c.

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

◆ gbp_itf_find()

static gbp_itf_t* gbp_itf_find ( u32  sw_if_index)
static

Definition at line 131 of file gbp_itf.c.

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

◆ gbp_itf_find_hdl()

static gbp_itf_t* gbp_itf_find_hdl ( gbp_itf_hdl_t  gh)
static

Definition at line 144 of file gbp_itf.c.

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

◆ gbp_itf_get()

static gbp_itf_t* gbp_itf_get ( index_t  gii)
static

Definition at line 122 of file gbp_itf.c.

+ Here is the caller graph for this function:

◆ gbp_itf_get_sw_if_index()

u32 gbp_itf_get_sw_if_index ( gbp_itf_hdl_t  hdl)

Definition at line 150 of file gbp_itf.c.

+ Here is the caller graph for this function:

◆ gbp_itf_hdl_is_valid()

bool gbp_itf_hdl_is_valid ( gbp_itf_hdl_t  gh)

Definition at line 116 of file gbp_itf.c.

+ Here is the caller graph for this function:

◆ gbp_itf_hdl_reset()

void gbp_itf_hdl_reset ( gbp_itf_hdl_t gh)

Definition at line 110 of file gbp_itf.c.

+ Here is the caller graph for this function:

◆ gbp_itf_l2_add_and_lock()

gbp_itf_hdl_t gbp_itf_l2_add_and_lock ( u32  sw_if_index,
index_t  gbi 
)

Definition at line 198 of file gbp_itf.c.

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

◆ gbp_itf_l2_add_and_lock_i()

static gbp_itf_hdl_t gbp_itf_l2_add_and_lock_i ( u32  sw_if_index,
index_t  gbi,
gbp_itf_free_fn_t  ff 
)
static

Definition at line 171 of file gbp_itf.c.

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

◆ gbp_itf_l2_add_and_lock_w_free()

gbp_itf_hdl_t gbp_itf_l2_add_and_lock_w_free ( u32  sw_if_index,
index_t  gbi,
gbp_itf_free_fn_t  ff 
)

Definition at line 204 of file gbp_itf.c.

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

◆ gbp_itf_l2_set_input_feature()

void gbp_itf_l2_set_input_feature ( gbp_itf_hdl_t  gh,
l2input_feat_masks_t  feats 
)

Definition at line 384 of file gbp_itf.c.

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

◆ gbp_itf_l2_set_output_feature()

void gbp_itf_l2_set_output_feature ( gbp_itf_hdl_t  gh,
l2output_feat_masks_t  feats 
)

Definition at line 430 of file gbp_itf.c.

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

◆ gbp_itf_l3_add_and_lock()

gbp_itf_hdl_t gbp_itf_l3_add_and_lock ( u32  sw_if_index,
index_t  gri 
)

Definition at line 247 of file gbp_itf.c.

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

◆ gbp_itf_l3_add_and_lock_i()

gbp_itf_hdl_t gbp_itf_l3_add_and_lock_i ( u32  sw_if_index,
index_t  gri,
gbp_itf_free_fn_t  ff 
)

Definition at line 211 of file gbp_itf.c.

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

◆ gbp_itf_l3_add_and_lock_w_free()

gbp_itf_hdl_t gbp_itf_l3_add_and_lock_w_free ( u32  sw_if_index,
index_t  gri,
gbp_itf_free_fn_t  ff 
)

Definition at line 253 of file gbp_itf.c.

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

◆ gbp_itf_l3_set_input_feature()

void gbp_itf_l3_set_input_feature ( gbp_itf_hdl_t  gh,
gbp_itf_l3_feat_t  feats 
)

Definition at line 337 of file gbp_itf.c.

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

◆ gbp_itf_lock()

void gbp_itf_lock ( gbp_itf_hdl_t  gh)

Definition at line 260 of file gbp_itf.c.

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

◆ gbp_itf_mk_hdl()

static gbp_itf_hdl_t gbp_itf_mk_hdl ( gbp_itf_t gi)
static

Definition at line 156 of file gbp_itf.c.

+ Here is the caller graph for this function:

◆ gbp_itf_show()

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

Definition at line 536 of file gbp_itf.c.

+ Here is the call graph for this function:

◆ gbp_itf_unlock()

void gbp_itf_unlock ( gbp_itf_hdl_t gh)

Definition at line 288 of file gbp_itf.c.

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

Variable Documentation

◆ gbp_contract_show_node

vlib_cli_command_t gbp_contract_show_node
static
Initial value:
= {
.path = "show gbp interface",
.short_help = "show gbp interface\n",
.function = gbp_itf_show,
}
static clib_error_t * gbp_itf_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: gbp_itf.c:536

(constructor) VLIB_CLI_COMMAND (gbp_contract_show_node)

Definition at line 561 of file gbp_itf.c.

◆ gbp_itf_db

uword* gbp_itf_db
static

Definition at line 82 of file gbp_itf.c.

◆ gbp_itf_feat_bit_pos_to_arc

const char* gbp_itf_feat_bit_pos_to_arc[]
static
Initial value:

Definition at line 84 of file gbp_itf.c.

◆ gbp_itf_feat_bit_pos_to_feat

const char* gbp_itf_feat_bit_pos_to_feat[]
static
Initial value:

Definition at line 90 of file gbp_itf.c.

◆ gbp_itf_pool

gbp_itf_t* gbp_itf_pool
static

Definition at line 81 of file gbp_itf.c.