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 policer bind: Associate/disassociate a policer with a worker thread.
21 @param client_index - opaque cookie to identify the sender
22 @param context - sender context, to match reply w/ request
23 @param name - policer name to bind
24 @param worker_index - the worker thread to bind to
25 @param bind_enable - Associate/disassociate
27 autoreply define policer_bind
37 /** \brief Add/del policer
38 @param client_index - opaque cookie to identify the sender
39 @param context - sender context, to match reply w/ request
40 @param is_add - add policer if non-zero, else delete
41 @param name - policer name
44 @param cb - Committed Burst
45 @param eb - Excess or Peak Burst
46 @param rate_type - rate type
47 @param round_type - rounding type
48 @param type - policer algorithm
49 @param color_aware - 0=color-blind, 1=color-aware
50 @param conform_action - conform action
51 @param exceed_action - exceed action type
52 @param violate_action - violate action type
54 define policer_add_del
65 vl_api_sse2_qos_rate_type_t rate_type;
66 vl_api_sse2_qos_round_type_t round_type;
67 vl_api_sse2_qos_policer_type_t type;
69 vl_api_sse2_qos_action_t conform_action;
70 vl_api_sse2_qos_action_t exceed_action;
71 vl_api_sse2_qos_action_t violate_action;
74 /** \brief Add/del policer response
75 @param context - sender context, to match reply w/ request
76 @param retval - return value for request
77 @param policer_index - for add, returned index of the new policer
79 define policer_add_del_reply
86 /** \brief Get list of policers
87 @param client_index - opaque cookie to identify the sender
88 @param context - sender context, to match reply w/ request
89 @param match_name_valid - if 0 request all policers otherwise use match_name
90 @param match_name - policer name
97 bool match_name_valid;
98 string match_name[64];
101 /** \brief Policer operational state response.
102 @param context - sender context, to match reply w/ request
103 @param name - policer name
106 @param cb - Committed Burst
107 @param eb - Excess or Peak Burst
108 @param rate_type - rate type
109 @param round_type - rounding type
110 @param type - policer algorithm
111 @param conform_action - conform action
112 @param exceed_action - exceed action
113 @param violate_action - violate action
114 @param single_rate - 1 = single rate policer, 0 = two rate policer
115 @param color_aware - for hierarchical policing
116 @param scale - power-of-2 shift amount for lower rates
117 @param cir_tokens_per_period - number of tokens for each period
118 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
119 @param current_limit - current limit
120 @param current_bucket - current bucket
121 @param extended_limit - extended limit
122 @param extended_bucket - extended bucket
123 @param last_update_time - last update time
125 define policer_details
134 vl_api_sse2_qos_rate_type_t rate_type;
135 vl_api_sse2_qos_round_type_t round_type;
136 vl_api_sse2_qos_policer_type_t type;
137 vl_api_sse2_qos_action_t conform_action;
138 vl_api_sse2_qos_action_t exceed_action;
139 vl_api_sse2_qos_action_t violate_action;
143 u32 cir_tokens_per_period;
144 u32 pir_tokens_per_period;
149 u64 last_update_time;
154 * eval: (c-set-style "gnu")