FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
l2_in_out_feat_arc.c File Reference
+ Include dependency graph for l2_in_out_feat_arc.c:

Go to the source code of this file.

Data Structures

struct  l2_in_out_feat_arc_main_t
 
struct  l2_in_out_feat_arc_trace_t
 

Macros

#define foreach_l2_in_feat_arc_error   _(DEFAULT, "in default") \
 
#define foreach_l2_out_feat_arc_error   _(DEFAULT, "out default") \
 
#define get_u16(addr)   ( *((u16 *)(addr)) )
 
#define L2_FEAT_ARC_VEC_SIZE   2
 

Enumerations

enum  l2_in_feat_arc_error_t { FA_IN_NONIP_N_ERROR, L2_IN_FEAT_ARC_N_ERROR }
 
enum  l2_out_feat_arc_error_t { FA_OUT_NONIP_N_ERROR, L2_OUT_FEAT_ARC_N_ERROR }
 

Functions

static u8format_l2_in_out_feat_arc_trace (u8 *s, u32 is_output, va_list *args)
 
static u8format_l2_in_feat_arc_trace (u8 *s, va_list *args)
 
static u8format_l2_out_feat_arc_trace (u8 *s, va_list *args)
 
static_always_inline void buffer_prefetch_xN (int vector_sz, vlib_buffer_t **b)
 
static_always_inline void get_sw_if_index_xN (int vector_sz, int is_output, vlib_buffer_t **b, u32 *out_sw_if_index)
 
static_always_inline void get_ethertype_xN (int vector_sz, int is_output, vlib_buffer_t **b, u16 *out_ethertype)
 
static_always_inline void set_next_in_arc_head_xN (int vector_sz, int is_output, u32 *next_nodes, vlib_buffer_t **b, u32 *sw_if_index, u16 *ethertype, u8 ip4_arc, u8 ip6_arc, u8 nonip_arc, u16 *out_next)
 
static_always_inline void set_next_in_arc_tail_xN (int vector_sz, int is_output, u32 *next_nodes, vlib_buffer_t **b, u16 *out_next)
 
static_always_inline void maybe_trace_xN (int vector_sz, int arc_head, vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t **b, u32 *sw_if_index, u16 *ethertype, u16 *next)
 
static uword l2_in_out_feat_arc_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_output, vlib_node_registration_t *fa_node, int arc_head, int do_trace)
 
VLIB_NODE_FN() l2_in_feat_arc_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() l2_out_feat_arc_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() l2_in_feat_arc_end_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() l2_out_feat_arc_end_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
void vnet_l2_in_out_feat_arc_enable_disable (u32 sw_if_index, int is_output, int enable_disable)
 
 VNET_FEATURE_ARC_INIT (l2_in_ip4_arc, static)
 
 VNET_FEATURE_ARC_INIT (l2_out_ip4_arc, static)
 
 VNET_FEATURE_ARC_INIT (l2_out_ip6_arc, static)
 
 VNET_FEATURE_ARC_INIT (l2_in_ip6_arc, static)
 
 VNET_FEATURE_ARC_INIT (l2_out_nonip_arc, static)
 
 VNET_FEATURE_ARC_INIT (l2_in_nonip_arc, static)
 
 VNET_FEATURE_INIT (l2_in_ip4_arc_end, static)
 
 VNET_FEATURE_INIT (l2_out_ip4_arc_end, static)
 
 VNET_FEATURE_INIT (l2_in_ip6_arc_end, static)
 
 VNET_FEATURE_INIT (l2_out_ip6_arc_end, static)
 
 VNET_FEATURE_INIT (l2_in_nonip_arc_end, static)
 
 VNET_FEATURE_INIT (l2_out_nonip_arc_end, static)
 
clib_error_tl2_in_out_feat_arc_init (vlib_main_t *vm)
 
static int l2_has_features (u32 sw_if_index, int is_output)
 
static int l2_is_output_arc (u8 arc_index)
 
static int l2_is_input_arc (u8 arc_index)
 
