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 = "2.0.0";
18 import "vnet/policer/policer_types.api";
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
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
37 define policer_add_del
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;
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
62 define policer_add_del_reply
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
80 bool match_name_valid;
81 string match_name[64];
84 /** \brief Policer operational state response.
85 @param context - sender context, to match reply w/ request
86 @param name - policer name
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
108 define policer_details
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;
126 u32 cir_tokens_per_period;
127 u32 pir_tokens_per_period;
132 u64 last_update_time;
137 * eval: (c-set-style "gnu")