45 #define GBP_EPG_DBG(...) \ 46 vlib_log_debug (gg_logger, __VA_ARGS__); 100 return (VNET_API_ERROR_BD_NOT_MODIFIABLE);
107 return (VNET_API_ERROR_NO_SUCH_FIB);
146 L2INPUT_FEAT_GBP_NULL_CLASSIFY);
150 gg->
gg_sclass, gg - gbp_endpoint_group_pool);
194 pool_put (gbp_endpoint_group_pool, gg);
214 return (VNET_API_ERROR_NO_SUCH_ENTRY);
267 vnm, &uplink_sw_if_index))
273 else if (
unformat (input,
"epg %d", &vnid))
275 else if (
unformat (input,
"sclass %d", &sclass))
277 else if (
unformat (input,
"bd %d", &bd_id))
279 else if (
unformat (input,
"rd %d", &rd_id))
296 uplink_sw_if_index, &retention);
313 .path =
"gbp endpoint-group",
314 .short_help =
"gbp endpoint-group [del] epg <ID> bd <ID> rd <ID> [sclass <ID>] [<interface>]",
334 s =
format (s,
"[%d] %d, sclass:%d bd:%d rd:%d uplink:%U retention:%U locks:%d",
335 gg - gbp_endpoint_group_pool,
380 .path =
"show gbp endpoint-group",
381 .short_help =
"show gbp endpoint-group\n",
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
EPG DB, key'd on EGP-ID.
void gbp_route_domain_unlock(index_t index)
#define hash_set(h, key, value)
gbp_itf_hdl_t gg_uplink_itf
#define hash_unset(h, key)
vnet_main_t * vnet_get_main(void)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
#define pool_foreach(VAR, POOL)
Iterate through pool.
void gbp_itf_unlock(gbp_itf_hdl_t *gh)
A bridge Domain Representation.
int gbp_endpoint_group_delete(sclass_t sclass)
u8 * format_gbp_endpoint_group(u8 *s, va_list *args)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
unformat_function_t unformat_vnet_sw_interface
index_t gg_rd
route-domain/IP-table ID the EPG is in
Endpoint Retnetion Policy.
static gbp_bridge_domain_t * gbp_bridge_domain_get(index_t i)
vlib_log_class_t gg_logger
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
void gbp_bridge_domain_unlock(index_t gbdi)
#define VLIB_INIT_FUNCTION(x)
description fragment has unexpected format
gbp_endpoint_group_t * gbp_endpoint_group_get(index_t i)
#define clib_error_return(e, args...)
static u8 * format_gbp_endpoint_retention(u8 *s, va_list *args)
int(* gbp_endpoint_group_cb_t)(gbp_endpoint_group_t *gbpe, void *ctx)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
int gbp_endpoint_group_add_and_lock(vnid_t vnid, u16 sclass, u32 bd_id, u32 rd_id, u32 uplink_sw_if_index, const gbp_endpoint_retention_t *retention)
#define pool_put(P, E)
Free an object E in pool P.
u32 remote_ep_timeout
Aging timeout for remote endpoints.
u32 gb_bd_id
Bridge-domain ID.
gbp_endpoint_group_db_t gbp_endpoint_group_db
DB of endpoint_groups.
An Endpoint Group representation.
void dvr_dpo_add_or_lock(u32 sw_if_index, dpo_proto_t dproto, dpo_id_t *dpo)
void gbp_itf_hdl_reset(gbp_itf_hdl_t *gh)
gbp_itf_hdl_t gbp_itf_l2_add_and_lock(u32 sw_if_index, index_t gbi)
sll srl srl sll sra u16x4 i
static clib_error_t * gbp_endpoint_group_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
vl_api_gbp_endpoint_retention_t retention
u32 grd_fib_index[FIB_PROTOCOL_IP_MAX]
void gbp_endpoint_group_lock(index_t ggi)
u32 gg_locks
Locks/references to this EPG.
index_t gbp_bridge_domain_find_and_lock(u32 bd_id)
#define VLIB_CLI_COMMAND(x,...)
uword * gbp_epg_sclass_db
Map sclass to EPG.
gbp_route_domain_t * gbp_route_domain_get(index_t i)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static int gbp_endpoint_group_show_one(gbp_endpoint_group_t *gg, void *ctx)
u8 * format_gbp_itf_hdl(u8 *s, va_list *args)
dpo_id_t gg_dpo[FIB_PROTOCOL_IP_MAX]
The DPO used in the L3 path for forwarding internal subnets.
void gbp_endpoint_group_unlock(index_t ggi)
gbp_endpoint_retention_t gg_retention
EP retention policy.
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
static clib_error_t * gbp_endpoint_group_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static clib_error_t * gbp_endpoint_group_init(vlib_main_t *vm)
void gbp_itf_l2_set_input_feature(gbp_itf_hdl_t gh, l2input_feat_masks_t feats)
A route Domain Representation.
u32 gg_uplink_sw_if_index
the uplink interface dedicated to the EPG
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
vl_api_interface_index_t uplink_sw_if_index
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
index_t gbp_endpoint_group_find(sclass_t sclass)
u32 gbp_endpoint_group_get_bd_id(const gbp_endpoint_group_t *gg)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
gbp_endpoint_group_t * gbp_endpoint_group_pool
Pool of GBP endpoint_groups.
index_t gbp_endpoint_group_get_fib_index(const gbp_endpoint_group_t *gg, fib_protocol_t fproto)
index_t gbp_route_domain_find_and_lock(u32 rd_id)
index_t gg_gbd
Bridge-domain ID the EPG is in.
void gbp_endpoint_group_walk(gbp_endpoint_group_cb_t cb, void *ctx)