From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 5E99F5A96 for ; Mon, 26 Jan 2015 04:43:36 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 25 Jan 2015 19:43:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="445037539" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 25 Jan 2015 19:29:57 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t0Q3hVvU026169; Mon, 26 Jan 2015 11:43:31 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t0Q3hTT8010948; Mon, 26 Jan 2015 11:43:31 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t0Q3hSam010944; Mon, 26 Jan 2015 11:43:28 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Mon, 26 Jan 2015 11:43:20 +0800 Message-Id: <1422243805-10906-2-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1422243805-10906-1-git-send-email-jijiang.liu@intel.com> References: <1422243805-10906-1-git-send-email-jijiang.liu@intel.com> Subject: [dpdk-dev] [PATCH 1/6] librte_ether:add NVGRE header X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 03:43:36 -0000 Add NVGRE header and Transparent Ethernet Bridging Macro in rte_ether.h file. Signed-off-by: Jijiang Liu --- lib/librte_ether/rte_ether.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/lib/librte_ether/rte_ether.h b/lib/librte_ether/rte_ether.h index 7e7d22c..cb36212 100644 --- a/lib/librte_ether/rte_ether.h +++ b/lib/librte_ether/rte_ether.h @@ -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. */ -- 1.7.7.6