FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
l2_bvi.c File Reference
+ Include dependency graph for l2_bvi.c:

Go to the source code of this file.

Macros

#define BVI_MAX_INSTANCE   (16 * 1024)
 

Functions

void l2bvi_register_input_type (vlib_main_t *vm, ethernet_type_t type, u32 node_index)
 
static u8format_bvi_name (u8 *s, va_list *args)
 
static clib_error_tbvi_admin_up_down (vnet_main_t *vnm, u32 hw_if_index, u32 flags)
 
static clib_error_tbvi_mac_change (vnet_hw_interface_t *hi, const u8 *old_address, const u8 *mac_address)
 
 VNET_DEVICE_CLASS (bvi_device_class)
 
static u32 bvi_instance_alloc (u32 want)
 
static int bvi_instance_free (u32 instance)
 
int l2_bvi_create (u32 user_instance, const mac_address_t *mac_in, u32 *sw_if_indexp)
 
int l2_bvi_delete (u32 sw_if_index)
 
static clib_error_tl2_bvi_create_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tl2_bvi_delete_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static uwordl2_bvi_instances
 
static vlib_cli_command_t l2_bvi_create_command
 (constructor) VLIB_CLI_COMMAND (l2_bvi_create_command) More...
 
static vlib_cli_command_t l2_bvi_delete_command
 (constructor) VLIB_CLI_COMMAND (l2_bvi_delete_command) More...
 

Macro Definition Documentation

◆ BVI_MAX_INSTANCE

#define BVI_MAX_INSTANCE   (16 * 1024)

Definition at line 73 of file l2_bvi.c.

Function Documentation

◆ bvi_admin_up_down()

static clib_error_t* bvi_admin_up_down ( vnet_main_t vnm,
u32  hw_if_index,
u32  flags 
)
static

Definition at line 44 of file l2_bvi.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bvi_instance_alloc()

static u32 bvi_instance_alloc ( u32  want)
static

Definition at line 76 of file l2_bvi.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bvi_instance_free()

static int bvi_instance_free ( u32  instance)
static

Definition at line 119 of file l2_bvi.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ bvi_mac_change()

static clib_error_t* bvi_mac_change ( vnet_hw_interface_t hi,
const u8 old_address,
const u8 mac_address 
)
static

Definition at line 53 of file l2_bvi.c.

+ Here is the call graph for this function:

◆ format_bvi_name()

static u8* format_bvi_name ( u8 s,
va_list *  args 
)
static

Definition at line 37 of file l2_bvi.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ l2_bvi_create()

int l2_bvi_create ( u32  user_instance,
const mac_address_t mac_in,
u32 sw_if_indexp 
)

Definition at line 136 of file l2_bvi.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ l2_bvi_create_cli()

static clib_error_t* l2_bvi_create_cli ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 230 of file l2_bvi.c.

+ Here is the call graph for this function:

◆ l2_bvi_delete()

int l2_bvi_delete ( u32  sw_if_index)

Definition at line 210 of file l2_bvi.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ l2_bvi_delete_cli()

static clib_error_t* l2_bvi_delete_cli ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 294 of file l2_bvi.c.

+ Here is the call graph for this function:

◆ l2bvi_register_input_type()

void l2bvi_register_input_type ( vlib_main_t vm,
ethernet_type_t  type,
u32  node_index 
)

Definition at line 29 of file l2_bvi.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VNET_DEVICE_CLASS()

VNET_DEVICE_CLASS ( bvi_device_class  )
+ Here is the caller graph for this function:

Variable Documentation

◆ l2_bvi_create_command

vlib_cli_command_t l2_bvi_create_command
static
Initial value:
= {
.path = "bvi create",
.short_help = "bvi create [mac <mac-addr>] [instance <instance>]",
.function = l2_bvi_create_cli,
}
static clib_error_t * l2_bvi_create_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bvi.c:230

(constructor) VLIB_CLI_COMMAND (l2_bvi_create_command)

Definition at line 286 of file l2_bvi.c.

◆ l2_bvi_delete_command

vlib_cli_command_t l2_bvi_delete_command
static
Initial value:
= {
.path = "bvi delete",
.short_help = "bvi delete <interface>",
.function = l2_bvi_delete_cli,
}
static clib_error_t * l2_bvi_delete_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_bvi.c:294

(constructor) VLIB_CLI_COMMAND (l2_bvi_delete_command)

Definition at line 337 of file l2_bvi.c.

◆ l2_bvi_instances

uword* l2_bvi_instances
static

Definition at line 25 of file l2_bvi.c.