int vnet_l2_feature_enable_disable (const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
 

Variables

static char * l2_in_feat_arc_error_strings []
 
static char * l2_out_feat_arc_error_strings []
 
l2_in_out_feat_arc_main_t l2_in_out_feat_arc_main
 
vlib_node_registration_t l2_in_feat_arc_node
 (constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_node) More...
 
vlib_node_registration_t l2_out_feat_arc_node
 (constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_node) More...
 
vlib_node_registration_t l2_in_feat_arc_end_node
 (constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_end_node) More...
 
vlib_node_registration_t l2_out_feat_arc_end_node
 (constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_end_node) More...
 

Macro Definition Documentation

◆ foreach_l2_in_feat_arc_error

#define foreach_l2_in_feat_arc_error   _(DEFAULT, "in default") \

Definition at line 84 of file l2_in_out_feat_arc.c.

◆ foreach_l2_out_feat_arc_error

#define foreach_l2_out_feat_arc_error   _(DEFAULT, "out default") \

Definition at line 88 of file l2_in_out_feat_arc.c.

◆ get_u16

#define get_u16 (   addr)    ( *((u16 *)(addr)) )

Definition at line 126 of file l2_in_out_feat_arc.c.

◆ L2_FEAT_ARC_VEC_SIZE

#define L2_FEAT_ARC_VEC_SIZE   2

Definition at line 127 of file l2_in_out_feat_arc.c.

Enumeration Type Documentation

◆ l2_in_feat_arc_error_t

Enumerator
FA_IN_NONIP_N_ERROR 
L2_IN_FEAT_ARC_N_ERROR 

Definition at line 92 of file l2_in_out_feat_arc.c.

◆ l2_out_feat_arc_error_t

Enumerator
FA_OUT_NONIP_N_ERROR 
L2_OUT_FEAT_ARC_N_ERROR 

Definition at line 106 of file l2_in_out_feat_arc.c.

Function Documentation

◆ buffer_prefetch_xN()

static_always_inline void buffer_prefetch_xN ( int  vector_sz,
vlib_buffer_t **  b 
)

Definition at line 130 of file l2_in_out_feat_arc.c.

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

◆ format_l2_in_feat_arc_trace()

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

Definition at line 68 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

◆ format_l2_in_out_feat_arc_trace()

static u8* format_l2_in_out_feat_arc_trace ( u8 s,
u32  is_output,
va_list *  args 
)
static

Definition at line 52 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

◆ format_l2_out_feat_arc_trace()

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

Definition at line 76 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

◆ get_ethertype_xN()

static_always_inline void get_ethertype_xN ( int  vector_sz,
int  is_output,
vlib_buffer_t **  b,
u16 out_ethertype 
)

Definition at line 150 of file l2_in_out_feat_arc.c.

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

◆ get_sw_if_index_xN()

static_always_inline void get_sw_if_index_xN ( int  vector_sz,
int  is_output,
vlib_buffer_t **  b,
u32 out_sw_if_index 
)

Definition at line 138 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

◆ l2_has_features()

static int l2_has_features ( u32  sw_if_index,
int  is_output 
)
static

Definition at line 548 of file l2_in_out_feat_arc.c.

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

◆ l2_in_feat_arc_end_node()

VLIB_NODE_FN() l2_in_feat_arc_end_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 355 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

◆ l2_in_feat_arc_node()

VLIB_NODE_FN() l2_in_feat_arc_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 327 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

◆ l2_in_out_feat_arc_init()

clib_error_t* l2_in_out_feat_arc_init ( vlib_main_t vm)

Definition at line 528 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

◆ l2_in_out_feat_arc_node_fn()

static uword l2_in_out_feat_arc_node_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_output,
vlib_node_registration_t fa_node,
int  arc_head,
int  do_trace 
)
inlinestatic

Definition at line 234 of file l2_in_out_feat_arc.c.

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

◆ l2_is_input_arc()

static int l2_is_input_arc ( u8  arc_index)
static

Definition at line 572 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

◆ l2_is_output_arc()

static int l2_is_output_arc ( u8  arc_index)
static

Definition at line 562 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

◆ l2_out_feat_arc_end_node()

VLIB_NODE_FN() l2_out_feat_arc_end_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 369 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

◆ l2_out_feat_arc_node()

VLIB_NODE_FN() l2_out_feat_arc_node ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 341 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

◆ maybe_trace_xN()

static_always_inline void maybe_trace_xN ( int  vector_sz,
int  arc_head,
vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t **  b,
u32 sw_if_index,
u16 ethertype,
u16 next 
)

Definition at line 215 of file l2_in_out_feat_arc.c.

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

◆ set_next_in_arc_head_xN()

static_always_inline void set_next_in_arc_head_xN ( int  vector_sz,
int  is_output,
u32 next_nodes,
vlib_buffer_t **  b,
u32 sw_if_index,
u16 ethertype,
u8  ip4_arc,
u8  ip6_arc,
u8  nonip_arc,
u16 out_next 
)

Definition at line 164 of file l2_in_out_feat_arc.c.

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

◆ set_next_in_arc_tail_xN()

static_always_inline void set_next_in_arc_tail_xN ( int  vector_sz,
int  is_output,
u32 next_nodes,
vlib_buffer_t **  b,
u16 out_next 
)

Definition at line 199 of file l2_in_out_feat_arc.c.

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

