FD.io VPP
v17.04-9-g99c0734
Vector Packet Processing
Main Page
Related Pages
Data Structures
Source
Files
Symbols
policer.api
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2015-2016 Cisco and/or its affiliates.
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at:
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
/** \brief Add/del policer
17
@param client_index - opaque cookie to identify the sender
18
@param context - sender context, to match reply w/ request
19
@param is_add - add policer if non-zero, else delete
20
@param name - policer name
21
@param cir - CIR
22
@param eir - EIR
23
@param cb - Committed Burst
24
@param eb - Excess or Peak Burst
25
@param rate_type - rate type
26
@param round_type - rounding type
27
@param type - policer algorithm
28
@param color_aware - 0=color-blind, 1=color-aware
29
@param conform_action_type - conform action type
30
@param conform_dscp - DSCP for conform mar-and-transmit action
31
@param exceed_action_type - exceed action type
32
@param exceed_dscp - DSCP for exceed mar-and-transmit action
33
@param violate_action_type - violate action type
34
@param violate_dscp - DSCP for violate mar-and-transmit action
35
*/
36
define
policer_add_del
37
{
38
u32
client_index
;
39
u32
context
;
40
41
u8
is_add
;
42
u8
name[64];
43
u32
cir
;
44
u32
eir
;
45
u64
cb
;
46
u64
eb
;
47
u8
rate_type
;
48
u8
round_type
;
49
u8
type
;
50
u8
color_aware
;
51
u8
conform_action_type
;
52
u8
conform_dscp
;
53
u8
exceed_action_type
;
54
u8
exceed_dscp
;
55
u8
violate_action_type
;
56
u8
violate_dscp
;
57
};
58
59
/** \brief Add/del policer response
60
@param context - sender context, to match reply w/ request
61
@param retval - return value for request
62
@param policer_index - for add, returned index of the new policer
63
*/
64
define policer_add_del_reply
65
{
66
u32
context
;
67
i32
retval
;
68
u32
policer_index
;
69
};
70
71
/** \brief Get list of policers
72
@param client_index - opaque cookie to identify the sender
73
@param context - sender context, to match reply w/ request
74
@param match_name_valid - if 0 request all policers otherwise use match_name
75
@param match_name - policer name
76
*/
77
define policer_dump
78
{
79
u32
client_index
;
80
u32
context
;
81
82
u8
match_name_valid
;
83
u8
match_name[64];
84
};
85
86
/** \brief Policer operational state response.
87
@param context - sender context, to match reply w/ request
88
@param name - policer name
89
@param cir - CIR
90
@param eir - EIR
91
@param cb - Committed Burst
92
@param eb - Excess or Peak Burst
93
@param rate_type - rate type
94
@param round_type - rounding type
95
@param type - policer algorithm
96
@param conform_action_type - conform action type
97
@param conform_dscp - DSCP for conform mar-and-transmit action
98
@param exceed_action_type - exceed action type
99
@param exceed_dscp - DSCP for exceed mar-and-transmit action
100
@param violate_action_type - violate action type
101
@param violate_dscp - DSCP for violate mar-and-transmit action
102
@param single_rate - 1 = single rate policer, 0 = two rate policer
103
@param color_aware - for hierarchical policing
104
@param scale - power-of-2 shift amount for lower rates
105
@param cir_tokens_per_period - number of tokens for each period
106
@param pir_tokens_per_period - number of tokens for each period for 2-rate policer
107
@param current_limit - current limit
108
@param current_bucket - current bucket
109
@param extended_limit - extended limit
110
@param extended_bucket - extended bucket
111
@param last_update_time - last update time
112
*/
113
define policer_details
114
{
115
u32
context
;
116
117
u8
name[64];
118
u32
cir
;
119
u32
eir
;
120
u64
cb
;
121
u64
eb
;
122
u8
rate_type
;
123
u8
round_type
;
124
u8
type
;
125
u8
conform_action_type
;
126
u8
conform_dscp
;
127
u8
exceed_action_type
;
128
u8
exceed_dscp
;
129
u8
violate_action_type
;
130
u8
violate_dscp
;
131
u8
single_rate
;
132
u8
color_aware
;
133
u32
scale
;
134
u32
cir_tokens_per_period
;
135
u32
pir_tokens_per_period
;
136
u32
current_limit
;
137
u32
current_bucket
;
138
u32
extended_limit
;
139
u32
extended_bucket
;
140
u64
last_update_time
;
141
};
142
143
/*
144
* Local Variables:
145
* eval: (c-set-style "gnu")
146
* End:
147
*/
vl_api_policer_details_t::cb
u64 cb
Definition:
policer.api:120
vl_api_policer_add_del_t::context
u32 context
Definition:
policer.api:39
vl_api_policer_add_del_reply_t::policer_index
u32 policer_index
Definition:
policer.api:68
vl_api_policer_add_del_t::eir
u32 eir
Definition:
policer.api:44
vl_api_policer_details_t::conform_action_type
u8 conform_action_type
Definition:
policer.api:125
vl_api_policer_details_t::violate_action_type
u8 violate_action_type
Definition:
policer.api:129
vl_api_policer_details_t::pir_tokens_per_period
u32 pir_tokens_per_period
Definition:
policer.api:135
vl_api_policer_dump_t::context
u32 context
Definition:
policer.api:80
vl_api_policer_details_t::exceed_dscp
u8 exceed_dscp
Definition:
policer.api:128
vl_api_policer_add_del_t::eb
u64 eb
Definition:
policer.api:46
vl_api_policer_dump_t::client_index
u32 client_index
Definition:
policer.api:79
vl_api_policer_details_t::cir_tokens_per_period
u32 cir_tokens_per_period
Definition:
policer.api:134
vl_api_policer_details_t::violate_dscp
u8 violate_dscp
Definition:
policer.api:130
vl_api_policer_details_t::scale
u32 scale
Definition:
policer.api:133
vl_api_policer_add_del_t::violate_dscp
u8 violate_dscp
Definition:
policer.api:56
vl_api_policer_details_t::round_type
u8 round_type
Definition:
policer.api:123
vl_api_policer_details_t::type
u8 type
Definition:
policer.api:124
vl_api_policer_details_t::color_aware
u8 color_aware
Definition:
policer.api:132
i32
int i32
Definition:
types.h:81
vl_api_policer_details_t::cir
u32 cir
Definition:
policer.api:118
vl_api_policer_add_del_t::is_add
u8 is_add
Definition:
policer.api:41
vl_api_policer_details_t::eir
u32 eir
Definition:
policer.api:119
u64
unsigned long u64
Definition:
types.h:89
vl_api_policer_add_del_t::cb
u64 cb
Definition:
policer.api:45
vl_api_policer_add_del_t::conform_dscp
u8 conform_dscp
Definition:
policer.api:52
vl_api_policer_add_del_t::round_type
u8 round_type
Definition:
policer.api:48
vl_api_policer_add_del_t::exceed_dscp
u8 exceed_dscp
Definition:
policer.api:54
vl_api_policer_details_t::rate_type
u8 rate_type
Definition:
policer.api:122
vl_api_policer_add_del_reply_t::retval
i32 retval
Definition:
policer.api:67
vl_api_policer_details_t::exceed_action_type
u8 exceed_action_type
Definition:
policer.api:127
vl_api_policer_details_t::eb
u64 eb
Definition:
policer.api:121
vl_api_policer_add_del_t::violate_action_type
u8 violate_action_type
Definition:
policer.api:55
vl_api_policer_add_del_t::rate_type
u8 rate_type
Definition:
policer.api:47
vl_api_policer_details_t::last_update_time
u64 last_update_time
Definition:
policer.api:140
vl_api_policer_add_del_t::color_aware
u8 color_aware
Definition:
policer.api:50
u32
unsigned int u32
Definition:
types.h:88
policer_add_del
clib_error_t * policer_add_del(vlib_main_t *vm, u8 *name, sse2_qos_pol_cfg_params_st *cfg, u32 *policer_index, u8 is_add)
Definition:
policer.c:20
vl_api_policer_details_t::extended_bucket
u32 extended_bucket
Definition:
policer.api:139
vl_api_policer_add_del_t::exceed_action_type
u8 exceed_action_type
Definition:
policer.api:53
u8
unsigned char u8
Definition:
types.h:56
vl_api_policer_details_t::context
u32 context
Definition:
policer.api:115
vl_api_policer_dump_t::match_name_valid
u8 match_name_valid
Definition:
policer.api:82
vl_api_policer_details_t::single_rate
u8 single_rate
Definition:
policer.api:131
vl_api_policer_details_t::extended_limit
u32 extended_limit
Definition:
policer.api:138
vl_api_policer_add_del_t::conform_action_type
u8 conform_action_type
Definition:
policer.api:51
vl_api_policer_details_t::conform_dscp
u8 conform_dscp
Definition:
policer.api:126
vl_api_policer_add_del_reply_t::context
u32 context
Definition:
policer.api:66
vl_api_policer_details_t::current_limit
u32 current_limit
Definition:
policer.api:136
vl_api_policer_add_del_t::cir
u32 cir
Definition:
policer.api:43
vl_api_policer_add_del_t::type
u8 type
Definition:
policer.api:49
vl_api_policer_add_del_t::client_index
u32 client_index
Definition:
policer.api:38
vl_api_policer_details_t::current_bucket
u32 current_bucket
Definition:
policer.api:137
src
vnet
policer
policer.api
Generated on Mon May 15 2017 20:50:20 for FD.io VPP by
1.8.11