|
FD.io VPP
v21.10.1-2-g0a485f517
Vector Packet Processing
|
Go to the documentation of this file.
49 #define GBP_BD_DBG(...) \
50 vlib_log_debug (gb_logger, __VA_ARGS__);
131 s =
format (s,
"do-not-learn ");
133 s =
format (s,
"uu-fwd-drop ");
135 s =
format (s,
"mcast-drop ");
137 s =
format (s,
"ucast-arp ");
155 "[%d] bd:[%d,%d], bvi:%U uu-flood:%U bm-flood:%U flags:%U locks:%d",
200 return (VNET_API_ERROR_BD_NOT_MODIFIABLE);
209 memset (gb, 0,
sizeof (*gb));
245 L2INPUT_FEAT_GBP_LEARN);
265 (L2FIB_ENTRY_RESULT_FLAG_STATIC |
266 L2FIB_ENTRY_RESULT_FLAG_BVI));
358 return (VNET_API_ERROR_NO_SUCH_ENTRY);
445 .path =
"gbp bridge-domain",
446 .short_help =
"gbp bridge-domain [del] bd <ID> bvi <interface> [uu-fwd <interface>] [bm-flood <interface>] [flags <flags>]",
481 .path =
"show gbp bridge-domain",
482 .short_help =
"show gbp bridge-domain\n",
void gbp_itf_l2_set_input_feature(gbp_itf_hdl_t gh, l2input_feat_masks_t feats)
@ GBP_BD_FLAG_DO_NOT_LEARN
u32 gbp_bridge_domain_get_bd_id(index_t gbdi)
static int gbp_bridge_domain_show_one(gbp_bridge_domain_t *gb, void *ctx)
#define hash_set(h, key, value)
static clib_error_t * gbp_bridge_domain_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
gbp_scope_t * gbp_scope_by_bd_index
Map of BD index to contract scope.
int(* gbp_bridge_domain_cb_t)(gbp_bridge_domain_t *gb, void *ctx)
u32 gb_rdi
Index of the Route-domain this BD is associated with.
void gbp_bridge_domain_itf_del(index_t gbdi, u32 sw_if_index, l2_bd_port_type_t type)
vlib_log_class_t gb_logger
logger
gbp_bridge_domain_t * gbp_bridge_domain_pool
Pool of GBP bridge_domains.
vlib_log_class_t vlib_log_register_class(char *class, char *subclass)
static clib_error_t * gbp_bridge_domain_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
#define clib_error_return(e, args...)
static vlib_cli_command_t gbp_bridge_domain_show_node
(constructor) VLIB_CLI_COMMAND (gbp_bridge_domain_show_node)
u8 * format_gbp_bridge_domain(u8 *s, va_list *args)
#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.
static index_t gbp_bridge_domain_find(u32 bd_id)
static gbp_bridge_domain_t * gbp_bridge_domain_get(index_t i)
u32 gb_bd_id
Bridge-domain ID.
u32 gb_bvi_sw_if_index
The BD's BVI interface (obligatory)
vl_api_interface_index_t bvi_sw_if_index
void gbp_bridge_domain_walk(gbp_bridge_domain_cb_t cb, void *ctx)
void l2fib_add_entry(const u8 *mac, u32 bd_index, u32 sw_if_index, l2fib_entry_result_flags_t flags)
Add an entry to the l2fib.
#define hash_unset(h, key)
vl_api_interface_index_t bm_flood_sw_if_index
static void gbp_bridge_domain_lock(index_t i)
u32 gb_locks
locks/references to the BD so it does not get deleted (from the API) whilst it is still being used
#define pool_foreach(VAR, POOL)
Iterate through pool.
void gbp_itf_hdl_reset(gbp_itf_hdl_t *gh)
vnet_main_t * vnet_get_main(void)
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
static const u8 * vnet_sw_interface_get_hw_address(vnet_main_t *vnm, u32 sw_if_index)
u8 * format_gbp_itf_hdl(u8 *s, va_list *args)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
#define VLIB_CLI_COMMAND(x,...)
u32 bd_set_flags(vlib_main_t *vm, u32 bd_index, bd_flags_t flags, u32 enable)
Set the learn/forward/flood flags for the bridge domain.
static clib_error_t * gbp_bridge_domain_init(vlib_main_t *vm)
gbp_itf_hdl_t gb_bm_flood_itf
The BD's interface to sned Broadcast and multicast packets.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
void gbp_bridge_domain_itf_add(index_t gbdi, u32 sw_if_index, l2_bd_port_type_t type)
enum bd_flags_t_ bd_flags_t
int gbp_bridge_domain_add_and_lock(u32 bd_id, u32 rd_id, gbp_bridge_domain_flags_t flags, u32 bvi_sw_if_index, u32 uu_fwd_sw_if_index, u32 bm_flood_sw_if_index)
u32 bd_find_index(bd_main_t *bdm, u32 bd_id)
Get a bridge domain.
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
#define vec_validate_init_empty(V, I, INIT)
Make sure vector is long enough for given index and initialize empty space (no header,...
#define VLIB_INIT_FUNCTION(x)
u32 l2fib_del_entry(const u8 *mac, u32 bd_index, u32 sw_if_index)
Delete an entry from the l2fib.
gbp_bridge_domain_db_t gbp_bridge_domain_db
DB of bridge_domains.
u8 * format_gbp_bridge_domain_flags(u8 *s, va_list *args)
gbp_itf_hdl_t gbp_itf_l2_add_and_lock(u32 sw_if_index, index_t gbi)
static u8 * format_gbp_bridge_domain_ptr(u8 *s, va_list *args)
gbp_route_domain_t * gbp_route_domain_get(index_t i)
@ GBP_BD_FLAG_UU_FWD_DROP
index_t gbp_bridge_domain_find_and_lock(u32 bd_id)
A bridge Domain Representation.
index_t gbp_route_domain_find_and_lock(u32 rd_id)
u32 gb_uu_fwd_sw_if_index
The BD's MAC spine-proxy interface (optional)
static vlib_main_t * vlib_get_main(void)
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
int gbp_bridge_domain_delete(u32 bd_id)
static vlib_cli_command_t gbp_bridge_domain_cli_node
(constructor) VLIB_CLI_COMMAND (gbp_bridge_domain_cli_node)
enum gbp_bridge_domain_flags_t_ gbp_bridge_domain_flags_t
Bridge Domain Flags.
enum l2_bd_port_type_t_ l2_bd_port_type_t
bd_flags
Flags that can be changed on a bridge domain.
index_t gbp_bridge_domain_index(const gbp_bridge_domain_t *gbd)
static void gbp_bridge_domain_db_add(gbp_bridge_domain_t *gb)
static void gbp_bridge_domain_db_remove(gbp_bridge_domain_t *gb)
#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 sw_if_index
vl_api_interface_index_t uu_fwd_sw_if_index
gbp_bridge_domain_flags_t gb_flags
Flags conttrolling behaviour.
vl_api_fib_path_type_t type
index_t * gbd_by_bd_index
void gbp_route_domain_unlock(index_t index)
void gbp_itf_unlock(gbp_itf_hdl_t *gh)
void gbp_bridge_domain_unlock(index_t gbdi)
vl_api_wireguard_peer_flags_t flags