FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
node.c File Reference
+ Include dependency graph for node.c:

Go to the source code of this file.

Data Structures

struct  nsim_trace_t
 

Macros

#define foreach_nsim_error
 

Enumerations

enum  nsim_error_t { NSIM_N_ERROR }
 
enum  nsim_next_t { NSIM_NEXT_DROP, NSIM_N_NEXT, NSIM_NEXT_DROP, NSIM_N_NEXT }
 

Functions

static u8format_nsim_trace (u8 *s, va_list *args)
 
static uword nsim_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_trace, int is_cross_connect)
 
VLIB_NODE_FN() nsim_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() nsim_feature_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 

Variables

vlib_node_registration_t nsim_node
 (constructor) VLIB_REGISTER_NODE (nsim_node) More...
 
static char * nsim_error_strings []
 
vlib_node_registration_t nsim_feature_node
 (constructor) VLIB_REGISTER_NODE (nsim_feature_node) More...
 

Macro Definition Documentation

◆ foreach_nsim_error

#define foreach_nsim_error
Value:
_(BUFFERED, "Packets buffered") \
_(DROPPED, "Packets dropped due to lack of space") \
_(LOSS, "Network loss simulation drop packets")

Definition at line 54 of file node.c.

Enumeration Type Documentation

◆ nsim_error_t

Enumerator
NSIM_N_ERROR 

Definition at line 59 of file node.c.

◆ nsim_next_t

Enumerator
NSIM_NEXT_DROP 
NSIM_N_NEXT 
NSIM_NEXT_DROP 
NSIM_N_NEXT 

Definition at line 75 of file node.c.

Function Documentation

◆ format_nsim_trace()

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

Definition at line 35 of file node.c.

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

◆ nsim_feature_node()

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

Definition at line 468 of file node.c.

+ Here is the call graph for this function:

◆ nsim_inline()

static uword nsim_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
int  is_trace,
int  is_cross_connect 
)
inlinestatic

Definition at line 82 of file node.c.

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

◆ nsim_node()

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

Definition at line 435 of file node.c.

+ Here is the call graph for this function:

Variable Documentation

◆ nsim_error_strings

char* nsim_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_nsim_error
Definition: node.c:54

Definition at line 68 of file node.c.

◆ nsim_feature_node

vlib_node_registration_t nsim_feature_node
Initial value:
=
{
.name = "nsim-output-feature",
.vector_size = sizeof (u32),
.format_trace = format_nsim_trace,
.error_strings = nsim_error_strings,
.n_next_nodes = NSIM_N_NEXT,
.next_nodes = {
[NSIM_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
static char * nsim_error_strings[]
Definition: node.c:68
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
static u8 * format_nsim_trace(u8 *s, va_list *args)
Definition: node.c:35

(constructor) VLIB_REGISTER_NODE (nsim_feature_node)

Definition at line 482 of file node.c.

◆ nsim_node

Initial value:
=
{
.name = "nsim",
.vector_size = sizeof (u32),
.format_trace = format_nsim_trace,
.error_strings = nsim_error_strings,
.n_next_nodes = NSIM_N_NEXT,
.next_nodes = {
[NSIM_NEXT_DROP] = "error-drop",
},
}
unsigned int u32
Definition: types.h:88
static char * nsim_error_strings[]
Definition: node.c:68
vl_api_fib_path_type_t type
Definition: fib_types.api:123
#define ARRAY_LEN(x)
Definition: clib.h:63
static u8 * format_nsim_trace(u8 *s, va_list *args)
Definition: node.c:35

(constructor) VLIB_REGISTER_NODE (nsim_node)

Definition at line 51 of file node.c.