FD.io VPP  v19.08.3-2-gbabecb413
Vector Packet Processing
qos.api
Go to the documentation of this file.
1 /* Hey Emacs use -*- mode: C -*- */
2 /*
3  * Copyright (c) 2018 Cisco and/or its affiliates.
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at:
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 /**
18  * @file
19  * This file defines QoS record, store and mark API messages which are generally
20  * called through a shared memory interface.
21  *
22  * Definitions of verbs:
23  * store: write a QoS value into the buffer meta-data
24  * record: Extract a QoS value from a packet header and store it.
25  * mark: Make a change to the content of a packet header by writing a stored
26  * QoS value
27  */
28 option version = "1.1.0";
29 
30 import "vnet/ip/ip_types.api";
31 
32 enum qos_source : u8
33 {
38 };
39 
40 /**
41  * QoS store.
42  * @param sw_if_index - The interface on which store is enabled.
43  * @param input_source - The input source/layer at which the QoS bits are stored
44  * See qos_source_t. This determines what packets have a
45  * value stored. i.e. If IP is seleted this affects on IP
46  * packets.
47  * @param value - The value to store.
48  */
49 typedef qos_store
50 {
52  vl_api_qos_source_t input_source;
54 };
55 
56 /**
57  * Enable/Disable QoS storing
58  * The QoS bits from the packet at the specified input layer are copied
59  * into the packet. Storeing should be used in conjunction with marking
60  * @param enable - enable=1 or disable the feature
61  * @param store - Store configuration
62  */
63 autoreply define qos_store_enable_disable
64 {
68  vl_api_qos_store_t store;
69 };
70 
71 /**
72  * Dump the QoS store configs
73  */
74 define qos_store_dump
75 {
78 };
79 
80 /**
81  * Details of QoS recording configs
82  */
83 define qos_store_details
84 {
86  vl_api_qos_store_t store;
87 };
88 
89 /**
90  * QoS recording.
91  * @param sw_if_index - The interface on which recording is enabled.
92  * @param input_source - The input source/layer at which the QoS bits
93  are copied from the packet. See qos_source_t.
94  */
95 typedef qos_record
96 {
98  vl_api_qos_source_t input_source;
99 };
100 
101 /**
102  * Enable/Disable QoS recording
103  * The QoS bits from the packet at the specified input layer are copied
104  * into the packet. Recording should be used in conjunction with marking
105  * @param enable - enable=1 or disable the feature
106  * @param record - Recording configuration
107  */
108 autoreply define qos_record_enable_disable
109 {
113  vl_api_qos_record_t record;
114 };
115 
116 /**
117  * Dump the QoS record configs
118  */
119 define qos_record_dump
120 {
123 };
124 
125 /**
126  * Details of QoS recording configs
127  */
128 define qos_record_details
129 {
131  vl_api_qos_record_t record;
132 };
133 
134 /**
135  * @brief A row within a QoS map
136  * Each value translates from an input value to an output.
137  */
138 typedef qos_egress_map_row
139 {
140  u8 outputs[256];
141 };
142 
143 /**
144  * QoS Translation Map
145  *
146  * @param id - client provided identifier for the map
147  * @param rows - one row (per-input source) of output values
148  */
149 typedef qos_egress_map
150 {
151  u32 id;
152  vl_api_qos_egress_map_row_t rows[4];
153 };
154 
155 /**
156  * @brief Update a QoS Map
157  * A QoS map, translates from the QoS value in the packet set by the 'record'
158  * feature, to the value used for output in the 'mark' feature.
159  * There is one row in the map for each input/record source.
160  * The MAP is then applied to the egress interface at for a given output source
161  * @param map - The Map
162  */
163 autoreply define qos_egress_map_update
164 {
167  vl_api_qos_egress_map_t map;
168 };
169 
170 /**
171  * @brief Delete a Qos Map
172  * @param map_id - ID of the map to delete
173  */
174 autoreply define qos_egress_map_delete
175 {
179 };
180 
181 /**
182  * Dump the QoS egress maps
183  */
184 define qos_egress_map_dump
185 {
188 };
189 
190 /**
191  * QoS map details
192  */
193 define qos_egress_map_details
194 {
196  vl_api_qos_egress_map_t map;
197 };
198 
199 /**
200  * QoS marking Cponfiguration
201  * The QoS bits from the buffer are mapped (using the desired egress map)
202  * into the header of the 'output-source'. Marking should be used in
203  * conjunction with recording
204  * @param sw_if_index - The interface on which recording is enabled.
205  * @param output_source - The output source/layer at which the QoS bits
206  * are written into the packet. See qos_source_t.
207  * @param map_id - The ID of the MAP in which the translation from input
208  * to output is performed.
209  */
210 typedef qos_mark
211 {
214  vl_api_qos_source_t output_source;
215 };
216 
217 /**
218  * @brief Enable/Disable QoS marking
219  * @param enable - enable=1 or disable the feature
220  * @param mark - Marking config
221  */
222 autoreply define qos_mark_enable_disable
223 {
227  vl_api_qos_mark_t mark;
228 };
229 
230 /**
231  * Dump QoS marking configs
232  */
233 define qos_mark_dump
234 {
238 };
239 
240 /**
241  * QoS marking details
242  */
243 autoreply define qos_mark_details
244 {
246  vl_api_qos_mark_t mark;
247 };
248 
249 /*
250  * Local Variables:
251  * eval: (c-set-style "gnu")
252  * End:
253  */
vl_api_qos_source_t output_source
Definition: qos.api:214
vl_api_qos_record_t record
Definition: qos.api:131
u32 map_id
Definition: qos.api:213
unsigned char u8
Definition: types.h:56
void qos_egress_map_delete(qos_egress_map_id_t mid)
typedef qos_egress_map
QoS Translation Map.
Definition: qos.api:150
vl_api_qos_egress_map_row_t rows[4]
Definition: qos.api:152
vl_api_interface_index_t sw_if_index
Definition: gre.api:50
typedef qos_record
QoS recording.
Definition: qos.api:96
unsigned int u32
Definition: types.h:88
vl_api_qos_source_t input_source
Definition: qos.api:52
void qos_egress_map_update(qos_egress_map_id_t mid, qos_source_t input_source, qos_bits_t *values)
Add a qos-egress map to an interface.
vl_api_qos_store_t store
Definition: qos.api:86
typedef qos_store
QoS store.
Definition: qos.api:50
vl_api_qos_mark_t mark
Definition: qos.api:227
qos_source
Definition: qos.api:32
vl_api_qos_egress_map_t map
Definition: qos.api:196
option version
Definition: qos.api:28
u8 value
Definition: qos.api:53
vl_api_qos_record_t record
Definition: qos.api:113
typedef qos_mark
QoS marking Cponfiguration The QoS bits from the buffer are mapped (using the desired egress map) int...
Definition: qos.api:211
vl_api_qos_store_t store
Definition: qos.api:68
vl_api_qos_egress_map_t map
Definition: qos.api:167
typedef qos_egress_map_row
A row within a QoS map Each value translates from an input value to an output.
Definition: qos.api:139
vl_api_qos_mark_t mark
Definition: qos.api:246
u32 id
Definition: udp.api:45