blob: 13024ddee155fe6c4bfe133224e0bad03a95dba7 [file] [log] [blame]
Pavel Kotucekd9aad292017-01-25 08:45:38 +01001/*
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
Dave Barach0d056e52017-09-28 15:11:16 -040016vl_api_version 1.0.0
17
Pavel Kotucekd9aad292017-01-25 08:45:38 +010018/** \brief Add/del policer
19 @param client_index - opaque cookie to identify the sender
20 @param context - sender context, to match reply w/ request
21 @param is_add - add policer if non-zero, else delete
22 @param name - policer name
23 @param cir - CIR
24 @param eir - EIR
25 @param cb - Committed Burst
26 @param eb - Excess or Peak Burst
27 @param rate_type - rate type
28 @param round_type - rounding type
29 @param type - policer algorithm
30 @param color_aware - 0=color-blind, 1=color-aware
31 @param conform_action_type - conform action type
32 @param conform_dscp - DSCP for conform mar-and-transmit action
33 @param exceed_action_type - exceed action type
34 @param exceed_dscp - DSCP for exceed mar-and-transmit action
35 @param violate_action_type - violate action type
36 @param violate_dscp - DSCP for violate mar-and-transmit action
37*/
38define policer_add_del
39{
40 u32 client_index;
41 u32 context;
42
43 u8 is_add;
44 u8 name[64];
45 u32 cir;
46 u32 eir;
47 u64 cb;
48 u64 eb;
49 u8 rate_type;
50 u8 round_type;
51 u8 type;
52 u8 color_aware;
53 u8 conform_action_type;
54 u8 conform_dscp;
55 u8 exceed_action_type;
56 u8 exceed_dscp;
57 u8 violate_action_type;
58 u8 violate_dscp;
59};
60
61/** \brief Add/del policer response
62 @param context - sender context, to match reply w/ request
63 @param retval - return value for request
64 @param policer_index - for add, returned index of the new policer
65*/
66define policer_add_del_reply
67{
68 u32 context;
69 i32 retval;
70 u32 policer_index;
71};
72
73/** \brief Get list of policers
74 @param client_index - opaque cookie to identify the sender
75 @param context - sender context, to match reply w/ request
76 @param match_name_valid - if 0 request all policers otherwise use match_name
77 @param match_name - policer name
78*/
79define policer_dump
80{
81 u32 client_index;
82 u32 context;
83
84 u8 match_name_valid;
85 u8 match_name[64];
86};
87
88/** \brief Policer operational state response.
89 @param context - sender context, to match reply w/ request
90 @param name - policer name
91 @param cir - CIR
92 @param eir - EIR
93 @param cb - Committed Burst
94 @param eb - Excess or Peak Burst
95 @param rate_type - rate type
96 @param round_type - rounding type
97 @param type - policer algorithm
98 @param conform_action_type - conform action type
99 @param conform_dscp - DSCP for conform mar-and-transmit action
100 @param exceed_action_type - exceed action type
101 @param exceed_dscp - DSCP for exceed mar-and-transmit action
102 @param violate_action_type - violate action type
103 @param violate_dscp - DSCP for violate mar-and-transmit action
104 @param single_rate - 1 = single rate policer, 0 = two rate policer
105 @param color_aware - for hierarchical policing
106 @param scale - power-of-2 shift amount for lower rates
107 @param cir_tokens_per_period - number of tokens for each period
108 @param pir_tokens_per_period - number of tokens for each period for 2-rate policer
109 @param current_limit - current limit
110 @param current_bucket - current bucket
111 @param extended_limit - extended limit
112 @param extended_bucket - extended bucket
113 @param last_update_time - last update time
114*/
115define policer_details
116{
117 u32 context;
118
119 u8 name[64];
120 u32 cir;
121 u32 eir;
122 u64 cb;
123 u64 eb;
124 u8 rate_type;
125 u8 round_type;
126 u8 type;
127 u8 conform_action_type;
128 u8 conform_dscp;
129 u8 exceed_action_type;
130 u8 exceed_dscp;
131 u8 violate_action_type;
132 u8 violate_dscp;
133 u8 single_rate;
134 u8 color_aware;
135 u32 scale;
136 u32 cir_tokens_per_period;
137 u32 pir_tokens_per_period;
138 u32 current_limit;
139 u32 current_bucket;
140 u32 extended_limit;
141 u32 extended_bucket;
142 u64 last_update_time;
143};
144
145/*
146 * Local Variables:
147 * eval: (c-set-style "gnu")
148 * End:
149 */