[dpdk-dev,1/6] librte_ether:add NVGRE header
Commit Message
Add NVGRE header and Transparent Ethernet Bridging Macro in rte_ether.h file.
Signed-off-by: Jijiang Liu <jijiang.liu@intel.com>
---
lib/librte_ether/rte_ether.h | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
@@ -321,6 +321,17 @@ struct vxlan_hdr {
uint32_t vx_vni; /**< VNI (24) + Reserved (8). */
} __attribute__((__packed__));
+/**
+ * NVGRE protocol header.
+ * Contains the 16-bit flag, 16-bit protocol type, 24-bit Virtual
+ * Subnet ID, 8-bit FlowId.
+ */
+struct nvgre_hdr {
+ uint16_t flags; /**< Protocol flag. */
+ uint16_t prot_type; /**< Protocol type. */
+ uint32_t key; /**< VSID (24) + FlowID (8). */
+} __attribute__((__packed__));
+
/* Ethernet frame types */
#define ETHER_TYPE_IPv4 0x0800 /**< IPv4 Protocol. */
#define ETHER_TYPE_IPv6 0x86DD /**< IPv6 Protocol. */
@@ -329,6 +340,7 @@ struct vxlan_hdr {
#define ETHER_TYPE_VLAN 0x8100 /**< IEEE 802.1Q VLAN tagging. */
#define ETHER_TYPE_1588 0x88F7 /**< IEEE 802.1AS 1588 Precise Time Protocol. */
#define ETHER_TYPE_SLOW 0x8809 /**< Slow protocols (LACP and Marker). */
+#define ETHER_TYPE_TEB 0x6558 /**< Transparent Ethernet Bridging. */
#define ETHER_VXLAN_HLEN (sizeof(struct udp_hdr) + sizeof(struct vxlan_hdr))
/**< VXLAN tunnel header length. */