31 #define GBP_EXT_ITF_ID 0x00000080 38 #define GBP_EXT_ITF_DBG(...) \ 39 vlib_log_debug (gx_logger, __VA_ARGS__); 46 return (
format (s,
"%U in %U",
71 return (VNET_API_ERROR_NO_SUCH_ENTRY);
78 return (VNET_API_ERROR_NO_SUCH_ENTRY);
98 L2INPUT_FEAT_GBP_LPM_CLASSIFY);
107 return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
117 return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
140 return (VNET_API_ERROR_NO_SUCH_ENTRY);
184 .path =
"show gbp ext-itf",
185 .short_help =
"show gbp ext-itf\n",
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
void gbp_itf_set_l2_input_feature(index_t gii, index_t useri, l2input_feat_masks_t feats)
void gbp_route_domain_unlock(index_t index)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
index_t * gbp_ext_itf_db
external interface configs keyed by sw_if_index
gbp_ext_itf_t * gbp_ext_itf_pool
Pool of GBP ext_itfs.
A bridge Domain Representation.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static walk_rc_t gbp_ext_itf_show_one(gbp_ext_itf_t *gx, void *ctx)
static clib_error_t * gbp_ext_itf_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static gbp_bridge_domain_t * gbp_bridge_domain_get(index_t i)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void gbp_itf_unlock(index_t gii)
enum walk_rc_t_ walk_rc_t
Walk return code.
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
walk_rc_t(* gbp_ext_itf_cb_t)(gbp_ext_itf_t *gbpe, void *ctx)
u32 gx_fib_index[DPO_PROTO_NUM]
cached FIB indices from the RD
u8 * format_gbp_itf(u8 *s, va_list *args)
index_t gx_bd
The BD this external interface is a member of.
int gbp_ext_itf_delete(u32 sw_if_index)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define pool_put(P, E)
Free an object E in pool P.
int gbp_ext_itf_add(u32 sw_if_index, u32 bd_id, u32 rd_id)
An external interface maps directly to an oflex L3ExternalInterface.
static clib_error_t * gbp_ext_itf_init(vlib_main_t *vm)
vlib_log_class_t gx_logger
logger
u8 * format_gbp_bridge_domain(u8 *s, va_list *args)
u32 grd_fib_index[FIB_PROTOCOL_IP_MAX]
index_t gx_rd
The RD this external interface is a member of.
index_t gbp_bridge_domain_find_and_lock(u32 bd_id)
#define VLIB_CLI_COMMAND(x,...)
gbp_route_domain_t * gbp_route_domain_get(index_t i)
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
#define GBP_EXT_ITF_DBG(...)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
A route Domain Representation.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
void gbp_ext_itf_walk(gbp_ext_itf_cb_t cb, void *ctx)
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
u8 * format_gbp_ext_itf(u8 *s, va_list *args)
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header, unspecified alignment)
void gbp_bridge_domain_unlock(index_t index)
index_t gbp_itf_add_and_lock(u32 sw_if_index, u32 bd_index)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
index_t gbp_route_domain_find_and_lock(u32 rd_id)