FD.io VPP
v19.01.3-6-g70449b9b9
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
/** \file
18
19
This file defines QoS record and mark API messages which are generally
20
called through a shared memory interface.
21
*/
22
23
option
version
=
"1.0.0"
;
24
25
enum
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
33
/** \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 feature
38
@param input_source - The input source/layer at which the QoS bits
39
are copied from the packet. See qos_source_t.
40
*/
41
autoreply define qos_record_enable_disable
42
{
43
u32
client_index
;
44
u32
context
;
45
u32
sw_if_index
;
46
vl_api_qos_source_t
input_source
;
47
u8
enable
;
48
};
49
50
/** \brief A row within a QoS map
51
Each value translates from an input value to an output.
52
*/
53
typeonly 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
*/
66
autoreply 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
*/
77
autoreply 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 feature
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
*/
95
autoreply define qos_mark_enable_disable
96
{
97
u32
client_index
;
98
u32
context
;
99
u32
map_id
;
100
u32
sw_if_index
;
101
vl_api_qos_source_t
output_source
;
102
u8
enable
;
103
};
104
105
/*
106
* Local Variables:
107
* eval: (c-set-style "gnu")
108
* End:
109
*/
vl_api_qos_mark_enable_disable_t::output_source
vl_api_qos_source_t output_source
Definition:
qos.api:101
vl_api_qos_mark_enable_disable_t::map_id
u32 map_id
Definition:
qos.api:99
vl_api_qos_egress_map_update_t::map_id
u32 map_id
Definition:
qos.api:70
QOS_API_SOURCE_VLAN
Definition:
qos.api:28
vl_api_qos_record_enable_disable_t::sw_if_index
u32 sw_if_index
Definition:
qos.api:45
qos_source
qos_source
Definition:
qos.api:25
vl_api_qos_egress_map_update_t::client_index
u32 client_index
Definition:
qos.api:68
u8
unsigned char u8
Definition:
types.h:56
qos_egress_map_delete
void qos_egress_map_delete(qos_egress_map_id_t mid)
Definition:
qos_egress_map.c:96
vl_api_qos_record_enable_disable_t::enable
u8 enable
Definition:
qos.api:47
vl_api_qos_egress_map_update_t::context
u32 context
Definition:
qos.api:69
vl_api_qos_record_enable_disable_t::client_index
u32 client_index
Definition:
qos.api:43
u32
unsigned int u32
Definition:
types.h:88
qos_egress_map_update
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.
Definition:
qos_egress_map.c:84
QOS_API_SOURCE_MPLS
Definition:
qos.api:29
vl_api_qos_egress_map_delete_t::client_index
u32 client_index
Definition:
qos.api:79
QOS_API_SOURCE_EXT
Definition:
qos.api:27
vl_api_qos_mark_enable_disable_t::client_index
u32 client_index
Definition:
qos.api:97
QOS_API_SOURCE_IP
Definition:
qos.api:30
version
option version
Definition:
qos.api:23
vl_api_qos_record_enable_disable_t::context
u32 context
Definition:
qos.api:44
vl_api_qos_mark_enable_disable_t::sw_if_index
u32 sw_if_index
Definition:
qos.api:100
vl_api_qos_mark_enable_disable_t::enable
u8 enable
Definition:
qos.api:102
vl_api_qos_egress_map_row_t
A row within a QoS map Each value translates from an input value to an output.
Definition:
qos.api:53
vl_api_qos_egress_map_delete_t::context
u32 context
Definition:
qos.api:80
vl_api_qos_mark_enable_disable_t::context
u32 context
Definition:
qos.api:98
vl_api_qos_record_enable_disable_t::input_source
vl_api_qos_source_t input_source
Definition:
qos.api:46
vl_api_qos_egress_map_delete_t::map_id
u32 map_id
Definition:
qos.api:81
src
vnet
qos
qos.api
Generated on Mon Nov 25 2019 16:01:19 for FD.io VPP by
1.8.13