FD.io VPP
v17.10-9-gd594711
Vector Packet Processing
|
Ethernet Flooding. More...
Go to the source code of this file.
Data Structures | |
struct | l2flood_main_t |
struct | l2flood_trace_t |
Macros | |
#define | foreach_l2flood_error |
Enumerations | |
enum | l2flood_error_t { L2FLOOD_N_ERROR } |
enum | l2flood_next_t { L2FLOOD_NEXT_L2_OUTPUT, L2FLOOD_NEXT_DROP, L2FLOOD_N_NEXT } |
Functions | |
static u8 * | format_l2flood_trace (u8 *s, va_list *args) |
static_always_inline void | l2flood_process (vlib_main_t *vm, vlib_node_runtime_t *node, l2flood_main_t *msm, u64 *counter_base, vlib_buffer_t *b0, u32 *sw_if_index0, l2fib_entry_key_t *key0, u32 *bucket0, l2fib_entry_result_t *result0, u32 *next0) |
static uword | l2flood_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame) |
clib_error_t * | l2flood_init (vlib_main_t *vm) |
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. More... | |
static clib_error_t * | int_flood (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd) |
Set subinterface flood enable/disable. More... | |
Variables | |
l2flood_main_t | l2flood_main |
static vlib_node_registration_t | l2flood_node |
(constructor) VLIB_REGISTER_NODE (l2flood_node) More... | |
static char * | l2flood_error_strings [] |
static vlib_cli_command_t | int_flood_cli |
(constructor) VLIB_CLI_COMMAND (int_flood_cli) More... | |
Ethernet Flooding.
Flooding uses the packet replication infrastructure to send a copy of the packet to each member interface. Logically the replication infrastructure expects two graph nodes: a prep node that initiates replication and sends the packet to the first destination, and a recycle node that is passed the packet after it has been transmitted.
To decrease the amount of code, l2 flooding implements both functions in the same graph node. This node can tell if is it being called as the "prep" or "recycle" using replication_is_recycled().
Definition in file l2_flood.c.
#define foreach_l2flood_error |
Definition at line 91 of file l2_flood.c.
enum l2flood_error_t |
Enumerator | |
---|---|
L2FLOOD_N_ERROR |
Definition at line 98 of file l2_flood.c.
enum l2flood_next_t |
Enumerator | |
---|---|
L2FLOOD_NEXT_L2_OUTPUT | |
L2FLOOD_NEXT_DROP | |
L2FLOOD_N_NEXT |
Definition at line 112 of file l2_flood.c.
Definition at line 74 of file l2_flood.c.
|
static |
Set subinterface flood enable/disable.
The CLI format is: set interface l2 flood <interface> [disable]
Definition at line 515 of file l2_flood.c.
clib_error_t* l2flood_init | ( | vlib_main_t * | vm | ) |
|
static |
static_always_inline void l2flood_process | ( | vlib_main_t * | vm, |
vlib_node_runtime_t * | node, | ||
l2flood_main_t * | msm, | ||
u64 * | counter_base, | ||
vlib_buffer_t * | b0, | ||
u32 * | sw_if_index0, | ||
l2fib_entry_key_t * | key0, | ||
u32 * | bucket0, | ||
l2fib_entry_result_t * | result0, | ||
u32 * | next0 | ||
) |
Definition at line 136 of file l2_flood.c.
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.
Definition at line 497 of file l2_flood.c.
|
static |
(constructor) VLIB_CLI_COMMAND (int_flood_cli)
Definition at line 555 of file l2_flood.c.
|
static |
Definition at line 106 of file l2_flood.c.
l2flood_main_t l2flood_main |
Definition at line 87 of file l2_flood.c.
|
static |
(constructor) VLIB_REGISTER_NODE (l2flood_node)
Definition at line 89 of file l2_flood.c.