DPDK  20.11.10
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_udp.h>
17 
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
24 #define RTE_VXLAN_DEFAULT_PORT 4789
25 #define RTE_VXLAN_GPE_DEFAULT_PORT 4790
26 
32 struct rte_vxlan_hdr {
33  uint32_t vx_flags;
34  uint32_t vx_vni;
35 } __rte_packed;
36 
38 #define RTE_ETHER_VXLAN_HLEN \
39  (sizeof(struct rte_udp_hdr) + sizeof(struct rte_vxlan_hdr))
40 
41 
48  uint8_t vx_flags;
49  uint8_t reserved[2];
50  uint8_t proto;
51  uint32_t vx_vni;
52 } __rte_packed;
53 
55 #define RTE_ETHER_VXLAN_GPE_HLEN (sizeof(struct rte_udp_hdr) + \
56  sizeof(struct rte_vxlan_gpe_hdr))
57 
58 /* VXLAN-GPE next protocol types */
59 #define RTE_VXLAN_GPE_TYPE_IPV4 1
60 #define RTE_VXLAN_GPE_TYPE_IPV6 2
61 #define RTE_VXLAN_GPE_TYPE_ETH 3
62 #define RTE_VXLAN_GPE_TYPE_NSH 4
63 #define RTE_VXLAN_GPE_TYPE_MPLS 5
64 #define RTE_VXLAN_GPE_TYPE_GBP 6
65 #define RTE_VXLAN_GPE_TYPE_VBNG 7
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif /* RTE_VXLAN_H_ */
#define __rte_packed
Definition: rte_common.h:84
uint32_t vx_vni
Definition: rte_vxlan.h:34
uint8_t vx_flags
Definition: rte_vxlan.h:48
uint32_t vx_flags
Definition: rte_vxlan.h:33
uint32_t vx_vni
Definition: rte_vxlan.h:51