FD.io VPP  v20.09-64-g4f7b92f0a
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 void nsim_set_actions (nsim_main_t *nsm, vlib_buffer_t **b, nsim_node_ctx_t *ctx, u32 n_actions)
 
static void nsim_trace_buffer (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, nsim_node_ctx_t *ctx, u32 is_drop)
 
static void nsim_buffer_fwd_lookup (nsim_main_t *nsm, vlib_buffer_t *b, u32 *next, u8 is_cross_connect)
 
static void nsim_dispatch_buffer (vlib_main_t *vm, vlib_node_runtime_t *node, nsim_main_t *nsm, nsim_wheel_t *wp, vlib_buffer_t *b, u32 bi, nsim_node_ctx_t *ctx, u8 is_cross_connect, u8 is_trace)
 
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") \
_(REORDERED, "Packets reordered")

Definition at line 54 of file node.c.

Enumeration Type Documentation

◆ nsim_error_t

Enumerator
NSIM_N_ERROR 

Definition at line 60 of file node.c.

◆ nsim_next_t

Enumerator
NSIM_NEXT_DROP 
NSIM_N_NEXT 
NSIM_NEXT_DROP 
NSIM_N_NEXT 

Definition at line 76 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_buffer_fwd_lookup()

static void nsim_buffer_fwd_lookup ( nsim_main_t nsm,
vlib_buffer_t b,
u32 next,
u8  is_cross_connect 
)
inlinestatic

Definition at line 120 of file node.c.

+ Here is the caller graph for this function:

◆ nsim_dispatch_buffer()

static void nsim_dispatch_buffer ( vlib_main_t vm,
vlib_node_runtime_t node,
nsim_main_t nsm,
nsim_wheel_t wp,
vlib_buffer_t b,
u32  bi,
nsim_node_ctx_t ctx,
u8  is_cross_connect,
u8  is_trace 
)
inlinestatic

Definition at line 140 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 325 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 189 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 292 of file node.c.

+ Here is the call graph for this function:

◆ nsim_set_actions()

static void nsim_set_actions ( nsim_main_t nsm,
vlib_buffer_t **  b,
nsim_node_ctx_t ctx,
u32  n_actions 
)
static

Definition at line 83 of file node.c.

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

◆ nsim_trace_buffer()

static void nsim_trace_buffer ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_buffer_t b,
nsim_node_ctx_t ctx,
u32  is_drop 
)
static

Definition at line 106 of file node.c.

+ Here is the call graph for this function:
+ Here is the caller 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 69 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",
},
}
static char * nsim_error_strings[]
Definition: node.c:69
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 u8 * format_nsim_trace(u8 *s, va_list *args)
Definition: node.c:35

(constructor) VLIB_REGISTER_NODE (nsim_feature_node)

Definition at line 339 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",
},
}
static char * nsim_error_strings[]
Definition: node.c:69
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 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.