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

Go to the source code of this file.

Data Structures

struct  l2_classify_trace_t
 
struct  l2_classify_runtime_t
 

Macros

#define foreach_l2_classify_error
 

Enumerations

enum  l2_classify_error_t { L2_CLASSIFY_N_ERROR }
 

Functions

static u8format_l2_classify_trace (u8 *s, va_list *args)
 
static uword l2_classify_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tl2_classify_init (vlib_main_t *vm)
 
void vnet_l2_classify_enable_disable (u32 sw_if_index, int enable_disable)
 
int vnet_l2_classify_set_tables (u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
 
static clib_error_tint_l2_classify_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

l2_classify_main_t l2_classify_main
 
vlib_node_registration_t l2_classify_node
 (constructor) VLIB_REGISTER_NODE (l2_classify_node) More...
 
static char * l2_classify_error_strings []
 
vlib_cli_command_t int_l2_classify_cli
 (constructor) VLIB_CLI_COMMAND (int_l2_classify_cli) More...
 

Macro Definition Documentation

#define foreach_l2_classify_error
Value:
_(MISS, "Classify misses") \
_(HIT, "Classify hits") \
_(CHAIN_HIT, "Classify hits after chain walk") \
_(DROP, "L2 Classify Drops")
DROP
Definition: error.def:41

Definition at line 51 of file l2_classify.c.

Enumeration Type Documentation

Enumerator
L2_CLASSIFY_N_ERROR 

Definition at line 57 of file l2_classify.c.

Function Documentation

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

Definition at line 36 of file l2_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 489 of file l2_classify.c.

+ Here is the call graph for this function:

clib_error_t* l2_classify_init ( vlib_main_t vm)

Definition at line 402 of file l2_classify.c.

+ Here is the call graph for this function:

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

Definition at line 71 of file l2_classify.c.

+ Here is the call graph for this function:

void vnet_l2_classify_enable_disable ( u32  sw_if_index,
int  enable_disable 
)

Definition at line 428 of file l2_classify.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int vnet_l2_classify_set_tables ( u32  sw_if_index,
u32  ip4_table_index,
u32  ip6_table_index,
u32  other_table_index 
)

Definition at line 442 of file l2_classify.c.

+ Here is the caller graph for this function:

Variable Documentation

vlib_cli_command_t int_l2_classify_cli
Initial value:
= {
.path = "set interface l2 classify",
.short_help =
"set interface l2 classify intfc <int> [ip4-table <n>]\n"
" [ip6-table <n>] [other-table <n>]",
}
static clib_error_t * int_l2_classify_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_classify.c:489

(constructor) VLIB_CLI_COMMAND (int_l2_classify_cli)

Definition at line 544 of file l2_classify.c.

char* l2_classify_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_l2_classify_error
Definition: l2_classify.c:51

Definition at line 64 of file l2_classify.c.

l2_classify_main_t l2_classify_main

Definition at line 47 of file l2_classify.c.

vlib_node_registration_t l2_classify_node
Initial value:
= {
.function = l2_classify_node_fn,
.name = "l2-classify",
.vector_size = sizeof (u32),
.format_trace = format_l2_classify_trace,
.error_strings = l2_classify_error_strings,
.runtime_data_bytes = sizeof (l2_classify_runtime_t),
.n_next_nodes = L2_CLASSIFY_N_NEXT,
.next_nodes = {
[L2_CLASSIFY_NEXT_DROP] = "error-drop",
[L2_CLASSIFY_NEXT_ETHERNET_INPUT] = "ethernet-input-not-l2",
[L2_CLASSIFY_NEXT_IP4_INPUT] = "ip4-input",
[L2_CLASSIFY_NEXT_IP6_INPUT] = "ip6-input",
[L2_CLASSIFY_NEXT_LI] = "li-hit",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static char * l2_classify_error_strings[]
Definition: l2_classify.c:64
static u8 * format_l2_classify_trace(u8 *s, va_list *args)
Definition: l2_classify.c:36
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static uword l2_classify_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: l2_classify.c:71

(constructor) VLIB_REGISTER_NODE (l2_classify_node)

Definition at line 49 of file l2_classify.c.