FD.io VPP  v19.08-27-gf4dcae4
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

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

Definition at line 20 of file gbp_itf.c.

Typedef Documentation

typedef struct gbp_itf_t_ gbp_itf_t

Attributes and configurations attached to interfaces by GBP.

Enumeration Type Documentation

Enumerator
foreach_gbp_itf_mode 

Definition at line 24 of file gbp_itf.c.

Function Documentation

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

Definition at line 490 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_gbp_itf_hdl ( u8 s,
va_list *  args 
)

Definition at line 520 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

u8* format_gbp_itf_l3_feat ( u8 s,
va_list *  args 
)

Definition at line 95 of file gbp_itf.c.

+ Here is the caller graph for this function:

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

Definition at line 474 of file gbp_itf.c.

+ Here is the caller graph for this function:

gbp_itf_hdl_t gbp_itf_clone_and_lock ( gbp_itf_hdl_t  gh)

Definition at line 271 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_itf_t* gbp_itf_find ( u32  sw_if_index)
static

Definition at line 129 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_itf_t* gbp_itf_find_hdl ( gbp_itf_hdl_t  gh)
static

Definition at line 142 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_itf_t* gbp_itf_get ( index_t  gii)
static

Definition at line 120 of file gbp_itf.c.

+ Here is the caller graph for this function:

u32 gbp_itf_get_sw_if_index ( gbp_itf_hdl_t  hdl)

Definition at line 148 of file gbp_itf.c.

+ Here is the caller graph for this function:

bool gbp_itf_hdl_is_valid ( gbp_itf_hdl_t  gh)

Definition at line 114 of file gbp_itf.c.

+ Here is the caller graph for this function:

void gbp_itf_hdl_reset ( gbp_itf_hdl_t gh)

Definition at line 108 of file gbp_itf.c.

+ Here is the caller graph for this function:

gbp_itf_hdl_t gbp_itf_l2_add_and_lock ( u32  sw_if_index,
index_t  gbi 
)

Definition at line 196 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 169 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 202 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_itf_l2_set_input_feature ( gbp_itf_hdl_t  gh,
l2input_feat_masks_t  feats 
)

Definition at line 382 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_itf_l2_set_output_feature ( gbp_itf_hdl_t  gh,
l2output_feat_masks_t  feats 
)

Definition at line 428 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

gbp_itf_hdl_t gbp_itf_l3_add_and_lock ( u32  sw_if_index,
index_t  gri 
)

Definition at line 245 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 209 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 251 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_itf_l3_set_input_feature ( gbp_itf_hdl_t  gh,
gbp_itf_l3_feat_t  feats 
)

Definition at line 335 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void gbp_itf_lock ( gbp_itf_hdl_t  gh)

Definition at line 258 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static gbp_itf_hdl_t gbp_itf_mk_hdl ( gbp_itf_t gi)
static

Definition at line 154 of file gbp_itf.c.

+ Here is the caller graph for this function:

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

Definition at line 534 of file gbp_itf.c.

+ Here is the call graph for this function:

void gbp_itf_unlock ( gbp_itf_hdl_t gh)

Definition at line 286 of file gbp_itf.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

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:534

(constructor) VLIB_CLI_COMMAND (gbp_contract_show_node)

Definition at line 559 of file gbp_itf.c.

uword* gbp_itf_db
static

Definition at line 80 of file gbp_itf.c.

const char* gbp_itf_feat_bit_pos_to_arc[]
static
Initial value:

Definition at line 82 of file gbp_itf.c.

const char* gbp_itf_feat_bit_pos_to_feat[]
static
Initial value:

Definition at line 88 of file gbp_itf.c.

gbp_itf_t* gbp_itf_pool
static

Definition at line 79 of file gbp_itf.c.