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:
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 option version = "3.0.0";
18 import "vnet/interface_types.api";
19 import "vnet/policer/policer_types.api";
21 /** \brief policer bind: Associate/disassociate a policer with a worker thread.
22 @param client_index - opaque cookie to identify the sender
23 @param context - sender context, to match reply w/ request
24 @param name - policer name to bind
25 @param worker_index - the worker thread to bind to
26 @param bind_enable - Associate/disassociate
28 autoreply define policer_bind
38 autoreply define policer_bind_v2
48 /** \brief policer input: Apply policer as an input feature.
49 @param client_index - opaque cookie to identify the sender
50 @param context - sender context, to match reply w/ request
51 @param name - policer name
52 @param sw_if_index - interface to apply the policer
53 @param apply - Apply/remove
55 autoreply define policer_input
61 vl_api_interface_index_t sw_if_index;
65 autoreply define policer_input_v2
71 vl_api_interface_index_t sw_if_index;
75 /** \brief policer output: Apply policer as an output feature.
76 @param client_index - opaque cookie to identify the sender
77 @param context - sender context, to match reply w/ request
78 @param name - policer name
79 @param sw_if_index - interface to apply the policer
80 @param apply - Apply/remove
82 autoreply define policer_output
88 vl_api_interface_index_t sw_if_index;
92 autoreply define policer_output_v2
98 vl_api_interface_index_t sw_if_index;
102 /** \brief Add/del policer
103 @param client_index - opaque cookie to identify the sender
104 @param context - sender context, to match reply w/ request
105 @param is_add - add policer if non-zero, else delete
106 @param name - policer name
109 @param cb - Committed Burst
110 @param eb - Excess or Peak Burst
111 @param rate_type - rate type
112 @param round_type - rounding type
113 @param type - policer algorithm
114 @param color_aware - 0=color-blind, 1=color-aware
115 @param conform_action - conform action
116 @param exceed_action - exceed action type
117 @param violate_action - violate action type
119 define policer_add_del
130 vl_api_sse2_qos_rate_type_t rate_type;
131 vl_api_sse2_qos_round_type_t round_type;
132 vl_api_sse2_qos_policer_type_t type;
134 vl_api_sse2_qos_action_t conform_action;
135 vl_api_sse2_qos_action_t exceed_action;
136 vl_api_sse2_qos_action_t violate_action;
145 vl_api_policer_config_t infos;
148 autoreply define policer_del
156 autoreply define policer_update
162 vl_api_policer_config_t infos;
165 autoreply define policer_reset
173 /** \brief Add/del policer response
174 @param context - sender context, to match reply w/ request
175 @param retval - return value for request
176 @param policer_index - for add, returned index of the new policer
178 define policer_add_del_reply
185 define policer_add_reply
192 /** \brief Get list of policers
193 @param client_index - opaque cookie to identify the sender
194 @param context - sender context, to match reply w/ request
195 @param match_name_valid - if 0 request all policers otherwise use match_name
196 @param match_name - policer name
203 bool match_name_valid;
204 string match_name[64];
207 /** \brief Get list of policers
208 @param client_index - opaque cookie to identify the sender
209 @param context - sender context, to match reply w/ request
210 @param policer_index - index of policer in the pool, ~0 to request all
212 define policer_dump_v2
221 rpc policer_dump_v2 returns stream policer_details;
224 /** \brief Policer operational state response.
225 @param context - sender context, to match reply w/ request
226 @param name - policer name
229 @param cb - Committed Burst
230 @param eb - Excess or Peak Burst
231 @param rate_type - rate type
232 @param round_type - rounding type
233 @param type - policer algorithm
234 @param conform_action - conform action
235 @param exceed_action - exceed action
236 @param violate_action - violate action
237 @param single_rate - 1 = single rate policer, 0 = two rate policer
238 @param color_aware - for hierarchical policing
239 @param scale - power-of-2 shift amount for lower rates
240 @param cir_tokens_per_period - number of tokens for each period
241 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
242 @param current_limit - current limit
243 @param current_bucket - current bucket
244 @param extended_limit - extended limit
245 @param extended_bucket - extended bucket
246 @param last_update_time - last update time
248 define policer_details
257 vl_api_sse2_qos_rate_type_t rate_type;
258 vl_api_sse2_qos_round_type_t round_type;
259 vl_api_sse2_qos_policer_type_t type;
260 vl_api_sse2_qos_action_t conform_action;
261 vl_api_sse2_qos_action_t exceed_action;
262 vl_api_sse2_qos_action_t violate_action;
266 u32 cir_tokens_per_period;
267 u32 pir_tokens_per_period;
272 u64 last_update_time;
277 * eval: (c-set-style "gnu")