FD.io VPP  v21.01.1
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Macros

#define foreach_span_error   _(HITS, "SPAN incoming packets processed")
 
#define span_node_defs
 

Enumerations

enum  span_error_t { SPAN_N_ERROR }
 

Functions

static u8format_span_trace (u8 *s, va_list *args)
 
static_always_inline void span_mirror (vlib_main_t *vm, vlib_node_runtime_t *node, u32 sw_if_index0, vlib_buffer_t *b0, vlib_frame_t **mirror_frames, vlib_rx_or_tx_t rxtx, span_feat_t sf)
 
static_always_inline uword span_node_inline_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, vlib_rx_or_tx_t rxtx, span_feat_t sf)
 
VLIB_NODE_FN() span_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() span_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() span_l2_input_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() span_l2_output_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
clib_error_tspan_init (vlib_main_t *vm)
 

Variables

static char * span_error_strings []
 
vlib_node_registration_t span_input_node
 (constructor) VLIB_REGISTER_NODE (span_input_node) More...
 
vlib_node_registration_t span_output_node
 (constructor) VLIB_REGISTER_NODE (span_output_node) More...
 
vlib_node_registration_t span_l2_input_node
 (constructor) VLIB_REGISTER_NODE (span_l2_input_node) More...
 
vlib_node_registration_t span_l2_output_node
 (constructor) VLIB_REGISTER_NODE (span_l2_output_node) More...
 

Macro Definition Documentation

◆ foreach_span_error

#define foreach_span_error   _(HITS, "SPAN incoming packets processed")

Definition at line 44 of file node.c.

◆ span_node_defs

#define span_node_defs
Value:
.vector_size = sizeof (u32), \
.format_trace = format_span_trace, \
.n_errors = ARRAY_LEN(span_error_strings), \
.error_strings = span_error_strings, \
.n_next_nodes = 0, \
.next_nodes = { \
[0] = "error-drop" \
}
static u8 * format_span_trace(u8 *s, va_list *args)
Definition: node.c:30
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:67
static char * span_error_strings[]
Definition: node.c:55

Definition at line 296 of file node.c.

Enumeration Type Documentation

◆ span_error_t

Enumerator
SPAN_N_ERROR 

Definition at line 47 of file node.c.

Function Documentation

◆ format_span_trace()

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

Definition at line 30 of file node.c.

+ Here is the call graph for this function:

◆ span_init()

clib_error_t* span_init ( vlib_main_t vm)

Definition at line 329 of file node.c.

+ Here is the call graph for this function:

◆ span_input_node()

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

Definition at line 270 of file node.c.

+ Here is the call graph for this function:

◆ span_l2_input_node()

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

Definition at line 282 of file node.c.

+ Here is the call graph for this function:

◆ span_l2_output_node()

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

Definition at line 289 of file node.c.

+ Here is the call graph for this function:

◆ span_mirror()

static_always_inline void span_mirror ( vlib_main_t vm,
vlib_node_runtime_t node,
u32  sw_if_index0,
vlib_buffer_t b0,
vlib_frame_t **  mirror_frames,
vlib_rx_or_tx_t  rxtx,
span_feat_t  sf 
)

Definition at line 62 of file node.c.

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

◆ span_node_inline_fn()

static_always_inline uword span_node_inline_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
vlib_rx_or_tx_t  rxtx,
span_feat_t  sf 
)

Definition at line 129 of file node.c.

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

◆ span_output_node()

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

Definition at line 276 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ span_error_strings

char* span_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_span_error
Definition: node.c:44

Definition at line 55 of file node.c.

◆ span_input_node

vlib_node_registration_t span_input_node
Initial value:
= {
.name = "span-input",
}
#define span_node_defs
Definition: node.c:296

(constructor) VLIB_REGISTER_NODE (span_input_node)

Definition at line 308 of file node.c.

◆ span_l2_input_node

vlib_node_registration_t span_l2_input_node
Initial value:
= {
.name = "span-l2-input",
}
#define span_node_defs
Definition: node.c:296

(constructor) VLIB_REGISTER_NODE (span_l2_input_node)

Definition at line 318 of file node.c.

◆ span_l2_output_node

vlib_node_registration_t span_l2_output_node
Initial value:
= {
.name = "span-l2-output",
}
#define span_node_defs
Definition: node.c:296

(constructor) VLIB_REGISTER_NODE (span_l2_output_node)

Definition at line 323 of file node.c.

◆ span_output_node

vlib_node_registration_t span_output_node
Initial value:
= {
.name = "span-output",
}
#define span_node_defs
Definition: node.c:296

(constructor) VLIB_REGISTER_NODE (span_output_node)

Definition at line 313 of file node.c.