FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
node_funcs.c File Reference
+ Include dependency graph for node_funcs.c:

Go to the source code of this file.

Data Structures

struct  vnet_policer_trace_t
 
struct  policer_classify_trace_t
 

Macros

#define foreach_vnet_policer_error
 
#define foreach_policer_classify_error
 

Enumerations

enum  vnet_policer_error_t { VNET_POLICER_N_ERROR }
 
enum  policer_classify_error_t { POLICER_CLASSIFY_N_ERROR }
 

Functions

static u8format_policer_trace (u8 *s, va_list *args)
 
static uword vnet_policer_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
 VNET_FEATURE_INIT (policer_input_node, static)
 
static u8format_policer_classify_trace (u8 *s, va_list *args)
 
static uword policer_classify_inline (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, policer_classify_table_id_t tid)
 
VLIB_NODE_FN() ip4_policer_classify_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() ip6_policer_classify_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
VLIB_NODE_FN() l2_policer_classify_node (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
static clib_error_tpolicer_classify_init (vlib_main_t *vm)
 

Variables

static char * vnet_policer_error_strings []
 
vlib_main_tvm
 
vlib_main_t vlib_node_runtime_tnode
 
vlib_main_t vlib_node_runtime_t vlib_frame_tframe
 
vlib_node_registration_t policer_input_node
 (constructor) VLIB_REGISTER_NODE (policer_input_node) More...
 
static char * policer_input_handoff_error_strings [] = { "congestion drop" }
 
vlib_node_registration_t policer_input_handoff_node
 (constructor) VLIB_REGISTER_NODE (policer_input_handoff_node) More...
 
static char * policer_classify_error_strings []
 
vlib_node_registration_t ip4_policer_classify_node
 (constructor) VLIB_REGISTER_NODE (ip4_policer_classify_node) More...
 
vlib_node_registration_t ip6_policer_classify_node
 (constructor) VLIB_REGISTER_NODE (ip6_policer_classify_node) More...
 
vlib_node_registration_t l2_policer_classify_node
 (constructor) VLIB_REGISTER_NODE (l2_policer_classify_node) More...
 

Macro Definition Documentation

◆ foreach_policer_classify_error

#define foreach_policer_classify_error
Value:
_(MISS, "Policer classify misses") \
_(HIT, "Policer classify hits") \
_(CHAIN_HIT, "Policer classify hits after chain walk") \
_(DROP, "Policer classify action drop")

Definition at line 327 of file node_funcs.c.

◆ foreach_vnet_policer_error

#define foreach_vnet_policer_error
Value:
_(TRANSMIT, "Packets Transmitted") \
_(DROP, "Packets Dropped")

Definition at line 51 of file node_funcs.c.

Enumeration Type Documentation

◆ policer_classify_error_t

Enumerator
POLICER_CLASSIFY_N_ERROR 

Definition at line 333 of file node_funcs.c.

◆ vnet_policer_error_t

Enumerator
VNET_POLICER_N_ERROR 

Definition at line 55 of file node_funcs.c.

Function Documentation

◆ format_policer_classify_trace()

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

Definition at line 314 of file node_funcs.c.

◆ format_policer_trace()

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

Definition at line 40 of file node_funcs.c.

◆ ip4_policer_classify_node()

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

Definition at line 615 of file node_funcs.c.

+ Here is the call graph for this function:

◆ ip6_policer_classify_node()

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

Definition at line 637 of file node_funcs.c.

+ Here is the call graph for this function:

◆ l2_policer_classify_node()

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

Definition at line 659 of file node_funcs.c.

+ Here is the call graph for this function:

◆ policer_classify_init()

static clib_error_t* policer_classify_init ( vlib_main_t vm)
static

Definition at line 682 of file node_funcs.c.

+ Here is the call graph for this function:

◆ policer_classify_inline()

static uword policer_classify_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame,
policer_classify_table_id_t  tid 
)
inlinestatic

Definition at line 348 of file node_funcs.c.

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

◆ VNET_FEATURE_INIT()

VNET_FEATURE_INIT ( policer_input_node  ,
static   
)

◆ vnet_policer_inline()

static uword vnet_policer_inline ( vlib_main_t vm,
vlib_node_runtime_t node,
vlib_frame_t frame 
)
inlinestatic

Definition at line 70 of file node_funcs.c.

+ Here is the call graph for this function:

Variable Documentation

◆ frame

Initial value:

Definition at line 258 of file node_funcs.c.

◆ ip4_policer_classify_node

vlib_node_registration_t ip4_policer_classify_node
Initial value:
= {
.name = "ip4-policer-classify",
.vector_size = sizeof (u32),
.next_nodes = {
},
}

