1 /* Hey Emacs use -*- mode: C -*- */
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 * This file defines QoS record, store and mark API messages which are generally
20 * called through a shared memory interface.
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
28 option version = "1.1.0";
30 import "vnet/ip/ip_types.api";
34 QOS_API_SOURCE_EXT = 0,
35 QOS_API_SOURCE_VLAN = 1,
36 QOS_API_SOURCE_MPLS = 2,
37 QOS_API_SOURCE_IP = 3,
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
47 * @param value - The value to store.
52 vl_api_qos_source_t input_source;
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
63 autoreply define qos_store_enable_disable
68 vl_api_qos_store_t store;
72 * Dump the QoS store configs
81 * Details of QoS recording configs
83 define qos_store_details
86 vl_api_qos_store_t store;
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.
98 vl_api_qos_source_t input_source;
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
108 autoreply define qos_record_enable_disable
113 vl_api_qos_record_t record;
117 * Dump the QoS record configs
119 define qos_record_dump
126 * Details of QoS recording configs
128 define qos_record_details
131 vl_api_qos_record_t record;
135 * @brief A row within a QoS map
136 * Each value translates from an input value to an output.
138 typedef qos_egress_map_row
144 * QoS Translation Map
146 * @param id - client provided identifier for the map
147 * @param rows - one row (per-input source) of output values
149 typedef qos_egress_map
152 vl_api_qos_egress_map_row_t rows[4];
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
163 autoreply define qos_egress_map_update
167 vl_api_qos_egress_map_t map;
171 * @brief Delete a Qos Map
172 * @param map_id - ID of the map to delete
174 autoreply define qos_egress_map_delete
182 * Dump the QoS egress maps
184 define qos_egress_map_dump
193 define qos_egress_map_details
196 vl_api_qos_egress_map_t map;
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.
214 vl_api_qos_source_t output_source;
218 * @brief Enable/Disable QoS marking
219 * @param enable - enable=1 or disable the feature
220 * @param mark - Marking config
222 autoreply define qos_mark_enable_disable
227 vl_api_qos_mark_t mark;
231 * Dump QoS marking configs
241 * QoS marking details
243 autoreply define qos_mark_details
246 vl_api_qos_mark_t mark;
251 * eval: (c-set-style "gnu")