48 } gs_stitched_external;
73 .gsk_fib_index = fib_index,
127 [fproto], ~0, 1,
NULL,
210 return (VNET_API_ERROR_NO_SUCH_FIB);
218 return (VNET_API_ERROR_NO_SUCH_ENTRY);
249 return (VNET_API_ERROR_NO_SUCH_FIB);
257 return (VNET_API_ERROR_ENTRY_ALREADY_EXISTS);
318 gs->
gs_type, sw_if_index, epg, ctx))
338 return (
format (s,
"stitched-internal"));
340 return (
format (s,
"stitched-external"));
342 return (
format (s,
"transport"));
344 return (
format (s,
"l3-out"));
347 return (
format (s,
"unknown"));
363 s =
format (s,
"[%d] tbl:%d %U %U", gsi, table_id,
439 .path =
"show gbp subnet",
440 .short_help =
"show gbp subnet\n",
fib_protocol_t fp_proto
protocol type
u8 * format_fib_entry(u8 *s, va_list *args)
void gbp_subnet_walk(gbp_subnet_cb_t cb, void *ctx)
void gbp_route_domain_unlock(index_t index)
vnet_main_t * vnet_get_main(void)
gbp_subnet_key_t * gs_key
static u8 * format_gbp_subnet_type(u8 *s, va_list *args)
#define FIB_ENTRY_FORMAT_DETAIL
struct gbp_subnet_t_::@428::@430 gs_stitched_external
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static void gbp_subnet_db_del(gbp_subnet_t *gs)
#define hash_set_mem(h, key, value)
static int gbp_subnet_transport_add(gbp_subnet_t *gs)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
int gbp_subnet_del(u32 rd_id, const fib_prefix_t *pfx)
format_function_t format_vnet_sw_if_index_name
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
#define clib_memcpy(d, s, n)
fib_node_index_t fib_table_entry_update_one_path(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, dpo_proto_t next_hop_proto, const ip46_address_t *next_hop, u32 next_hop_sw_if_index, u32 next_hop_fib_index, u32 next_hop_weight, fib_mpls_label_t *next_hop_labels, fib_route_path_flags_t path_flags)
Update the entry to have just one path.
int gbp_subnet_add(u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, epg_id_t epg)
static clib_error_t * gbp_subnet_init(vlib_main_t *vm)
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
static int gbp_subnet_internal_add(gbp_subnet_t *gs)
u8 * format_fib_prefix(u8 *s, va_list *args)
A high priority source a plugin can use.
Aggregrate type for a prefix.
static int gbp_subnet_l3_out_add(gbp_subnet_t *gs, u32 sw_if_index, epg_id_t epg)
enum gsb_subnet_show_flags_t_ gsb_subnet_show_flags_t
gbp_subnet_t * gbp_subnet_pool
pool of subnets
static index_t gbp_subnet_db_find(u32 fib_index, const fib_prefix_t *pfx)
walk_rc_t(* gbp_subnet_cb_t)(u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, epg_id_t epg, void *ctx)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
#define hash_create_mem(elts, key_bytes, value_bytes)
gbp_subnet_type_t gs_type
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
#define hash_unset_mem(h, key)
enum gbp_subnet_type_t_ gbp_subnet_type_t
#define pool_put(P, E)
Free an object E in pool P.
u32 grd_uu_sw_if_index[FIB_PROTOCOL_IP_MAX]
The interfaces on which to send packets to unnknown EPs.
uword * gbp_subnet_db
A DB of the subnets; key={pfx,fib-index}.
fib_node_index_t fib_table_entry_special_dpo_update(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Update a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the...
void gbp_policy_dpo_add_or_lock(dpo_proto_t dproto, epg_id_t epg, u32 sw_if_index, dpo_id_t *dpo)
index_t gbp_route_domain_find(u32 rd_id)
void fib_table_entry_delete(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source)
Delete a FIB entry.
u32 grd_fib_index[FIB_PROTOCOL_IP_MAX]
void gbp_fwd_dpo_add_or_lock(dpo_proto_t dproto, dpo_id_t *dpo)
u32 fib_node_index_t
A typedef of a node index.
#define VLIB_CLI_COMMAND(x,...)
fib_node_index_t fib_table_entry_special_dpo_add(u32 fib_index, const fib_prefix_t *prefix, fib_source_t source, fib_entry_flag_t flags, const dpo_id_t *dpo)
Add a 'special' entry to the FIB that links to the DPO passed A special entry is an entry that the FI...
gbp_route_domain_t * gbp_route_domain_get(index_t i)
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
static void clib_mem_free(void *p)
u8 * format_gbp_subnet(u8 *s, va_list *args)
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
struct gbp_subnet_t_::@428::@431 gs_l3_out
static void * clib_mem_alloc(uword size)
struct gbp_subnet_t_ gbp_subnet_t
Subnet.
struct gbp_subnet_key_t_ gbp_subnet_key_t
a key for the DB
A route Domain Representation.
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
static clib_error_t * gbp_subnet_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
#define hash_get_mem(h, key)
static void gbp_subnet_db_add(u32 fib_index, const fib_prefix_t *pfx, gbp_subnet_t *gs)
u32 grd_id
Route-domain ID.
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
static int gbp_subnet_external_add(gbp_subnet_t *gs, u32 sw_if_index, epg_id_t epg)
#define pool_foreach_index(i, v, body)
Iterate pool by index.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
const ip46_address_t ADJ_BCAST_ADDR
The special broadcast address (to construct a broadcast adjacency.
index_t gbp_route_domain_find_and_lock(u32 rd_id)