|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
30 0x0, 0x22, 0xBD, 0xF8, 0x19, 0xFF,
36 00, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
62 #define GBP_BD_DBG(...) \
63 vlib_log_debug (grd_logger, __VA_ARGS__);
272 return (VNET_API_ERROR_NO_SUCH_ENTRY);
368 .path =
"gbp route-domain",
369 .short_help =
"gbp route-domain [del] rd <ID> ip4-table-id <ID> ip6-table-id <ID> [ip4-uu <interface>] [ip6-uu <interface>]",
380 s =
format (s,
"[%d] rd:%d ip4-uu:%U ip6-uu:%U locks:%d",
422 .path =
"show gbp route-domain",
423 .short_help =
"show gbp route-domain\n",
vl_api_interface_index_t ip6_uu_sw_if_index
const static mac_address_t GBP_ROUTED_DST_MAC
#define hash_set(h, key, value)
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
static vlib_cli_command_t gbp_route_domain_cli_node
(constructor) VLIB_CLI_COMMAND (gbp_route_domain_cli_node)
u32 grd_fib_index[FIB_PROTOCOL_IP_MAX]
index_t gbp_route_domain_index(const gbp_route_domain_t *grd)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
void gbp_route_domain_walk(gbp_route_domain_cb_t cb, void *ctx)
#define clib_error_return(e, args...)
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
const ip46_address_t ADJ_BCAST_ADDR
The special broadcast address (to construct a broadcast adjacency.
#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.
u8 * format_gbp_route_domain(u8 *s, va_list *args)
u32 grd_id
Route-domain ID.
u32 grd_table_id[FIB_PROTOCOL_IP_MAX]
static vlib_cli_command_t gbp_route_domain_show_node
(constructor) VLIB_CLI_COMMAND (gbp_route_domain_show_node)
static clib_error_t * gbp_route_domain_init(vlib_main_t *vm)
#define hash_unset(h, key)
gbp_route_domain_t * gbp_route_domain_pool
Pool of GBP route_domains.
int gbp_route_domain_add_and_lock(u32 rd_id, gbp_scope_t scope, u32 ip4_table_id, u32 ip6_table_id, u32 ip4_uu_sw_if_index, u32 ip6_uu_sw_if_index)
@ FIB_SOURCE_BH_DROP
If you're adding a new source from a plugin pick one of these.
#define pool_foreach(VAR, POOL)
Iterate through pool.
vlib_log_class_t grd_logger
logger
vnet_main_t * vnet_get_main(void)
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.
u32 grd_uu_sw_if_index[FIB_PROTOCOL_IP_MAX]
The interfaces on which to send packets to unnknown EPs.
adj_index_t adj_nbr_add_or_lock_w_rewrite(fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index, u8 *rewrite)
Add (and lock) a new or lock an existing neighbour adjacency.
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static_always_inline void mac_address_to_bytes(const mac_address_t *mac, u8 *bytes)
vnet_link_t fib_proto_to_link(fib_protocol_t proto)
Convert from a protocol to a link type.
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define VLIB_CLI_COMMAND(x,...)
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
static fib_source_t gbp_fib_source
vl_api_interface_index_t ip4_uu_sw_if_index
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)
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 ...
int gbp_route_domain_delete(u32 rd_id)
static gbp_route_domain_db_t gbp_route_domain_db
static clib_error_t * gbp_route_domain_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
static clib_error_t * gbp_route_domain_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define VLIB_INIT_FUNCTION(x)
static void gbp_route_domain_db_add(gbp_route_domain_t *grd)
static void gbp_route_domain_lock(index_t i)
struct gbp_route_domain_db_t gbp_route_domain_db_t
DB of route_domains.
gbp_route_domain_t * gbp_route_domain_get(index_t i)
index_t gbp_route_domain_find_and_lock(u32 rd_id)
u32 grd_adj[FIB_PROTOCOL_IP_MAX]
adjacencies on the UU interfaces.
static int gbp_route_domain_show_one(gbp_route_domain_t *gb, void *ctx)
#define pool_get_zero(P, E)
Allocate an object E from a pool P and zero it.
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
void fib_table_unlock(u32 fib_index, fib_protocol_t proto, fib_source_t source)
Take a reference counting lock on the table.
enum fib_source_t_ fib_source_t
The different sources that can create a route.
static void gbp_route_domain_db_remove(gbp_route_domain_t *grd)
#define INDEX_INVALID
Invalid index - used when no index is known blazoned capitals INVALID speak volumes where ~0 does not...
const mac_address_t * gbp_route_domain_get_remote_mac(void)
index_t gbp_route_domain_find(u32 rd_id)
const static mac_address_t GBP_ROUTED_SRC_MAC
A fixed MAC address to use as the source MAC for packets L3 switched onto the routed uu-fwd interface...
int(* gbp_route_domain_cb_t)(gbp_route_domain_t *gb, void *ctx)
void gbp_route_domain_unlock(index_t index)
u32 gbp_route_domain_get_rd_id(index_t grdi)
const mac_address_t * gbp_route_domain_get_local_mac(void)