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 and mark API messages which are generally
20 called through a shared memory interface.
23 option version = "1.0.0";
27 QOS_API_SOURCE_EXT = 0,
28 QOS_API_SOURCE_VLAN = 1,
29 QOS_API_SOURCE_MPLS = 2,
30 QOS_API_SOURCE_IP = 3,
35 * @param sw_if_index - The interface on which recording is enabled.
36 * @param input_source - The input source/layer at which the QoS bits
37 are copied from the packet. See qos_source_t.
42 vl_api_qos_source_t input_source;
46 * Enable/Disable QoS recording
47 * The QoS bits from the packet at the specified input layer are copied
48 * into the packet. Recording should be used in conjunction with marking
49 * @param enable - enable=1 or disable the feature
50 * @param record - Recording configuration
52 autoreply define qos_record_enable_disable
57 vl_api_qos_record_t record;
61 * Dump the QoS record configs
63 define qos_record_dump
70 * Details of QoS recording configs
72 define qos_record_details
75 vl_api_qos_record_t record;
79 * @brief A row within a QoS map
80 * Each value translates from an input value to an output.
82 typedef qos_egress_map_row
90 * @param id - client provided identifier for the map
91 * @param rows - one row (per-input source) of output values
93 typedef qos_egress_map
96 vl_api_qos_egress_map_row_t rows[4];
100 * @brief Update a QoS Map
101 * A QoS map, translates from the QoS value in the packet set by the 'record'
102 * feature, to the value used for output in the 'mark' feature.
103 * There is one row in the map for each input/record source.
104 * The MAP is then applied to the egress interface at for a given output source
105 * @param map - The Map
107 autoreply define qos_egress_map_update
111 vl_api_qos_egress_map_t map;
115 * @brief Delete a Qos Map
116 * @param map_id - ID of the map to delete
118 autoreply define qos_egress_map_delete
126 * Dump the QoS egress maps
128 define qos_egress_map_dump
137 define qos_egress_map_details
140 vl_api_qos_egress_map_t map;
144 * QoS marking Cponfiguration
145 * The QoS bits from the buffer are mapped (using the desired egress map)
146 * into the header of the 'output-source'. Marking should be used in
147 * conjunction with recording
148 * @param sw_if_index - The interface on which recording is enabled.
149 * @param output_source - The output source/layer at which the QoS bits
150 * are written into the packet. See qos_source_t.
151 * @param map_id - The ID of the MAP in which the translation from input
152 * to output is performed.
158 vl_api_qos_source_t output_source;
162 * @brief Enable/Disable QoS marking
163 * @param enable - enable=1 or disable the feature
164 * @param mark - Marking config
166 autoreply define qos_mark_enable_disable
171 vl_api_qos_mark_t mark;
175 * Dump QoS marking configs
185 * QoS marking details
187 autoreply define qos_mark_details
190 vl_api_qos_mark_t mark;
195 * eval: (c-set-style "gnu")