blob: 720c41789bdec6777502474c2240ed5d2c61250d [file] [log] [blame]
Neale Rannsed234e72018-09-05 09:36:05 -07001/* Hey Emacs use -*- mode: C -*- */
Neale Ranns039cbfe2018-02-27 03:45:38 -08002/*
Neale Rannsed234e72018-09-05 09:36:05 -07003 * Copyright (c) 2018 Cisco and/or its affiliates.
Neale Ranns039cbfe2018-02-27 03:45:38 -08004 * 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/** \file
18
19 This file defines QoS record and mark API messages which are generally
20 called through a shared memory interface.
21*/
22
23option version = "1.0.0";
24
Neale Rannsed234e72018-09-05 09:36:05 -070025enum qos_source
26{
27 QOS_API_SOURCE_EXT = 0,
28 QOS_API_SOURCE_VLAN = 1,
29 QOS_API_SOURCE_MPLS = 2,
30 QOS_API_SOURCE_IP = 3,
31};
32
Neale Ranns039cbfe2018-02-27 03:45:38 -080033/** \brief Enable/Disable QoS recording
34 The QoS bits from the packet at the specified input layer are copied
35 into the packet. Recording should be used in conjunction with marking
36 @param sw_if_index - The interface on which recording is enabled.
37 @param enable - enable=1 or disable the feautre
38 @param input_source - The input source/layer at which the QoS bits
39 are copied from the packet. See qos_source_t.
40*/
41autoreply define qos_record_enable_disable
42{
43 u32 client_index;
44 u32 context;
45 u32 sw_if_index;
Neale Rannsed234e72018-09-05 09:36:05 -070046 vl_api_qos_source_t input_source;
Neale Ranns039cbfe2018-02-27 03:45:38 -080047 u8 enable;
48};
49
50/** \brief A row within a QoS map
51 Each value translates from an input value to an output.
52*/
53typeonly define qos_egress_map_row
54{
55 u8 outputs[256];
56};
57
58/** \brief Update a QoS Map
59 A QoS map, translates from the QoS value in the packet set by the 'record'
60 feature, to the value used for output in the 'mark' feature.
61 There is one row in the map for each input/record source.
62 The MAP is then applied to the egress interface at for a given output source
63 @param map_id - client provided identifier for the map
64 @param rows - one row (per-input source) of output values
65*/
66autoreply define qos_egress_map_update
67{
68 u32 client_index;
69 u32 context;
70 u32 map_id;
71 vl_api_qos_egress_map_row_t rows[4];
72};
73
74/** \brief Delete a Qos Map
75 @param map_id - ID of the map to delete
76*/
77autoreply define qos_egress_map_delete
78{
79 u32 client_index;
80 u32 context;
81 u32 map_id;
82};
83
84/** \brief Enable/Disable QoS marking
85 The QoS bits from the packet are mapped (using the desired egress map)
86 into the header of the 'output-source'. Marking should be used in
87 conjunction with recording
88 @param sw_if_index - The interface on which recording is enabled.
89 @param enable - enable=1 or disable the feautre
90 @param output_source - The output source/layer at which the QoS bits
91 are written into the packet. See qos_source_t.
92 @param map_id - The ID of the MAP in which the translation from input
93 to output is performed.
94*/
95autoreply define qos_mark_enable_disable
96{
97 u32 client_index;
98 u32 context;
99 u32 map_id;
100 u32 sw_if_index;
Neale Rannsed234e72018-09-05 09:36:05 -0700101 vl_api_qos_source_t output_source;
Neale Ranns039cbfe2018-02-27 03:45:38 -0800102 u8 enable;
103};
104
105/*
106 * Local Variables:
107 * eval: (c-set-style "gnu")
108 * End:
109 */