47 #define GBP_RECIRC_DBG(...) \ 48 vlib_log_debug (gr_logger, __VA_ARGS__); 56 return format (s,
" %U, sclass:%d, ext:%d",
80 return (VNET_API_ERROR_NO_SUCH_ENTRY);
140 NULL, NULL, &gr->
gr_ep);
142 "ip4-gbp-src-classify",
145 "ip6-gbp-src-classify",
156 "ip4-gbp-lpm-classify",
159 "ip6-gbp-lpm-classify",
181 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
194 "ip4-gbp-src-classify",
197 "ip6-gbp-src-classify",
203 "ip4-gbp-lpm-classify",
206 "ip6-gbp-lpm-classify",
221 return VNET_API_ERROR_NO_SUCH_ENTRY;
265 .path =
"show gbp recirc",
266 .short_help =
"show gbp recirc\n",
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
index_t gr_epgi
The index of the EPG.
static void(* l2e_disable)(u32 sw_if_index)
sclass_t gr_sclass
EPG ID that packets will classify to when they arrive on this recirc.
void gbp_endpoint_unlock(gbp_endpoint_src_t src, index_t gei)
vnet_main_t * vnet_get_main(void)
int gbp_recirc_add(u32 sw_if_index, sclass_t sclass, u8 is_ext)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
void gbp_itf_unlock(gbp_itf_hdl_t *gh)
static walk_rc_t gbp_recirc_show_one(gbp_recirc_t *gr, void *ctx)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static clib_error_t * gbp_recirc_init(vlib_main_t *vm)
format_function_t format_vnet_sw_if_index_name
index_t gr_ep
The endpoint created to represent the reric interface.
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
enum walk_rc_t_ walk_rc_t
Walk return code.
u8 gr_is_ext
Is the interface for packets post-NAT translation (i.e.
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
gbp_endpoint_group_t * gbp_endpoint_group_get(index_t i)
A GBP recirculation interface representation Thes interfaces join Bridge domains that are internal to...
vlib_log_class_t gr_logger
logger
static const u8 * vnet_sw_interface_get_hw_address(vnet_main_t *vnm, u32 sw_if_index)
u32 gr_fib_index[DPO_PROTO_NUM]
FIB indices the EPG is mapped to.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static_always_inline void mac_address_from_bytes(mac_address_t *mac, const u8 *bytes)
void ip4_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
gbp_recirc_t * gbp_recirc_pool
Pool of GBP recircs.
#define pool_put(P, E)
Free an object E in pool P.
walk_rc_t(* gbp_recirc_cb_t)(gbp_recirc_t *gbpe, void *ctx)
int gbp_endpoint_update_and_lock(gbp_endpoint_src_t src, u32 sw_if_index, const ip46_address_t *ips, const mac_address_t *mac, index_t gbdi, index_t grdi, sclass_t sclass, gbp_endpoint_flags_t flags, const ip46_address_t *tun_src, const ip46_address_t *tun_dst, u32 *handle)
An Endpoint Group representation.
static clib_error_t * gbp_recirc_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static gbp_recirc_t * gbp_recirc_get(u32 sw_if_index)
gbp_itf_hdl_t gbp_itf_l2_add_and_lock(u32 sw_if_index, index_t gbi)
void gbp_endpoint_group_lock(index_t ggi)
#define VLIB_CLI_COMMAND(x,...)
#define GBP_RECIRC_DBG(...)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static void(* l2e_enable)(u32 sw_if_index)
L2 Emulation enable/disable symbols.
void gbp_endpoint_group_unlock(index_t ggi)
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
void * vlib_get_plugin_symbol(char *plugin_name, char *symbol_name)
void gbp_recirc_walk(gbp_recirc_cb_t cb, void *ctx)
index_t * gbp_recirc_db
Recirc configs keyed by sw_if_index.
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
u8 * format_gbp_recirc(u8 *s, va_list *args)
int gbp_recirc_delete(u32 sw_if_index)
index_t gbp_endpoint_group_find(sclass_t sclass)
index_t gbp_endpoint_group_get_fib_index(const gbp_endpoint_group_t *gg, fib_protocol_t fproto)
#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 ip6_sw_interface_enable_disable(u32 sw_if_index, u32 is_enable)
vl_api_interface_index_t sw_if_index
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)
index_t gg_gbd
Bridge-domain ID the EPG is in.