53 u32 ip6_table_id,
u32 uplink_sw_if_index)
63 pool_get (gbp_endpoint_group_pool, gepg);
64 memset (gepg, 0,
sizeof (*gepg));
85 return (VNET_API_ERROR_NO_SUCH_FIB);
97 L2INPUT_FEAT_GBP_NULL_CLASSIFY, 1);
100 gepg->
gepg_id, gepg - gbp_endpoint_group_pool);
122 L2INPUT_FEAT_GBP_NULL_CLASSIFY, 0);
133 pool_put (gbp_endpoint_group_pool, gepg);
157 u32 uplink_sw_if_index = ~0;
165 vnm, &uplink_sw_if_index))
171 else if (
unformat (input,
"epg %d", &epg_id))
173 else if (
unformat (input,
"bd %d", &bd_id))
175 else if (
unformat (input,
"rd %d", &rd_id))
186 if (~0 == uplink_sw_if_index)
211 .path =
"gbp endpoint-group",
212 .short_help =
"gbp endpoint-group [del] epg <ID> bd <ID> rd <ID> <interface>",
253 .path =
"show gbp endpoint-group",
254 .short_help =
"show gbp endpoint-group\n",
EPG DB, key'd on EGP-ID.
#define hash_set(h, key, value)
#define hash_unset(h, key)
vnet_main_t * vnet_get_main(void)
u32 gepg_bd
Bridge-domain ID the EPG is in.
unformat_function_t unformat_vnet_sw_interface
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
format_function_t format_vnet_sw_if_index_name
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
memset(h->entries, 0, sizeof(h->entries[0])*entries)
u32 gepg_fib_index[FIB_PROTOCOL_IP_MAX]
resulting FIB indices
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
A high priority source a plugin can use.
gbp_endpoint_group_t * gbp_endpoint_group_find(epg_id_t epg_id)
#define clib_error_return(e, 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.
static int gbp_endpoint_group_show_one(gbp_endpoint_group_t *gepg, void *ctx)
#define pool_put(P, E)
Free an object E in pool P.
void gbp_endpoint_group_delete(epg_id_t epg_id)
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
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)
static clib_error_t * gbp_endpoint_group_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
int gbp_endpoint_group_add(epg_id_t epg_id, u32 bd_id, u32 ip4_table_id, u32 ip6_table_id, u32 uplink_sw_if_index)
dpo_id_t gepg_dpo[FIB_PROTOCOL_IP_MAX]
The DPO used in the L3 path for forwarding internal subnets.
#define VLIB_CLI_COMMAND(x,...)
u32 gepg_uplink_sw_if_index
the uplink interface dedicated to the EPG
u32 fib_table_find_or_create_and_lock(fib_protocol_t proto, u32 table_id, fib_source_t src)
Get the index of the FIB for a Table-ID.
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)
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
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.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
u32 gepg_rd[FIB_PROTOCOL_IP_MAX]
route-domain/IP-table ID the EPG is in
void gbp_endpoint_group_walk(gbp_endpoint_group_cb_t cb, void *ctx)