|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
39 u32 dev_instance = va_arg (*args,
u32);
40 return format (s,
"bvi%d", dev_instance);
73 #define BVI_MAX_INSTANCE (16 * 1024)
150 *sw_if_indexp = (
u32) ~ 0;
159 return VNET_API_ERROR_INVALID_REGISTRATION;
188 rv = VNET_API_ERROR_INVALID_REGISTRATION;
215 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
219 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
222 return VNET_API_ERROR_INVALID_SW_IF_INDEX;
287 .path =
"bvi create",
288 .short_help =
"bvi create [mac <mac-addr>] [instance <instance>]",
338 .path =
"bvi delete",
339 .short_help =
"bvi delete <interface>",
int l2_bvi_create(u32 user_instance, const mac_address_t *mac_in, u32 *sw_if_indexp)
void l2flood_register_input_type(vlib_main_t *vm, ethernet_type_t type, u32 node_index)
Add the L3 input node for this ethertype to the next nodes structure.
VNET_DEVICE_CLASS_TX_FN() bvi_device_class(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
send packets to l2-input.
static vlib_cli_command_t l2_bvi_create_command
(constructor) VLIB_CLI_COMMAND (l2_bvi_create_command)
VNET_DEVICE_CLASS(bvi_device_class)
#define clib_error_return(e, args...)
static clib_error_t * l2_bvi_delete_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
@ VNET_SW_INTERFACE_FLAG_ADMIN_UP
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
@ VNET_HW_INTERFACE_FLAG_LINK_UP
static vlib_cli_command_t l2_bvi_delete_command
(constructor) VLIB_CLI_COMMAND (l2_bvi_delete_command)
#define clib_error_report(e)
static uword clib_bitmap_first_clear(uword *ai)
Return the lowest numbered clear bit in a bitmap.
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
static_always_inline void mac_address_copy(mac_address_t *dst, const mac_address_t *src)
static uword clib_bitmap_get(uword *ai, uword i)
Gets the ith bit value from a bitmap.
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
vnet_main_t * vnet_get_main(void)
static clib_error_t * bvi_admin_up_down(vnet_main_t *vnm, u32 hw_if_index, u32 flags)
vnet_flood_class_t flood_class
static_always_inline int mac_address_is_zero(const mac_address_t *mac)
static u8 * format_bvi_name(u8 *s, va_list *args)
int l2_bvi_delete(u32 sw_if_index)
static_always_inline void mac_address_set_zero(mac_address_t *mac)
#define VLIB_CLI_COMMAND(x,...)
static uword * clib_bitmap_set(uword *ai, uword i, uword value)
Sets the ith bit of a bitmap to new_value Removes trailing zeros from the bitmap.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
vnet_sw_interface_t * sw_interfaces
uword vlib_node_add_named_next_with_slot(vlib_main_t *vm, uword node, char *name, uword slot)
static int bvi_instance_free(u32 instance)
void l2fwd_register_input_type(vlib_main_t *vm, ethernet_type_t type, u32 node_index)
Add the L3 input node for this ethertype to the next nodes structure.
void l2bvi_register_input_type(vlib_main_t *vm, ethernet_type_t type, u32 node_index)
format_function_t format_vnet_sw_if_index_name
unformat_function_t unformat_vnet_sw_interface
description fragment has unexpected format
uword unformat_mac_address_t(unformat_input_t *input, va_list *args)
static vnet_sw_interface_t * vnet_get_hw_sw_interface(vnet_main_t *vnm, u32 hw_if_index)
static vnet_hw_interface_t * vnet_get_sup_hw_interface(vnet_main_t *vnm, u32 sw_if_index)
void ethernet_delete_interface(vnet_main_t *vnm, u32 hw_if_index)
static vlib_main_t * vlib_get_main(void)
clib_error_t * vnet_hw_interface_set_flags(vnet_main_t *vnm, u32 hw_if_index, vnet_hw_interface_flags_t flags)
static clib_error_t * bvi_mac_change(vnet_hw_interface_t *hi, const u8 *old_address, const u8 *mac_address)
static clib_error_t * l2_bvi_create_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
static u32 bvi_instance_alloc(u32 want)
vl_api_interface_index_t sw_if_index
static uword * l2_bvi_instances
vl_api_fib_path_type_t type
clib_error_t * ethernet_register_interface(vnet_main_t *vnm, u32 dev_class_index, u32 dev_instance, const u8 *address, u32 *hw_if_index_return, ethernet_flag_change_function_t flag_change)
vnet_interface_main_t interface_main
static_always_inline void mac_address_from_bytes(mac_address_t *mac, const u8 *bytes)
manual_print typedef u8 mac_address[6]
vl_api_wireguard_peer_flags_t flags