◆ VNET_FEATURE_ARC_INIT() [1/6]

VNET_FEATURE_ARC_INIT ( l2_in_ip4_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [2/6]

VNET_FEATURE_ARC_INIT ( l2_in_ip6_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [3/6]

VNET_FEATURE_ARC_INIT ( l2_in_nonip_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [4/6]

VNET_FEATURE_ARC_INIT ( l2_out_ip4_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [5/6]

VNET_FEATURE_ARC_INIT ( l2_out_ip6_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [6/6]

VNET_FEATURE_ARC_INIT ( l2_out_nonip_arc  ,
static   
)

◆ VNET_FEATURE_INIT() [1/6]

VNET_FEATURE_INIT ( l2_in_ip4_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [2/6]

VNET_FEATURE_INIT ( l2_in_ip6_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [3/6]

VNET_FEATURE_INIT ( l2_in_nonip_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [4/6]

VNET_FEATURE_INIT ( l2_out_ip4_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [5/6]

VNET_FEATURE_INIT ( l2_out_ip6_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [6/6]

VNET_FEATURE_INIT ( l2_out_nonip_arc_end  ,
static   
)

◆ vnet_l2_feature_enable_disable()

int vnet_l2_feature_enable_disable ( const char *  arc_name,
const char *  node_name,
u32  sw_if_index,
int  enable_disable,
void *  feature_config,
u32  n_feature_config_bytes 
)

Definition at line 582 of file l2_in_out_feat_arc.c.

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

◆ vnet_l2_in_out_feat_arc_enable_disable()

void vnet_l2_in_out_feat_arc_enable_disable ( u32  sw_if_index,
int  is_output,
int  enable_disable 
)

Definition at line 386 of file l2_in_out_feat_arc.c.

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

Variable Documentation

◆ l2_in_feat_arc_end_node

vlib_node_registration_t l2_in_feat_arc_end_node
Initial value:
= {
.name = "l2-input-feat-arc-end",
.vector_size = sizeof (u32),
.format_trace = format_l2_in_feat_arc_trace,
.sibling_of = "l2-input-feat-arc",
}

(constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_end_node)

Definition at line 466 of file l2_in_out_feat_arc.c.

◆ l2_in_feat_arc_error_strings

char* l2_in_feat_arc_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 100 of file l2_in_out_feat_arc.c.

◆ l2_in_feat_arc_node

vlib_node_registration_t l2_in_feat_arc_node
Initial value:
= {
.name = "l2-input-feat-arc",
.vector_size = sizeof (u32),
.format_trace = format_l2_in_feat_arc_trace,
.error_strings = l2_in_feat_arc_error_strings,
}

(constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_node)

Definition at line 444 of file l2_in_out_feat_arc.c.

◆ l2_in_out_feat_arc_main

l2_in_out_feat_arc_main_t l2_in_out_feat_arc_main

Definition at line 123 of file l2_in_out_feat_arc.c.

◆ l2_out_feat_arc_end_node

vlib_node_registration_t l2_out_feat_arc_end_node
Initial value:
= {
.name = "l2-output-feat-arc-end",
.vector_size = sizeof (u32),
.sibling_of = "l2-output-feat-arc",
}

(constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_end_node)

Definition at line 473 of file l2_in_out_feat_arc.c.

◆ l2_out_feat_arc_error_strings

char* l2_out_feat_arc_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 114 of file l2_in_out_feat_arc.c.

◆ l2_out_feat_arc_node

vlib_node_registration_t l2_out_feat_arc_node
Initial value:
= {
.name = "l2-output-feat-arc",
.vector_size = sizeof (u32),
}

(constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_node)

Definition at line 455 of file l2_in_out_feat_arc.c.

format_l2_out_feat_arc_trace
static u8 * format_l2_out_feat_arc_trace(u8 *s, va_list *args)
Definition: l2_in_out_feat_arc.c:76
l2_in_feat_arc_error_strings
static char * l2_in_feat_arc_error_strings[]
Definition: l2_in_out_feat_arc.c:100
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
format_l2_in_feat_arc_trace
static u8 * format_l2_in_feat_arc_trace(u8 *s, va_list *args)
Definition: l2_in_out_feat_arc.c:68
foreach_l2_out_feat_arc_error
#define foreach_l2_out_feat_arc_error
Definition: l2_in_out_feat_arc.c:88
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
foreach_l2_in_feat_arc_error
#define foreach_l2_in_feat_arc_error
Definition: l2_in_out_feat_arc.c:84
u32
unsigned int u32
Definition: types.h:88
l2_out_feat_arc_error_strings
static char * l2_out_feat_arc_error_strings[]
Definition: l2_in_out_feat_arc.c:114
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123