FD.io VPP  v16.06
Vector Packet Processing
l2_learn.c File Reference
+ Include dependency graph for l2_learn.c:

Go to the source code of this file.

Data Structures

struct  l2learn_trace_t
 

Macros

#define foreach_l2learn_error
 

Enumerations

enum  l2learn_error_t { L2LEARN_N_ERROR }
 
enum  l2learn_next_t { L2LEARN_NEXT_L2FWD, L2LEARN_NEXT_DROP, L2LEARN_N_NEXT }
 

Functions

static u8format_l2learn_trace (u8 *s, va_list *args)
 
static_always_inline void l2learn_process (vlib_node_runtime_t *node, l2learn_main_t *msm, u64 *counter_base, vlib_buffer_t *b0, u32 sw_if_index0, l2fib_entry_key_t *key0, l2fib_entry_key_t *cached_key, u32 *bucket0, l2fib_entry_result_t *result0, u32 *next0)
 
static uword l2learn_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tl2learn_init (vlib_main_t *vm)
 
static clib_error_tint_learn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tl2learn_config (vlib_main_t *vm, unformat_input_t *input)
 

Variables

static vlib_node_registration_t l2learn_node
 (constructor) VLIB_REGISTER_NODE (l2learn_node) More...
 
static char * l2learn_error_strings []
 
vlib_cli_command_t int_learn_cli
 (constructor) VLIB_CLI_COMMAND (int_learn_cli) More...
 

Macro Definition Documentation

#define foreach_l2learn_error
Value:
_(L2LEARN, "L2 learn packets") \
_(MISS, "L2 learn misses") \
_(MAC_MOVE, "L2 mac moves") \
_(MAC_MOVE_VIOLATE, "L2 mac move violations") \
_(LIMIT, "L2 not learned due to limit") \
_(HIT, "L2 learn hits") \
_(FILTER_DROP, "L2 filter mac drops")

Definition at line 73 of file l2_learn.c.

Enumeration Type Documentation

Enumerator
L2LEARN_N_ERROR 

Definition at line 82 of file l2_learn.c.

Enumerator
L2LEARN_NEXT_L2FWD 
L2LEARN_NEXT_DROP 
L2LEARN_N_NEXT 

Definition at line 95 of file l2_learn.c.

Function Documentation

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

Definition at line 57 of file l2_learn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 450 of file l2_learn.c.

+ Here is the call graph for this function:

static clib_error_t* l2learn_config ( vlib_main_t vm,
unformat_input_t input 
)
static

Definition at line 486 of file l2_learn.c.

+ Here is the call graph for this function:

clib_error_t* l2learn_init ( vlib_main_t vm)

Definition at line 419 of file l2_learn.c.

+ Here is the call graph for this function:

static uword l2learn_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
static

Definition at line 211 of file l2_learn.c.

+ Here is the call graph for this function:

static_always_inline void l2learn_process ( vlib_node_runtime_t node,
l2learn_main_t msm,
u64 counter_base,
vlib_buffer_t b0,
u32  sw_if_index0,
l2fib_entry_key_t key0,
l2fib_entry_key_t cached_key,
u32 bucket0,
l2fib_entry_result_t result0,
u32 next0 
)

Definition at line 105 of file l2_learn.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t int_learn_cli
Initial value:
= {
.path = "set interface l2 learn",
.short_help = "set interface l2 learn <interface> [disable]",
.function = int_learn,
}
static clib_error_t * int_learn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_learn.c:450

(constructor) VLIB_CLI_COMMAND (int_learn_cli)

Definition at line 478 of file l2_learn.c.

char* l2learn_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_l2learn_error
Definition: l2_learn.c:73

Definition at line 89 of file l2_learn.c.

vlib_node_registration_t l2learn_node
static
Initial value:
= {
.function = l2learn_node_fn,
.name = "l2-learn",
.vector_size = sizeof (u32),
.format_trace = format_l2learn_trace,
.error_strings = l2learn_error_strings,
.n_next_nodes = L2LEARN_N_NEXT,
.next_nodes = {
[L2LEARN_NEXT_DROP] = "error-drop",
[L2LEARN_NEXT_L2FWD] = "l2-fwd",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static char * l2learn_error_strings[]
Definition: l2_learn.c:89
static u8 * format_l2learn_trace(u8 *s, va_list *args)
Definition: l2_learn.c:57
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static uword l2learn_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: l2_learn.c:211

(constructor) VLIB_REGISTER_NODE (l2learn_node)

Definition at line 71 of file l2_learn.c.