FD.io VPP  v20.09-64-g4f7b92f0a
Vector Packet Processing
policer.api
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2020 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 option version = "2.0.0";
17 
18 import "vnet/policer/policer_types.api";
19 
20 /** \brief Add/del policer
21  @param client_index - opaque cookie to identify the sender
22  @param context - sender context, to match reply w/ request
23  @param is_add - add policer if non-zero, else delete
24  @param name - policer name
25  @param cir - CIR
26  @param eir - EIR
27  @param cb - Committed Burst
28  @param eb - Excess or Peak Burst
29  @param rate_type - rate type
30  @param round_type - rounding type
31  @param type - policer algorithm
32  @param color_aware - 0=color-blind, 1=color-aware
33  @param conform_action - conform action
34  @param exceed_action - exceed action type
35  @param violate_action - violate action type
36 */
38 {
41 
42  bool is_add;
43  string name[64];
48  vl_api_sse2_qos_rate_type_t rate_type;
49  vl_api_sse2_qos_round_type_t round_type;
50  vl_api_sse2_qos_policer_type_t type;
52  vl_api_sse2_qos_action_t conform_action;
53  vl_api_sse2_qos_action_t exceed_action;
54  vl_api_sse2_qos_action_t violate_action;
55 };
56 
57 /** \brief Add/del policer response
58  @param context - sender context, to match reply w/ request
59  @param retval - return value for request
60  @param policer_index - for add, returned index of the new policer
61 */
62 define policer_add_del_reply
63 {
67 };
68 
69 /** \brief Get list of policers
70  @param client_index - opaque cookie to identify the sender
71  @param context - sender context, to match reply w/ request
72  @param match_name_valid - if 0 request all policers otherwise use match_name
73  @param match_name - policer name
74 */
75 define policer_dump
76 {
79 
81  string match_name[64];
82 };
83 
84 /** \brief Policer operational state response.
85  @param context - sender context, to match reply w/ request
86  @param name - policer name
87  @param cir - CIR
88  @param eir - EIR
89  @param cb - Committed Burst
90  @param eb - Excess or Peak Burst
91  @param rate_type - rate type
92  @param round_type - rounding type
93  @param type - policer algorithm
94  @param conform_action - conform action
95  @param exceed_action - exceed action
96  @param violate_action - violate action
97  @param single_rate - 1 = single rate policer, 0 = two rate policer
98  @param color_aware - for hierarchical policing
99  @param scale - power-of-2 shift amount for lower rates
100  @param cir_tokens_per_period - number of tokens for each period
101  @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
102  @param current_limit - current limit
103  @param current_bucket - current bucket
104  @param extended_limit - extended limit
105  @param extended_bucket - extended bucket
106  @param last_update_time - last update time
107 */
108 define policer_details
109 {
111 
112  string name[64];
117  vl_api_sse2_qos_rate_type_t rate_type;
118  vl_api_sse2_qos_round_type_t round_type;
119  vl_api_sse2_qos_policer_type_t type;
120  vl_api_sse2_qos_action_t conform_action;
121  vl_api_sse2_qos_action_t exceed_action;
122  vl_api_sse2_qos_action_t violate_action;
133 };
134 
135 /*
136  * Local Variables:
137  * eval: (c-set-style "gnu")
138  * End:
139  */
vl_api_sse2_qos_policer_type_t type
Definition: policer.api:50
unsigned long u64
Definition: types.h:89
option version
Definition: policer.api:16
vl_api_sse2_qos_rate_type_t rate_type
Definition: policer.api:117
vl_api_sse2_qos_action_t exceed_action
Definition: policer.api:53
unsigned int u32
Definition: types.h:88
vl_api_sse2_qos_policer_type_t type
Definition: policer.api:119
vl_api_sse2_qos_action_t violate_action
Definition: policer.api:54
vl_api_sse2_qos_action_t conform_action
Definition: policer.api:52
string name[64]
Definition: ip.api:44
signed int i32
Definition: types.h:77
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:22
vl_api_sse2_qos_round_type_t round_type
Definition: policer.api:49
vl_api_sse2_qos_rate_type_t rate_type
Definition: policer.api:48
vl_api_sse2_qos_action_t exceed_action
Definition: policer.api:121
vl_api_sse2_qos_action_t violate_action
Definition: policer.api:122
vl_api_sse2_qos_action_t conform_action
Definition: policer.api:120
vl_api_sse2_qos_round_type_t round_type
Definition: policer.api:118