DPDK
24.11.2
Toggle main menu visibility
Main Page
Related Pages
Data Structures
Data Structures
Data Fields
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Files
File List
Globals
All
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Functions
_
g
r
t
Variables
c
r
Typedefs
a
c
d
e
h
l
m
p
r
s
t
Enumerations
d
r
Enumerator
c
e
f
r
s
w
Macros
_
b
c
i
l
m
o
p
r
s
t
u
v
Examples
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
lib
net
rte_vxlan.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2018-2019 Intel Corporation
3
*/
4
5
#ifndef _RTE_VXLAN_H_
6
#define _RTE_VXLAN_H_
7
14
#include <stdint.h>
15
16
#include <
rte_byteorder.h
>
17
#include <
rte_udp.h
>
18
20
#define RTE_VXLAN_DEFAULT_PORT 4789
22
#define RTE_VXLAN_GPE_DEFAULT_PORT 4790
23
29
__extension__
/* no named member in struct */
30
struct
rte_vxlan_hdr
{
31
union
{
32
rte_be32_t
vx_flags
;
33
struct
{
34
union
{
35
uint8_t
flags
;
36
struct
{
37
#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
38
uint8_t
flag_g
:1,
39
flag_rsvd:1,
/* Reserved. */
40
flag_ver
:2,
41
flag_i
:1,
42
flag_p
:1,
43
flag_b
:1,
44
flag_o
:1;
45
#elif RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
46
uint8_t
flag_o
:1,
47
flag_b
:1,
48
flag_p
:1,
49
flag_i
:1,
50
flag_ver
:2,
51
flag_rsvd:1,
52
flag_g
:1;
53
#endif
54
} __rte_packed;
55
};
/* end of 1st byte */
56
union
{
57
uint8_t rsvd0[3];
/* Reserved for extensions. */
58
struct
{
59
#if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
60
uint8_t rsvd0_gbp1:1,
/* Reserved. */
61
flag_d
:1,
62
rsvd0_gbp2:2,
/* Reserved. */
63
flag_a
:1,
64
rsvd0_gbp3:3;
/* Reserved. */
65
#elif RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN
66
uint8_t rsvd0_gbp3:3,
67
flag_a
:1,
68
rsvd0_gbp2:2,
69
flag_d
:1,
70
rsvd0_gbp1:1;
71
#endif
72
union
{
73
uint16_t
policy_id
;
74
struct
{
75
uint8_t rsvd0_gpe;
/* Reserved. */
76
uint8_t
proto
;
77
/* 0x01 : IPv4
78
* 0x02 : IPv6
79
* 0x03 : Ethernet
80
* 0x04 : Network Service Header
81
*/
82
} __rte_packed;
83
};
84
} __rte_packed;
85
};
86
} __rte_packed;
87
};
/* end of 1st 32-bit word */
88
union
{
89
rte_be32_t
vx_vni
;
90
struct
{
91
uint8_t
vni
[3];
92
union
{
93
uint8_t
rsvd1
;
94
uint8_t
last_rsvd
;
95
};
96
} __rte_packed;
97
};
/* end of 2nd 32-bit word */
98
}
__rte_packed
;
99
101
#define RTE_ETHER_VXLAN_HLEN \
102
(sizeof(struct rte_udp_hdr) + sizeof(struct rte_vxlan_hdr))
103
104
113
__extension__
/* no named member in struct */
114
struct
rte_vxlan_gpe_hdr
{
115
union
{
116
struct
{
117
uint8_t
vx_flags
;
118
uint8_t
reserved
[2];
119
uint8_t
protocol
;
120
rte_be32_t
vx_vni
;
121
};
122
struct
{
123
uint8_t
flags
;
124
uint8_t
rsvd0
[2];
125
uint8_t
proto
;
126
uint8_t
vni
[3];
127
uint8_t
rsvd1
;
128
};
129
};
130
}
__rte_packed
;
131
138
#define RTE_ETHER_VXLAN_GPE_HLEN (sizeof(struct rte_udp_hdr) + \
139
sizeof(struct rte_vxlan_gpe_hdr))
140
141
/* VXLAN-GPE next protocol types */
142
#define RTE_VXLAN_GPE_TYPE_IPV4 1
143
#define RTE_VXLAN_GPE_TYPE_IPV6 2
144
#define RTE_VXLAN_GPE_TYPE_ETH 3
145
#define RTE_VXLAN_GPE_TYPE_NSH 4
146
#define RTE_VXLAN_GPE_TYPE_MPLS 5
147
#define RTE_VXLAN_GPE_TYPE_GBP 6
148
#define RTE_VXLAN_GPE_TYPE_VBNG 7
150
#endif
/* RTE_VXLAN_H_ */
rte_byteorder.h
rte_be32_t
uint32_t rte_be32_t
Definition:
rte_byteorder.h:117
__rte_packed
#define __rte_packed
Definition:
rte_common.h:108
rte_udp.h
rte_vxlan_gpe_hdr
Definition:
rte_vxlan.h:114
rte_vxlan_gpe_hdr::vx_vni
rte_be32_t vx_vni
Definition:
rte_vxlan.h:120
rte_vxlan_gpe_hdr::vx_flags
uint8_t vx_flags
Definition:
rte_vxlan.h:117
rte_vxlan_gpe_hdr::reserved
uint8_t reserved[2]
Definition:
rte_vxlan.h:118
rte_vxlan_gpe_hdr::flags
uint8_t flags
Definition:
rte_vxlan.h:123
rte_vxlan_gpe_hdr::vni
uint8_t vni[3]
Definition:
rte_vxlan.h:126
rte_vxlan_gpe_hdr::rsvd0
uint8_t rsvd0[2]
Definition:
rte_vxlan.h:124
rte_vxlan_gpe_hdr::rsvd1
uint8_t rsvd1
Definition:
rte_vxlan.h:127
rte_vxlan_gpe_hdr::protocol
uint8_t protocol
Definition:
rte_vxlan.h:119
rte_vxlan_gpe_hdr::proto
uint8_t proto
Definition:
rte_vxlan.h:125
rte_vxlan_hdr
Definition:
rte_vxlan.h:30
rte_vxlan_hdr::flag_a
uint8_t flag_a
Definition:
rte_vxlan.h:63
rte_vxlan_hdr::flag_p
uint8_t flag_p
Definition:
rte_vxlan.h:42
rte_vxlan_hdr::vx_vni
rte_be32_t vx_vni
Definition:
rte_vxlan.h:89
rte_vxlan_hdr::flag_d
uint8_t flag_d
Definition:
rte_vxlan.h:61
rte_vxlan_hdr::flag_o
uint8_t flag_o
Definition:
rte_vxlan.h:44
rte_vxlan_hdr::flag_g
uint8_t flag_g
Definition:
rte_vxlan.h:38
rte_vxlan_hdr::flag_i
uint8_t flag_i
Definition:
rte_vxlan.h:41
rte_vxlan_hdr::flag_b
uint8_t flag_b
Definition:
rte_vxlan.h:43
rte_vxlan_hdr::flag_ver
uint8_t flag_ver
Definition:
rte_vxlan.h:40
rte_vxlan_hdr::vx_flags
rte_be32_t vx_flags
Definition:
rte_vxlan.h:32
rte_vxlan_hdr::flags
uint8_t flags
Definition:
rte_vxlan.h:35
rte_vxlan_hdr::vni
uint8_t vni[3]
Definition:
rte_vxlan.h:91
rte_vxlan_hdr::rsvd1
uint8_t rsvd1
Definition:
rte_vxlan.h:93
rte_vxlan_hdr::policy_id
uint16_t policy_id
Definition:
rte_vxlan.h:73
rte_vxlan_hdr::proto
uint8_t proto
Definition:
rte_vxlan.h:76
rte_vxlan_hdr::last_rsvd
uint8_t last_rsvd
Definition:
rte_vxlan.h:94
Generated by
1.9.4