(constructor) VLIB_REGISTER_NODE (ip4_policer_classify_node)

Definition at line 624 of file node_funcs.c.

◆ ip6_policer_classify_node

vlib_node_registration_t ip6_policer_classify_node
Initial value:
= {
.name = "ip6-policer-classify",
.vector_size = sizeof (u32),
.next_nodes = {
},
}

(constructor) VLIB_REGISTER_NODE (ip6_policer_classify_node)

Definition at line 646 of file node_funcs.c.

◆ l2_policer_classify_node

vlib_node_registration_t l2_policer_classify_node
Initial value:
= {
.name = "l2-policer-classify",
.vector_size = sizeof (u32),
.next_nodes = {
},
}

(constructor) VLIB_REGISTER_NODE (l2_policer_classify_node)

Definition at line 667 of file node_funcs.c.

◆ node

Definition at line 257 of file node_funcs.c.

◆ policer_classify_error_strings

char* policer_classify_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 341 of file node_funcs.c.

◆ policer_input_handoff_error_strings

char* policer_input_handoff_error_strings[] = { "congestion drop" }
static

Definition at line 282 of file node_funcs.c.

◆ policer_input_handoff_node

vlib_node_registration_t policer_input_handoff_node
Initial value:
= {
.name = "policer-input-handoff",
.vector_size = sizeof (u32),
.n_next_nodes = 1,
.next_nodes = {
[0] = "error-drop",
},
}

(constructor) VLIB_REGISTER_NODE (policer_input_handoff_node)

Definition at line 290 of file node_funcs.c.

◆ policer_input_node

vlib_node_registration_t policer_input_node
Initial value:
= {
.name = "policer-input",
.vector_size = sizeof (u32),
.format_trace = format_policer_trace,
.error_strings = vnet_policer_error_strings,
.n_next_nodes = VNET_POLICER_N_NEXT,
.next_nodes = {
[VNET_POLICER_NEXT_DROP] = "error-drop",
[VNET_POLICER_NEXT_HANDOFF] = "policer-input-handoff",
},
}

(constructor) VLIB_REGISTER_NODE (policer_input_node)

Definition at line 262 of file node_funcs.c.

◆ vm

Definition at line 257 of file node_funcs.c.

◆ vnet_policer_error_strings

char* vnet_policer_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}

Definition at line 63 of file node_funcs.c.

node
vlib_main_t vlib_node_runtime_t * node
Definition: node_funcs.c:257
foreach_vnet_policer_error
#define foreach_vnet_policer_error
Definition: node_funcs.c:51
DROP
DROP
Definition: error.def:41
vm
vlib_main_t * vm
Definition: node_funcs.c:257
VLIB_NODE_TYPE_INTERNAL
@ VLIB_NODE_TYPE_INTERNAL
Definition: node.h:72
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: node_funcs.c:258
VNET_POLICER_NEXT_DROP
@ VNET_POLICER_NEXT_DROP
Definition: policer.h:64
vnet_policer_inline
static uword vnet_policer_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node_funcs.c:70
format_policer_handoff_trace
u8 * format_policer_handoff_trace(u8 *s, va_list *args)
Definition: policer.c:25
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
foreach_policer_classify_error
#define foreach_policer_classify_error
Definition: node_funcs.c:327
policer_input_handoff_error_strings
static char * policer_input_handoff_error_strings[]
Definition: node_funcs.c:282
policer_classify_error_strings
static char * policer_classify_error_strings[]
Definition: node_funcs.c:341
u32
unsigned int u32
Definition: types.h:88
VNET_POLICER_NEXT_HANDOFF
@ VNET_POLICER_NEXT_HANDOFF
Definition: policer.h:65
vnet_policer_error_strings
static char * vnet_policer_error_strings[]
Definition: node_funcs.c:63
format_policer_trace
static u8 * format_policer_trace(u8 *s, va_list *args)
Definition: node_funcs.c:40
format_policer_classify_trace
static u8 * format_policer_classify_trace(u8 *s, va_list *args)
Definition: node_funcs.c:314
POLICER_CLASSIFY_NEXT_INDEX_DROP
@ POLICER_CLASSIFY_NEXT_INDEX_DROP
Definition: policer_classify.h:33
POLICER_CLASSIFY_NEXT_INDEX_N_NEXT
@ POLICER_CLASSIFY_NEXT_INDEX_N_NEXT
Definition: policer_classify.h:34
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123
VNET_POLICER_N_NEXT
@ VNET_POLICER_N_NEXT
Definition: policer.h:66