FD.io VPP  v19.08.3-2-gbabecb413
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 { L2_IN_FEAT_ARC_N_ERROR, FA_IN_NONIP_N_ERROR }
 
enum  l2_out_feat_arc_error_t { L2_OUT_FEAT_ARC_N_ERROR, FA_OUT_NONIP_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 95 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 99 of file l2_in_out_feat_arc.c.

◆ get_u16

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

Definition at line 137 of file l2_in_out_feat_arc.c.

◆ L2_FEAT_ARC_VEC_SIZE

#define L2_FEAT_ARC_VEC_SIZE   2

Definition at line 138 of file l2_in_out_feat_arc.c.

Enumeration Type Documentation

◆ l2_in_feat_arc_error_t

Enumerator
L2_IN_FEAT_ARC_N_ERROR 
FA_IN_NONIP_N_ERROR 

Definition at line 103 of file l2_in_out_feat_arc.c.

◆ l2_out_feat_arc_error_t

Enumerator
L2_OUT_FEAT_ARC_N_ERROR 
FA_OUT_NONIP_N_ERROR 

Definition at line 117 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 141 of file l2_in_out_feat_arc.c.

+ 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 79 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 63 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_out_feat_arc_trace()

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

Definition at line 87 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 161 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 149 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 562 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 366 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 338 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 539 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 245 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 586 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 576 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 380 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 352 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 226 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 175 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 210 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   
)
+ Here is the caller graph for this function:

◆ VNET_FEATURE_ARC_INIT() [2/6]

VNET_FEATURE_ARC_INIT ( l2_out_ip4_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [3/6]

VNET_FEATURE_ARC_INIT ( l2_out_ip6_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [4/6]

VNET_FEATURE_ARC_INIT ( l2_in_ip6_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [5/6]

VNET_FEATURE_ARC_INIT ( l2_out_nonip_arc  ,
static   
)

◆ VNET_FEATURE_ARC_INIT() [6/6]

VNET_FEATURE_ARC_INIT ( l2_in_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_out_ip4_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [3/6]

VNET_FEATURE_INIT ( l2_in_ip6_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [4/6]

VNET_FEATURE_INIT ( l2_out_ip6_arc_end  ,
static   
)

◆ VNET_FEATURE_INIT() [5/6]

VNET_FEATURE_INIT ( l2_in_nonip_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 596 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 397 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",
}
static u8 * format_l2_in_feat_arc_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_end_node)

Definition at line 477 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)
}
#define foreach_l2_in_feat_arc_error

Definition at line 111 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,
}
static char * l2_in_feat_arc_error_strings[]
static u8 * format_l2_in_feat_arc_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63

(constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_node)

Definition at line 455 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 134 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",
}
static u8 * format_l2_out_feat_arc_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88

(constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_end_node)

Definition at line 484 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)
}
#define foreach_l2_out_feat_arc_error

Definition at line 125 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),
}
static u8 * format_l2_out_feat_arc_trace(u8 *s, va_list *args)
unsigned int u32
Definition: types.h:88
vl_api_fib_path_type_t type
Definition: fib_types.api:123
static char * l2_out_feat_arc_error_strings[]
#define ARRAY_LEN(x)
Definition: clib.h:63

(constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_node)

Definition at line 466 of file l2_in_out_feat_arc.c.