blob: 946cc357b80e48b9b857d986b5825d994607c998 [file] [log] [blame]
Pavel Kotucekd9aad292017-01-25 08:45:38 +01001/*
Jakub Grajciarcd01fb42020-03-02 13:16:53 +01002 * Copyright (c) 2015-2020 Cisco and/or its affiliates.
Pavel Kotucekd9aad292017-01-25 08:45:38 +01003 * 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
Jakub Grajciarcd01fb42020-03-02 13:16:53 +010016option version = "2.0.0";
17
18import "vnet/policer/policer_types.api";
Dave Barach0d056e52017-09-28 15:11:16 -040019
Pavel Kotucekd9aad292017-01-25 08:45:38 +010020/** \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
Jakub Grajciarcd01fb42020-03-02 13:16:53 +010033 @param conform_action - conform action
34 @param exceed_action - exceed action type
35 @param violate_action - violate action type
Pavel Kotucekd9aad292017-01-25 08:45:38 +010036*/
37define policer_add_del
38{
39 u32 client_index;
40 u32 context;
41
Jakub Grajciarcd01fb42020-03-02 13:16:53 +010042 bool is_add;
43 string name[64];
Pavel Kotucekd9aad292017-01-25 08:45:38 +010044 u32 cir;
45 u32 eir;
46 u64 cb;
47 u64 eb;
Jakub Grajciarcd01fb42020-03-02 13:16:53 +010048 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;
51 bool color_aware;
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;
Pavel Kotucekd9aad292017-01-25 08:45:38 +010055};
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*/
62define policer_add_del_reply
63{
64 u32 context;
65 i32 retval;
66 u32 policer_index;
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*/
75define policer_dump
76{
77 u32 client_index;
78 u32 context;
79
Jakub Grajciarcd01fb42020-03-02 13:16:53 +010080 bool match_name_valid;
81 string match_name[64];
Pavel Kotucekd9aad292017-01-25 08:45:38 +010082};
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
Jakub Grajciarcd01fb42020-03-02 13:16:53 +010094 @param conform_action - conform action
95 @param exceed_action - exceed action
96 @param violate_action - violate action
Pavel Kotucekd9aad292017-01-25 08:45:38 +010097 @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*/
108define policer_details
109{
110 u32 context;
111
Jakub Grajciarcd01fb42020-03-02 13:16:53 +0100112 string name[64];
Pavel Kotucekd9aad292017-01-25 08:45:38 +0100113 u32 cir;
114 u32 eir;
115 u64 cb;
116 u64 eb;
Jakub Grajciarcd01fb42020-03-02 13:16:53 +0100117 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;
123 bool single_rate;
124 bool color_aware;
Pavel Kotucekd9aad292017-01-25 08:45:38 +0100125 u32 scale;
126 u32 cir_tokens_per_period;
127 u32 pir_tokens_per_period;
128 u32 current_limit;
129 u32 current_bucket;
130 u32 extended_limit;
131 u32 extended_bucket;
132 u64 last_update_time;
133};
134
135/*
136 * Local Variables:
137 * eval: (c-set-style "gnu")
138 * End:
139 */