1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2020 Mellanox Technologies, Ltd
11 * GENEVE-related definitions
19 /** GENEVE default port. */
20 #define RTE_GENEVE_DEFAULT_PORT 6081
23 * GENEVE protocol header. (draft-ietf-nvo3-geneve-09)
25 * 2-bits version (must be 0).
26 * 6-bits option length in four byte multiples, not including the eight
27 * bytes of the fixed tunnel header.
28 * 1-bit control packet.
29 * 1-bit critical options in packet.
31 * 16-bits Protocol Type. The protocol data unit after the Geneve header
32 * following the EtherType convention. Ethernet itself is represented by
34 * 24-bits Virtual Network Identifier (VNI). Virtual network unique identified.
35 * 8-bits reserved bits (must be 0 on transmission and ignored on receipt).
36 * More-bits (optional) variable length options.
39 struct rte_geneve_hdr {
40 #if RTE_BYTE_ORDER == RTE_BIG_ENDIAN
41 uint8_t ver:2; /**< Version. */
42 uint8_t opt_len:6; /**< Options length. */
43 uint8_t oam:1; /**< Control packet. */
44 uint8_t critical:1; /**< Critical packet. */
45 uint8_t reserved1:6; /**< Reserved. */
47 uint8_t opt_len:6; /**< Options length. */
48 uint8_t ver:2; /**< Version. */
49 uint8_t reserved1:6; /**< Reserved. */
50 uint8_t critical:1; /**< Critical packet. */
51 uint8_t oam:1; /**< Control packet. */
53 rte_be16_t proto; /**< Protocol type. */
54 uint8_t vni[3]; /**< Virtual network identifier. */
55 uint8_t reserved2; /**< Reserved. */
56 uint32_t opts[]; /**< Variable length options. */
59 /* GENEVE ETH next protocol types */
60 #define RTE_GENEVE_TYPE_ETH 0x6558 /**< Ethernet Protocol. */
66 #endif /* RTE_GENEVE_H_ */