FD.io VPP  v19.08.2-294-g37e99c22d
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  handoffdemo_trace_t
 

Macros

#define foreach_handoffdemo_error
 

Enumerations

enum  handoffdemo_error_t { HANDOFFDEMO_N_ERROR }
 
enum  handoffdemo_next_t { HANDOFFDEMO_NEXT_DROP, HANDOFFDEMO_N_NEXT }
 

Functions

static u8format_handoffdemo_trace (u8 *s, va_list *args)
 
static uword handoffdemo_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int which, int is_trace)
 
static uword handoffdemo_node_1_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
uword handoffdemo_node_2_fn (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_thandoffdemo_node_init (vlib_main_t *vm)
 

Variables

vlib_node_registration_t handoffdemo_node
 
static char * handoffdemo_error_strings []
 
vlib_node_registration_t handoffdemo_node_1
 (constructor) VLIB_REGISTER_NODE (handoffdemo_node_1) More...
 
vlib_node_registration_t handoffdemo_node_2
 (constructor) VLIB_REGISTER_NODE (handoffdemo_node_2) More...
 

Macro Definition Documentation

◆ foreach_handoffdemo_error

#define foreach_handoffdemo_error
Value:
_(HANDED_OFF, "packets handed off processed") \
_(CONGESTION_DROP, "handoff queue congestion drops") \
_(COMPLETE, "completed packets")

Definition at line 43 of file node.c.

Enumeration Type Documentation

◆ handoffdemo_error_t

Enumerator
HANDOFFDEMO_N_ERROR 

Definition at line 48 of file node.c.

◆ handoffdemo_next_t

Enumerator
HANDOFFDEMO_NEXT_DROP 
HANDOFFDEMO_N_NEXT 

Definition at line 62 of file node.c.

Function Documentation

◆ format_handoffdemo_trace()

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

Definition at line 30 of file node.c.

+ Here is the call graph for this function:

◆ handoffdemo_inline()

static uword handoffdemo_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  which,
int  is_trace 
)
inlinestatic

Definition at line 69 of file node.c.

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

◆ handoffdemo_node_1_fn()

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

Definition at line 157 of file node.c.

+ Here is the call graph for this function:

◆ handoffdemo_node_2_fn()

uword handoffdemo_node_2_fn ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)

Definition at line 190 of file node.c.

+ Here is the call graph for this function:

◆ handoffdemo_node_init()

static clib_error_t* handoffdemo_node_init ( vlib_main_t vm)
static

Definition at line 223 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ handoffdemo_error_strings

char* handoffdemo_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_handoffdemo_error
Definition: node.c:43

Definition at line 56 of file node.c.

◆ handoffdemo_node

vlib_node_registration_t handoffdemo_node

Definition at line 41 of file node.c.

◆ handoffdemo_node_1

vlib_node_registration_t handoffdemo_node_1
Initial value:
=
{
.name = "handoffdemo-1",
.function = handoffdemo_node_1_fn,
.vector_size = sizeof (u32),
.format_trace = format_handoffdemo_trace,
.error_strings = handoffdemo_error_strings,
.n_next_nodes = HANDOFFDEMO_N_NEXT,
.next_nodes = {
[HANDOFFDEMO_NEXT_DROP] = "error-drop",
},
}
static u8 * format_handoffdemo_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
static uword handoffdemo_node_1_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:157
#define ARRAY_LEN(x)
Definition: clib.h:63
static char * handoffdemo_error_strings[]
Definition: node.c:56

(constructor) VLIB_REGISTER_NODE (handoffdemo_node_1)

Definition at line 169 of file node.c.

◆ handoffdemo_node_2

vlib_node_registration_t handoffdemo_node_2
Initial value:
=
{
.name = "handoffdemo-2",
.function = handoffdemo_node_2_fn,
.vector_size = sizeof (u32),
.format_trace = format_handoffdemo_trace,
.error_strings = handoffdemo_error_strings,
.n_next_nodes = HANDOFFDEMO_N_NEXT,
.next_nodes = {
[HANDOFFDEMO_NEXT_DROP] = "error-drop",
},
}
static u8 * format_handoffdemo_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:63
static char * handoffdemo_error_strings[]
Definition: node.c:56
uword handoffdemo_node_2_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node.c:190

(constructor) VLIB_REGISTER_NODE (handoffdemo_node_2)

Definition at line 202 of file node.c.