FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
l2e.c File Reference
+ Include dependency graph for l2e.c:

Go to the source code of this file.

Functions

__clib_export void l2_emulation_enable (u32 sw_if_index)
 L2 Emulation is a feautre that is applied to L2 ports to 'extract' IP packets from the L2 path and inject them into the L3 path (i.e. More...
 
__clib_export void l2_emulation_disable (u32 sw_if_index)
 
static clib_error_tl2_emulation_interface_add_del (vnet_main_t *vnm, u32 sw_if_index, u32 is_add)
 
 VNET_SW_INTERFACE_ADD_DEL_FUNCTION (l2_emulation_interface_add_del)
 
static clib_error_tl2_emulation_cli (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tl2_emulation_show (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tl2_emulation_init (vlib_main_t *vm)
 

Variables

l2_emulation_main_t l2_emulation_main
 
static const l2_emulation_t ezero = { }
 A zero'd out struct we can use in the vec_validate. More...
 
static vlib_cli_command_t l2_emulation_cli_node
 (constructor) VLIB_CLI_COMMAND (l2_emulation_cli_node) More...
 
static vlib_cli_command_t l2_emulation_show_node
 (constructor) VLIB_CLI_COMMAND (l2_emulation_show_node) More...
 

Function Documentation

◆ l2_emulation_cli()

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

Definition at line 84 of file l2e.c.

+ Here is the call graph for this function:

◆ l2_emulation_disable()

__clib_export void l2_emulation_disable ( u32  sw_if_index)

Definition at line 54 of file l2e.c.

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

◆ l2_emulation_enable()

__clib_export void l2_emulation_enable ( u32  sw_if_index)

L2 Emulation is a feautre that is applied to L2 ports to 'extract' IP packets from the L2 path and inject them into the L3 path (i.e.

into the appropriate ip[4|6]_input node). L3 routes in the table_id for that interface should then be configured as DVR routes, therefore the forwarded packet has the L2 header preserved and togehter the L3 routed system behaves like an L2 bridge.

Definition at line 32 of file l2e.c.

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

◆ l2_emulation_init()

static clib_error_t* l2_emulation_init ( vlib_main_t vm)
static

Definition at line 172 of file l2e.c.

+ Here is the call graph for this function:

◆ l2_emulation_interface_add_del()

static clib_error_t* l2_emulation_interface_add_del ( vnet_main_t vnm,
u32  sw_if_index,
u32  is_add 
)
static

Definition at line 69 of file l2e.c.

◆ l2_emulation_show()

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

Definition at line 134 of file l2e.c.

+ Here is the call graph for this function:

◆ VNET_SW_INTERFACE_ADD_DEL_FUNCTION()

VNET_SW_INTERFACE_ADD_DEL_FUNCTION ( l2_emulation_interface_add_del  )

Variable Documentation

◆ ezero

const l2_emulation_t ezero = { }
static

A zero'd out struct we can use in the vec_validate.

Definition at line 29 of file l2e.c.

◆ l2_emulation_cli_node

vlib_cli_command_t l2_emulation_cli_node
static
Initial value:
= {
.path = "set interface l2 l2-emulation",
.short_help =
"set interface l2 l2-emulation <interface-name> [disable|enable]\n",
.function = l2_emulation_cli,
}

(constructor) VLIB_CLI_COMMAND (l2_emulation_cli_node)

Definition at line 125 of file l2e.c.

◆ l2_emulation_main

l2_emulation_main_t l2_emulation_main

Definition at line 24 of file l2e.c.

◆ l2_emulation_show_node

vlib_cli_command_t l2_emulation_show_node
static
Initial value:
= {
.path = "show interface l2 l2-emulation",
.short_help = "show interface l2 l2-emulation\n",
.function = l2_emulation_show,
}

(constructor) VLIB_CLI_COMMAND (l2_emulation_show_node)

Definition at line 164 of file l2e.c.

l2_emulation_cli
static clib_error_t * l2_emulation_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2e.c:84
l2_emulation_show
static clib_error_t * l2_emulation_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2e.c:134