|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
75 .gsk_fib_index = fib_index,
95 key->gsk_fib_index = fib_index;
123 return (VNET_API_ERROR_INVALID_SW_IF_INDEX);
132 [fproto], ~0, 1, NULL,
239 return (VNET_API_ERROR_NO_SUCH_FIB);
247 return (VNET_API_ERROR_NO_SUCH_ENTRY);
274 return (VNET_API_ERROR_INCORRECT_ADJACENCY_TYPE);
280 return (VNET_API_ERROR_NO_SUCH_FIB);
358 else if (
unformat (line_input,
"type transport"))
360 else if (
unformat (line_input,
"type stitched-internal"))
362 else if (
unformat (line_input,
"type stitched-external"))
364 else if (
unformat (line_input,
"type anon-l3-out"))
366 else if (
unformat (line_input,
"type l3-out"))
391 case VNET_API_ERROR_NO_SUCH_FIB:
407 .path =
"gbp subnet",
408 .short_help =
"gbp subnet [del] rd <ID> prefix <prefix> type <type> [<interface>] [sclass <sclass>]\n",
468 return (
format (s,
"stitched-internal"));
470 return (
format (s,
"stitched-external"));
472 return (
format (s,
"transport"));
474 return (
format (s,
"l3-out"));
476 return (
format (s,
"anon-l3-out"));
479 return (
format (s,
"unknown"));
572 .path =
"show gbp subnet",
573 .short_help =
"show gbp subnet\n",
static void gbp_subnet_db_del(gbp_subnet_t *gs)
#define DPO_INVALID
An initialiser for DPOs declared on the stack.
struct gbp_subnet_t_::@667::@669 gs_stitched_external
walk_rc_t(* gbp_subnet_cb_t)(u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, sclass_t sclass, void *ctx)
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_subnet_key_t * gs_key
enum gsb_subnet_show_flags_t_ gsb_subnet_show_flags_t
#define clib_memcpy(d, s, n)
u32 fib_table_get_table_id(u32 fib_index, fib_protocol_t proto)
Get the Table-ID of the FIB from protocol and index.
void gbp_subnet_walk(gbp_subnet_cb_t cb, void *ctx)
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.
u32 grd_fib_index[FIB_PROTOCOL_IP_MAX]
#define ip46_address_initializer
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
@ GBP_SUBNET_SHOW_DETAILS
#define FIB_ENTRY_FORMAT_DETAIL
static clib_error_t * gbp_subnet_init(vlib_main_t *vm)
static void clib_mem_free(void *p)
#define clib_error_return(e, args...)
static void gbp_subnet_del_i(index_t gsi)
struct gbp_subnet_key_t_ gbp_subnet_key_t
a key for the DB
const ip46_address_t ADJ_BCAST_ADDR
The special broadcast address (to construct a broadcast adjacency.
u16 fp_len
The mask length.
#define pool_put(P, E)
Free an object E in pool P.
A route Domain Representation.
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
@ GBP_SUBNET_STITCHED_INTERNAL
u32 grd_id
Route-domain ID.
gbp_subnet_t * gbp_subnet_pool
pool of subnets
@ FIB_ENTRY_FLAG_EXCLUSIVE
int gbp_subnet_add(u32 rd_id, const fib_prefix_t *pfx, gbp_subnet_type_t type, u32 sw_if_index, sclass_t sclass)
@ FIB_ENTRY_FLAG_INTERPOSE
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...
static int gbp_subnet_external_add(gbp_subnet_t *gs, u32 sw_if_index, sclass_t sclass)
static clib_error_t * gbp_subnet_add_del_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
@ GBP_SUBNET_STITCHED_EXTERNAL
@ FIB_ENTRY_FLAG_LOOSE_URPF_EXEMPT
#define pool_foreach(VAR, POOL)
Iterate through pool.
enum fib_entry_flag_t_ fib_entry_flag_t
gbp_subnet_type_t gs_type
vnet_main_t * vnet_get_main(void)
static vlib_cli_command_t gbp_subnet_add_del
(constructor) VLIB_CLI_COMMAND (gbp_subnet_add_del)
u32 grd_uu_sw_if_index[FIB_PROTOCOL_IP_MAX]
The interfaces on which to send packets to unnknown EPs.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
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 hash_create_mem(elts, key_bytes, value_bytes)
#define hash_set_mem(h, key, value)
struct gbp_subnet_t_::@667::@670 gs_l3_out
uword * gbp_subnet_db
A DB of the subnets; key={pfx,fib-index}.
int gbp_subnet_del(u32 rd_id, const fib_prefix_t *pfx)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static int gbp_subnet_transport_add(gbp_subnet_t *gs)
#define VLIB_CLI_COMMAND(x,...)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
enum gbp_subnet_type_t_ gbp_subnet_type_t
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
fib_source_t fib_source_allocate(const char *name, fib_source_priority_t prio, fib_source_behaviour_t bh)
dpo_proto_t fib_proto_to_dpo(fib_protocol_t fib_proto)
ip46_address_t fp_addr
The address type is not deriveable from the fp_addr member.
static int gbp_subnet_internal_add(gbp_subnet_t *gs)
struct gbp_subnet_t_ gbp_subnet_t
Subnet.
gbp_scope_t gbp_route_domain_get_scope(index_t grdi)
#define FIB_SOURCE_PRIORITY_HI
Some priority values that plugins might use when they are not to concerned where in the list they'll ...
static index_t gbp_subnet_db_find(u32 fib_index, const fib_prefix_t *pfx)
u8 * format_gbp_subnet(u8 *s, va_list *args)
@ FIB_ENTRY_FLAG_COVERED_INHERIT
#define pool_foreach_index(i, v)
#define hash_get_mem(h, key)
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
void gbp_policy_dpo_add_or_lock(dpo_proto_t dproto, gbp_scope_t scope, sclass_t sclass, u32 sw_if_index, dpo_id_t *dpo)
@ FIB_ROUTE_PATH_FLAG_NONE
#define VLIB_INIT_FUNCTION(x)
u8 * format_fib_prefix(u8 *s, va_list *args)
gbp_route_domain_t * gbp_route_domain_get(index_t i)
fib_protocol_t fp_proto
protocol type
index_t gbp_route_domain_find_and_lock(u32 rd_id)
@ FIB_SOURCE_SPECIAL
Special sources.
static fib_source_t gbp_fib_source
static int gbp_subnet_l3_out_add(gbp_subnet_t *gs, sclass_t sclass, int is_anon)
#define hash_unset_mem(h, key)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
@ FIB_SOURCE_BH_SIMPLE
add paths without path extensions
static u8 * format_gbp_subnet_type(u8 *s, va_list *args)
The identity of a DPO is a combination of its type and its instance number/index of objects of that t...
enum fib_source_t_ fib_source_t
The different sources that can create a route.
void fib_table_entry_delete_index(fib_node_index_t fib_entry_index, fib_source_t source)
Delete a FIB entry.
static clib_error_t * gbp_subnet_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
static vlib_cli_command_t gbp_subnet_show_node
(constructor) VLIB_CLI_COMMAND (gbp_subnet_show_node)
vl_api_interface_index_t sw_if_index
index_t gbp_route_domain_find(u32 rd_id)
static void gbp_subnet_db_add(u32 fib_index, const fib_prefix_t *pfx, gbp_subnet_t *gs)
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
static void * clib_mem_alloc(uword size)
Aggregate type for a prefix.
vl_api_fib_path_type_t type
void gbp_route_domain_unlock(index_t index)
vl_api_wireguard_peer_flags_t flags
u8 * format_fib_entry(u8 *s, va_list *args)