FD.io VPP  v21.06-3-gbb25fbf28
Vector Packet Processing
policer.c File Reference
+ Include dependency graph for policer.c:

Go to the source code of this file.

Macros

#define foreach_config_param
 

Functions

u8format_policer_handoff_trace (u8 *s, va_list *args)
 
clib_error_tpolicer_add_del (vlib_main_t *vm, u8 *name, qos_pol_cfg_params_st *cfg, u32 *policer_index, u8 is_add)
 
int policer_bind_worker (u8 *name, u32 worker, bool bind)
 
int policer_input (u8 *name, u32 sw_if_index, bool apply)
 
u8format_policer_instance (u8 *s, va_list *va)
 
static u8format_policer_round_type (u8 *s, va_list *va)
 
static u8format_policer_rate_type (u8 *s, va_list *va)
 
static u8format_policer_type (u8 *s, va_list *va)
 
static u8format_policer_action_type (u8 *s, va_list *va)
 
u8format_policer_config (u8 *s, va_list *va)
 
static uword unformat_policer_type (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_round_type (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_rate_type (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_cir (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_eir (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_cb (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_eb (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_action_type (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_action (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_classify_next_index (unformat_input_t *input, va_list *va)
 
static uword unformat_policer_classify_precolor (unformat_input_t *input, va_list *va)
 
static clib_error_tpolicer_add_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tpolicer_del_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tpolicer_bind_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tpolicer_input_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_policer_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
static clib_error_tshow_policer_pools_command_fn (vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
 
clib_error_tpolicer_init (vlib_main_t *vm)
 

Variables

vnet_policer_main_t vnet_policer_main
 
vlib_combined_counter_main_t policer_counters []
 
static vlib_cli_command_t configure_policer_command
 (constructor) VLIB_CLI_COMMAND (configure_policer_command) More...
 
static vlib_cli_command_t policer_add_command
 (constructor) VLIB_CLI_COMMAND (policer_add_command) More...
 
static vlib_cli_command_t policer_del_command
 (constructor) VLIB_CLI_COMMAND (policer_del_command) More...
 
static vlib_cli_command_t policer_bind_command
 (constructor) VLIB_CLI_COMMAND (policer_bind_command) More...
 
static vlib_cli_command_t policer_input_command
 (constructor) VLIB_CLI_COMMAND (policer_input_command) More...
 
static vlib_cli_command_t show_policer_command
 (constructor) VLIB_CLI_COMMAND (show_policer_command) More...
 
static vlib_cli_command_t show_policer_pools_command
 (constructor) VLIB_CLI_COMMAND (show_policer_pools_command) More...
 

Macro Definition Documentation

◆ foreach_config_param

#define foreach_config_param
Value:
_(eb) \
_(cb) \
_(eir) \
_(cir) \
_(rate_type) \
_(round_type) \
_(type) \

Definition at line 492 of file policer.c.

Function Documentation

◆ format_policer_action_type()

static u8* format_policer_action_type ( u8 s,
va_list *  va 
)
static

Definition at line 288 of file policer.c.

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

◆ format_policer_config()

u8* format_policer_config ( u8 s,
va_list *  va 
)

Definition at line 304 of file policer.c.

+ Here is the call graph for this function:

◆ format_policer_handoff_trace()

u8* format_policer_handoff_trace ( u8 s,
va_list *  args 
)

Definition at line 25 of file policer.c.

◆ format_policer_instance()

u8* format_policer_instance ( u8 s,
va_list *  va 
)

Definition at line 201 of file policer.c.

+ Here is the call graph for this function:

◆ format_policer_rate_type()

static u8* format_policer_rate_type ( u8 s,
va_list *  va 
)
static

Definition at line 250 of file policer.c.

+ Here is the caller graph for this function:

◆ format_policer_round_type()

static u8* format_policer_round_type ( u8 s,
va_list *  va 
)
static

Definition at line 233 of file policer.c.

+ Here is the caller graph for this function:

◆ format_policer_type()

static u8* format_policer_type ( u8 s,
va_list *  va 
)
static

Definition at line 264 of file policer.c.

+ Here is the caller graph for this function:

◆ policer_add_command_fn()

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

Definition at line 503 of file policer.c.

+ Here is the call graph for this function:

◆ policer_add_del()

clib_error_t* policer_add_del ( vlib_main_t vm,
u8 name,
qos_pol_cfg_params_st cfg,
u32 policer_index,
u8  is_add 
)

Definition at line 53 of file policer.c.

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

◆ policer_bind_command_fn()

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

Definition at line 580 of file policer.c.

+ Here is the call graph for this function:

◆ policer_bind_worker()

int policer_bind_worker ( u8 name,
u32  worker,
bool  bind 
)

Definition at line 138 of file policer.c.

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

◆ policer_del_command_fn()

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

Definition at line 548 of file policer.c.

+ Here is the call graph for this function:

◆ policer_init()

clib_error_t* policer_init ( vlib_main_t vm)

Definition at line 780 of file policer.c.

+ Here is the call graph for this function:

◆ policer_input()

int policer_input ( u8 name,
u32  sw_if_index,
bool  apply 
)

Definition at line 169 of file policer.c.

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

◆ policer_input_command_fn()

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

Definition at line 632 of file policer.c.

+ Here is the call graph for this function:

◆ show_policer_command_fn()

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

Definition at line 713 of file policer.c.

+ Here is the call graph for this function:

◆ show_policer_pools_command_fn()

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

Definition at line 759 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_action()

static uword unformat_policer_action ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 438 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_action_type()

static uword unformat_policer_action_type ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 421 of file policer.c.

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

◆ unformat_policer_cb()

static uword unformat_policer_cb ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 401 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_cir()

static uword unformat_policer_cir ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 381 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_classify_next_index()

static uword unformat_policer_classify_next_index ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 455 of file policer.c.

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

◆ unformat_policer_classify_precolor()

static uword unformat_policer_classify_precolor ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 478 of file policer.c.

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

◆ unformat_policer_eb()

static uword unformat_policer_eb ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 411 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_eir()

static uword unformat_policer_eir ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 391 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_rate_type()

static uword unformat_policer_rate_type ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 364 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_round_type()

static uword unformat_policer_round_type ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 345 of file policer.c.

+ Here is the call graph for this function:

◆ unformat_policer_type()

static uword unformat_policer_type ( unformat_input_t input,
va_list *  va 
)
static

Definition at line 322 of file policer.c.

+ Here is the call graph for this function:

Variable Documentation

◆ configure_policer_command

vlib_cli_command_t configure_policer_command
static
Initial value:
= {
.path = "configure policer",
.short_help = "configure policer name <name> <params> ",
}

(constructor) VLIB_CLI_COMMAND (configure_policer_command)

Definition at line 685 of file policer.c.

◆ policer_add_command

vlib_cli_command_t policer_add_command
static
Initial value:
= {
.path = "policer add",
.short_help = "policer name <name> <params> ",
}

(constructor) VLIB_CLI_COMMAND (policer_add_command)

Definition at line 690 of file policer.c.

◆ policer_bind_command

vlib_cli_command_t policer_bind_command
static
Initial value:
= {
.path = "policer bind",
.short_help = "policer bind [unbind] name <name> <worker>",
}

(constructor) VLIB_CLI_COMMAND (policer_bind_command)

Definition at line 700 of file policer.c.

◆ policer_counters

vlib_combined_counter_main_t policer_counters[]
Initial value:
= {
{
.name = "Policer-Conform",
.stat_segment_name = "/net/policer/conform",
},
{
.name = "Policer-Exceed",
.stat_segment_name = "/net/policer/exceed",
},
{
.name = "Policer-Violate",
.stat_segment_name = "/net/policer/violate",
},
}

Definition at line 37 of file policer.c.

◆ policer_del_command

vlib_cli_command_t policer_del_command
static
Initial value:
= {
.path = "policer del",
.short_help = "policer del name <name> ",
}

(constructor) VLIB_CLI_COMMAND (policer_del_command)

Definition at line 695 of file policer.c.

◆ policer_input_command

vlib_cli_command_t policer_input_command
static
Initial value:
= {
.path = "policer input",
.short_help = "policer input [unapply] name <name> <interfac>",
}

(constructor) VLIB_CLI_COMMAND (policer_input_command)

Definition at line 705 of file policer.c.

◆ show_policer_command

vlib_cli_command_t show_policer_command
static
Initial value:
= {
.path = "show policer",
.short_help = "show policer [name]",
}

(constructor) VLIB_CLI_COMMAND (show_policer_command)

Definition at line 751 of file policer.c.

◆ show_policer_pools_command

vlib_cli_command_t show_policer_pools_command
static
Initial value:
= {
.path = "show policer pools",
.short_help = "show policer pools",
}

(constructor) VLIB_CLI_COMMAND (show_policer_pools_command)

Definition at line 772 of file policer.c.

◆ vnet_policer_main

vnet_policer_main_t vnet_policer_main

Definition at line 22 of file policer.c.

policer_del_command_fn
static clib_error_t * policer_del_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: policer.c:548
show_policer_command_fn
static clib_error_t * show_policer_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: policer.c:713
policer_bind_command_fn
static clib_error_t * policer_bind_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: policer.c:580
policer_input_command_fn
static clib_error_t * policer_input_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: policer.c:632
policer_add_command_fn
static clib_error_t * policer_add_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: policer.c:503
show_policer_pools_command_fn
static clib_error_t * show_policer_pools_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: policer.c:759
action
vl_api_mac_event_action_t action
Definition: l2.api:211
type
vl_api_fib_path_type_t type
Definition: fib_types.api:123