FD.io VPP  v19.01.2-3-gf61a1a8
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)
 
static uword l2_in_feat_arc_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword l2_out_feat_arc_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword l2_in_feat_arc_end_node_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static uword l2_out_feat_arc_end_node_fn (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
 
static vlib_node_registration_t l2_in_feat_arc_node
 (constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_node) More...
 
static vlib_node_registration_t l2_out_feat_arc_node
 (constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_node) More...
 
static vlib_node_registration_t l2_in_feat_arc_end_node
 (constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_end_node) More...
 
static vlib_node_registration_t l2_out_feat_arc_end_node
 (constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_end_node) More...
 

Macro Definition Documentation

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

Definition at line 95 of file l2_in_out_feat_arc.c.

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

Definition at line 99 of file l2_in_out_feat_arc.c.

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

Definition at line 134 of file l2_in_out_feat_arc.c.

#define L2_FEAT_ARC_VEC_SIZE   2

Definition at line 135 of file l2_in_out_feat_arc.c.

Enumeration Type Documentation

Enumerator
L2_IN_FEAT_ARC_N_ERROR 
FA_IN_NONIP_N_ERROR 

Definition at line 103 of file l2_in_out_feat_arc.c.

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

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

Definition at line 138 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

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:

+ Here is the caller graph for this function:

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:

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:

+ Here is the caller graph for this function:

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

Definition at line 158 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 146 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

static int l2_has_features ( u32  sw_if_index,
int  is_output 
)
static

Definition at line 571 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 367 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 337 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

clib_error_t* l2_in_out_feat_arc_init ( vlib_main_t vm)

Definition at line 548 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

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 242 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static int l2_is_input_arc ( u8  arc_index)
static

Definition at line 595 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

static int l2_is_output_arc ( u8  arc_index)
static

Definition at line 585 of file l2_in_out_feat_arc.c.

+ Here is the caller graph for this function:

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

Definition at line 382 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Definition at line 352 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 223 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 172 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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 207 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 ( l2_in_ip4_arc  ,
static   
)

+ Here is the caller graph for this function:

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   
)

+ Here is the caller graph for this function:

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   
)
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 605 of file l2_in_out_feat_arc.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

static vlib_node_registration_t l2_in_feat_arc_end_node
static
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
static uword l2_in_feat_arc_end_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_end_node)

Definition at line 365 of file l2_in_out_feat_arc.c.

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.

static vlib_node_registration_t l2_in_feat_arc_node
static
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
#define ARRAY_LEN(x)
Definition: clib.h:62
static uword l2_in_feat_arc_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (l2_in_feat_arc_node)

Definition at line 335 of file l2_in_out_feat_arc.c.

l2_in_out_feat_arc_main_t l2_in_out_feat_arc_main

Definition at line 132 of file l2_in_out_feat_arc.c.

static vlib_node_registration_t l2_out_feat_arc_end_node
static
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
static uword l2_out_feat_arc_end_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_end_node)

Definition at line 380 of file l2_in_out_feat_arc.c.

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.

static vlib_node_registration_t l2_out_feat_arc_node
static
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
static char * l2_out_feat_arc_error_strings[]
#define ARRAY_LEN(x)
Definition: clib.h:62
static uword l2_out_feat_arc_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)

(constructor) VLIB_REGISTER_NODE (l2_out_feat_arc_node)

Definition at line 350 of file l2_in_out_feat_arc.c.