FD.io VPP
v18.07-rc0-415-g6c78436
Vector Packet Processing
|
Interface Input Mode (Layer 2 Cross-Connect or Bridge / Layer 3). More...
Go to the source code of this file.
Data Structures | |
struct | l2input_trace_t |
Macros | |
#define | foreach_l2input_error |
#define | get_u16(addr) ( *((u16 *)(addr)) ) |
#define | foreach_l2_init_function |
Enumerations | |
enum | l2input_error_t { L2INPUT_N_ERROR } |
enum | l2input_next_t { L2INPUT_NEXT_LEARN, L2INPUT_NEXT_FWD, L2INPUT_NEXT_DROP, L2INPUT_N_NEXT } |
Functions | |
char ** | l2input_get_feat_names (void) |
Return an array of strings containing graph node names of each feature. More... | |
u8 * | format_l2_input_features (u8 *s, va_list *args) |
static u8 * | format_l2input_trace (u8 *s, va_list *args) |
static_always_inline void | classify_and_dispatch (l2input_main_t *msm, vlib_buffer_t *b0, u32 *next0) |
static_always_inline uword | l2input_node_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int do_trace) |
static uword | l2input_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
clib_error_t * | l2input_init (vlib_main_t *vm) |
l2_input_config_t * | l2input_intf_config (u32 sw_if_index) |
Get a pointer to the config for the given interface. More... | |
u32 | l2input_intf_bitmap_enable (u32 sw_if_index, u32 feature_bitmap, u32 enable) |
Enable (or disable) the feature in the bitmap for the given interface. More... | |
u32 | l2input_set_bridge_features (u32 bd_index, u32 feat_mask, u32 feat_value) |
u32 | set_int_l2_mode (vlib_main_t *vm, vnet_main_t *vnet_main, u32 mode, u32 sw_if_index, u32 bd_index, u32 bvi, u32 shg, u32 xc_sw_if_index) |
Set the subinterface to run in l2 or l3 mode. More... | |
static clib_error_t * | int_l2_bridge (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Set subinterface in bridging mode with a bridge-domain ID. More... | |
static clib_error_t * | int_l2_xc (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Set subinterface in xconnect mode with another interface. More... | |
static clib_error_t * | int_l3 (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Set subinterface in L3 mode. More... | |
static clib_error_t * | show_int_mode (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Show interface mode. More... | |
clib_error_t * | l2_init (vlib_main_t *vm) |
Variables | |
static char * | l2input_feat_names [] |
l2input_main_t | l2input_main |
static char * | l2input_error_strings [] |
vlib_node_registration_t | l2input_node |
(constructor) VLIB_REGISTER_NODE (l2input_node) More... | |
static vlib_cli_command_t | int_l2_bridge_cli |
(constructor) VLIB_CLI_COMMAND (int_l2_bridge_cli) More... | |
static vlib_cli_command_t | int_l2_xc_cli |
(constructor) VLIB_CLI_COMMAND (int_l2_xc_cli) More... | |
static vlib_cli_command_t | int_l3_cli |
(constructor) VLIB_CLI_COMMAND (int_l3_cli) More... | |
static vlib_cli_command_t | show_l2_mode |
(constructor) VLIB_CLI_COMMAND (show_l2_mode) More... | |
Interface Input Mode (Layer 2 Cross-Connect or Bridge / Layer 3).
This file contains the CLI Commands that modify the input mode of an interface. For interfaces in a Layer 2 cross-connect, all packets received on one interface will be transmitted to the other. For interfaces in a bridge-domain, packets will be forwarded to other interfaces in the same bridge-domain based on destination mac address. For interfaces in Layer 3 mode, the packets will be routed.
Definition in file l2_input.c.
#define foreach_l2_init_function |
Definition at line 1150 of file l2_input.c.
#define foreach_l2input_error |
Definition at line 115 of file l2_input.c.
enum l2input_error_t |
Enumerator | |
---|---|
L2INPUT_N_ERROR |
Definition at line 119 of file l2_input.c.
enum l2input_next_t |
Enumerator | |
---|---|
L2INPUT_NEXT_LEARN | |
L2INPUT_NEXT_FWD | |
L2INPUT_NEXT_DROP | |
L2INPUT_N_NEXT |
Definition at line 133 of file l2_input.c.
static_always_inline void classify_and_dispatch | ( | l2input_main_t * | msm, |
vlib_buffer_t * | b0, | ||
u32 * | next0 | ||
) |
Definition at line 143 of file l2_input.c.
Definition at line 66 of file l2_input.c.
|
static |
Set subinterface in bridging mode with a bridge-domain ID.
The CLI format is: set interface l2 bridge <interface> <bd> [bvi] [split-horizon-group]
Definition at line 818 of file l2_input.c.
|
static |
Set subinterface in xconnect mode with another interface.
The CLI format is: set interface l2 xconnect <interface> <peer interface>="">
Definition at line 926 of file l2_input.c.
|
static |
Set subinterface in L3 mode.
The CLI format is: set interface l3 <interface>
Definition at line 991 of file l2_input.c.
clib_error_t* l2_init | ( | vlib_main_t * | vm | ) |
char** l2input_get_feat_names | ( | void | ) |
Return an array of strings containing graph node names of each feature.
Definition at line 60 of file l2_input.c.
clib_error_t* l2input_init | ( | vlib_main_t * | vm | ) |
Enable (or disable) the feature in the bitmap for the given interface.
Definition at line 520 of file l2_input.c.
l2_input_config_t* l2input_intf_config | ( | u32 | sw_if_index | ) |
Get a pointer to the config for the given interface.
Masks for eliminating features that do not apply to a packet.
Definition at line 510 of file l2_input.c.
|
static |
static_always_inline uword l2input_node_inline | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
vlib_frame_t * | frame, | ||
int | do_trace | ||
) |
Definition at line 275 of file l2_input.c.
Definition at line 533 of file l2_input.c.
u32 set_int_l2_mode | ( | vlib_main_t * | vm, |
vnet_main_t * | vnet_main, | ||
u32 | mode, | ||
u32 | sw_if_index, | ||
u32 | bd_index, | ||
u32 | bvi, | ||
u32 | shg, | ||
u32 | xc_sw_if_index | ||
) |
Set the subinterface to run in l2 or l3 mode.
For L3 mode, just the sw_if_index is specified. For bridged mode, the bd id and bvi flag are also specified. For xconnect mode, the peer sw_if_index is also specified. Return 0 if ok, or non-0 if there was an error.
Definition at line 551 of file l2_input.c.
|
static |
Show interface mode.
The CLI format is: show mode [<if-name1> <if-name2> ...]
Definition at line 1040 of file l2_input.c.
|
static |
(constructor) VLIB_CLI_COMMAND (int_l2_bridge_cli)
Definition at line 913 of file l2_input.c.
|
static |
(constructor) VLIB_CLI_COMMAND (int_l2_xc_cli)
Definition at line 978 of file l2_input.c.
|
static |
(constructor) VLIB_CLI_COMMAND (int_l3_cli)
Definition at line 1027 of file l2_input.c.
|
static |
Definition at line 127 of file l2_input.c.
|
static |
Definition at line 53 of file l2_input.c.
l2input_main_t l2input_main |
Definition at line 113 of file l2_input.c.
vlib_node_registration_t l2input_node |
(constructor) VLIB_REGISTER_NODE (l2input_node)
Definition at line 458 of file l2_input.c.
|
static |
(constructor) VLIB_CLI_COMMAND (show_l2_mode)
Definition at line 1143 of file l2_input.c.