FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
l2e.c File Reference
+ Include dependency graph for l2e.c:

Go to the source code of this file.

Functions

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...
 
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 83 of file l2e.c.

+ Here is the call graph for this function:

◆ l2_emulation_disable()

void l2_emulation_disable ( u32  sw_if_index)

Definition at line 53 of file l2e.c.

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

◆ l2_emulation_enable()

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 31 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 171 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 68 of file l2e.c.

+ Here is the call graph for this function:

◆ 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 133 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  )
+ Here is the caller graph for this function:

Variable Documentation

◆ ezero

const l2_emulation_t ezero = { }
static

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

Definition at line 28 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,
}
static clib_error_t * l2_emulation_cli(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2e.c:83

(constructor) VLIB_CLI_COMMAND (l2_emulation_cli_node)

Definition at line 124 of file l2e.c.

◆ l2_emulation_main

l2_emulation_main_t l2_emulation_main

Definition at line 23 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,
}
static clib_error_t * l2_emulation_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2e.c:133

(constructor) VLIB_CLI_COMMAND (l2_emulation_show_node)

Definition at line 163 of file l2e.c.