47 return (&gbp_itfs[gii]);
97 memset (gi, 0,
sizeof (*gi));
105 u32 diff_fb, new_fb, *fb, feat;
149 u32 diff_fb, new_fb, *fb, feat;
197 s =
format (s,
"%U locks:%d bd-index:%d input-feats:%U output-feats:%U",
232 .path =
"show gbp interface",
233 .short_help =
"show gbp interface\n",
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
#define vec_foreach_index(var, v)
Iterate over vector indices.
void gbp_itf_set_l2_input_feature(index_t gii, index_t useri, l2input_feat_masks_t feats)
vnet_main_t * vnet_get_main(void)
u8 * format_l2_output_features(u8 *s, va_list *args)
u32 * gi_l2_input_fbs
L2/L3 Features configured by each user.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static gbp_itf_t * gbp_itfs
format_function_t format_vnet_sw_if_index_name
void gbp_itf_unlock(index_t gii)
#define foreach_set_bit(var, mask, body)
struct gbp_itf_t_ gbp_itf_t
Attributes and configurations attached to interfaces by GBP.
u8 * format_gbp_itf(u8 *s, va_list *args)
static index_t gbp_itf_get_itf(u32 sw_if_index)
u32 gi_locks
Number of references to this interface.
static gbp_itf_t * gbp_itf_get(index_t gii)
void gbp_itf_set_l2_output_feature(index_t gii, index_t useri, l2output_feat_masks_t feats)
void l2output_intf_bitmap_enable(u32 sw_if_index, l2output_feat_masks_t feature_bitmap, u32 enable)
Enable (or disable) the feature in the bitmap for the given interface.
Attributes and configurations attached to interfaces by GBP.
#define vec_free(V)
Free vector's memory (no header).
#define VLIB_CLI_COMMAND(x,...)
static clib_error_t * gbp_itf_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static vlib_main_t * vlib_get_main(void)
#define vec_foreach(var, vec)
Vector iterator.
index_t gbp_itf_add_and_lock(u32 sw_if_index, u32 bd_index)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)