FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
qos_types.h
Go to the documentation of this file.
1
/*
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
/**
19
* QoS types
20
*/
21
22
#ifndef __QOS_TYPES_H__
23
#define __QOS_TYPES_H__
24
25
#include <
vnet/vnet.h
>
26
27
/**
28
* Sources for the QoS bits in the packet
29
*/
30
typedef
enum
qos_source_t_
31
{
32
/**
33
* Some external source, e.g. a plugin.
34
*/
35
QOS_SOURCE_EXT
,
36
QOS_SOURCE_VLAN
,
37
QOS_SOURCE_MPLS
,
38
QOS_SOURCE_IP
,
39
} __attribute__ ((packed))
qos_source_t
;
40
41
/**
42
* The maximum number of sources. defined outside the enum so switch
43
* statements don't need to handle a non-value nor use a default label
44
*/
45
#define QOS_N_SOURCES (QOS_SOURCE_IP + 1)
46
47
#define QOS_SOURCE_NAMES { \
48
[QOS_SOURCE_EXT] = "ext", \
49
[QOS_SOURCE_IP] = "IP", \
50
[QOS_SOURCE_MPLS] = "MPLS", \
51
[QOS_SOURCE_VLAN] = "VLAN", \
52
}
53
54
#define FOR_EACH_QOS_SOURCE(_src) \
55
for (_src = QOS_SOURCE_EXT; \
56
_src <= QOS_SOURCE_IP; \
57
_src++)
58
59
/**
60
* format/unformat QoS source types
61
*/
62
extern
u8
*
format_qos_source
(
u8
* s, va_list * args);
63
extern
uword
unformat_qos_source
(
unformat_input_t
* input, va_list * args);
64
65
/**
66
* Type, er, safety for us water based entities
67
*/
68
typedef
u8
qos_bits_t
;
69
70
#endif
71
72
/*
73
* fd.io coding-style-patch-verification: ON
74
*
75
* Local Variables:
76
* eval: (c-set-style "gnu")
77
* End:
78
*/
QOS_SOURCE_EXT
@ QOS_SOURCE_EXT
Some external source, e.g.
Definition:
qos_types.h:35
QOS_SOURCE_MPLS
@ QOS_SOURCE_MPLS
Definition:
qos_types.h:37
unformat_input_t
struct _unformat_input_t unformat_input_t
qos_bits_t
u8 qos_bits_t
Type, er, safety for us water based entities.
Definition:
qos_types.h:68
QOS_SOURCE_VLAN
@ QOS_SOURCE_VLAN
Definition:
qos_types.h:36
format_qos_source
u8 * format_qos_source(u8 *s, va_list *args)
format/unformat QoS source types
Definition:
qos_types.c:27
uword
u64 uword
Definition:
types.h:112
qos_source_t
enum qos_source_t_ qos_source_t
QoS types.
unformat_qos_source
uword unformat_qos_source(unformat_input_t *input, va_list *args)
Definition:
qos_types.c:35
qos_source_t_
qos_source_t_
QoS types.
Definition:
qos_types.h:30
u8
unsigned char u8
Definition:
types.h:56
QOS_SOURCE_IP
@ QOS_SOURCE_IP
Definition:
qos_types.h:38
vnet.h
src
vnet
qos
qos_types.h
Generated on Sat Jan 8 2022 10:05:25 for FD.io VPP by
1.8.17