FD.io VPP  v16.06
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
 

Macros

#define foreach_vnet_policer_error
 
#define TEST_CODE   1
 

Enumerations

enum  vnet_policer_error_t { VNET_POLICER_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_policer_index_t which)
 
uword vnet_policer_by_sw_if_index (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
uword vnet_policer_by_opaque (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
uword vnet_policer_by_either (vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
 
void vnet_policer_node_funcs_reference (void)
 
int test_policer_add_del (u32 rx_sw_if_index, u8 *config_name, int is_add)
 
static clib_error_ttest_policer_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 

Variables

static char * vnet_policer_error_strings []
 
vlib_node_registration_t policer_by_sw_if_index_node
 (constructor) VLIB_REGISTER_NODE (policer_by_sw_if_index_node) More...
 
vlib_cli_command_t test_patch_command
 (constructor) VLIB_CLI_COMMAND (test_patch_command) More...
 

Macro Definition Documentation

#define foreach_vnet_policer_error
Value:
_(TRANSMIT, "Packets Transmitted") \
_(DROP, "Packets Dropped")
DROP
Definition: error.def:41

Definition at line 42 of file node_funcs.c.

#define TEST_CODE   1

Definition at line 304 of file node_funcs.c.

Enumeration Type Documentation

Enumerator
VNET_POLICER_N_ERROR 

Definition at line 46 of file node_funcs.c.

Function Documentation

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

Definition at line 31 of file node_funcs.c.

+ Here is the call graph for this function:

int test_policer_add_del ( u32  rx_sw_if_index,
u8 config_name,
int  is_add 
)

Definition at line 328 of file node_funcs.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static clib_error_t* test_policer_command_fn ( vlib_main_t vm,
unformat_input_t input,
vlib_cli_command_t cmd 
)
static

Definition at line 382 of file node_funcs.c.

+ Here is the call graph for this function:

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

Definition at line 293 of file node_funcs.c.

+ Here is the call graph for this function:

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

Definition at line 285 of file node_funcs.c.

+ Here is the call graph for this function:

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

Definition at line 277 of file node_funcs.c.

+ Here is the call graph for this function:

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

Definition at line 60 of file node_funcs.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void vnet_policer_node_funcs_reference ( void  )

Definition at line 301 of file node_funcs.c.

+ Here is the caller graph for this function:

Variable Documentation

vlib_node_registration_t policer_by_sw_if_index_node
Initial value:
= {
.name = "policer-by-sw-if-index",
.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_TRANSMIT] = "ethernet-input",
[VNET_POLICER_NEXT_DROP] = "error-drop",
},
}
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
static char * vnet_policer_error_strings[]
Definition: node_funcs.c:53
uword vnet_policer_by_sw_if_index(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: node_funcs.c:277
#define ARRAY_LEN(x)
Definition: clib.h:59
unsigned int u32
Definition: types.h:88
static u8 * format_policer_trace(u8 *s, va_list *args)
Definition: node_funcs.c:31

(constructor) VLIB_REGISTER_NODE (policer_by_sw_if_index_node)

Definition at line 308 of file node_funcs.c.

vlib_cli_command_t test_patch_command
Initial value:
= {
.path = "test policer",
.short_help =
"intfc <intfc> policer <policer-config-name> [del]",
}
static clib_error_t * test_policer_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: node_funcs.c:382

(constructor) VLIB_CLI_COMMAND (test_patch_command)

Definition at line 446 of file node_funcs.c.

char* vnet_policer_error_strings[]
static
Initial value:
= {
#define _(sym,string)
}
#define foreach_vnet_policer_error
Definition: node_funcs.c:42

Definition at line 53 of file node_funcs.c.