From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 98C3E1041 for ; Tue, 27 Feb 2018 16:25:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Feb 2018 07:25:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,401,1515484800"; d="scan'208";a="20574336" Received: from awalabdu-mobl.ger.corp.intel.com (HELO [163.33.228.165]) ([163.33.228.165]) by fmsmga007.fm.intel.com with ESMTP; 27 Feb 2018 07:25:45 -0800 To: dev@dpdk.org References: <20180226150947.107179-1-xuemingl@mellanox.com> <20180226150947.107179-4-xuemingl@mellanox.com> From: Mohammad Abdul Awal Message-ID: <33cfc1d3-7237-6af8-70fc-ab754546e023@intel.com> Date: Tue, 27 Feb 2018 15:25:44 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180226150947.107179-4-xuemingl@mellanox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH 03/18] ethdev: introduce new tunnel VXLAN-GPE X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Feb 2018 15:25:48 -0000 On 26/02/2018 15:09, Xueming Li wrote: > diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h > index 45daa91..fe02ad8 100644 > --- a/lib/librte_net/rte_ether.h > +++ b/lib/librte_net/rte_ether.h > @@ -310,6 +310,31 @@ struct vxlan_hdr { > /**< VXLAN tunnel header length. */ > > /** > + * VXLAN-GPE protocol header. > + * Contains the 8-bit flag, 8-bit next-protocol, 24-bit VXLAN Network > + * Identifier and Reserved fields (16 bits and 8 bits). > + */ > +struct vxlan_gpe_hdr { > + uint8_t vx_flags; /**< flag (8). */ > + uint8_t reserved[2]; /**< Reserved (16). */ > + uint8_t proto; /**< next-protocol (8). */ > + uint32_t vx_vni; /**< VNI (24) + Reserved (8). */ > +} __attribute__((__packed__)); > + > +/* VXLAN-GPE next protocol types */ > +#define VXLAN_GPE_TYPE_IPv4 1 /**< IPv4 Protocol. */ > +#define VXLAN_GPE_TYPE_IPv6 2 /**< IPv6 Protocol. */ > +#define VXLAN_GPE_TYPE_ETH 3 /**< Ethernet Protocol. */ > +#define VXLAN_GPE_TYPE_NSH 4 /**< NSH Protocol. */ > +#define VXLAN_GPE_TYPE_MPLS 5 /**< MPLS Protocol. */ > +#define VXLAN_GPE_TYPE_GBP 6 /**< GBP Protocol. */ > +#define VXLAN_GPE_TYPE_VBNG 7 /**< vBNG Protocol. */ > + > +#define ETHER_VXLAN_GPE_HLEN (sizeof(struct udp_hdr) + \ > + sizeof(struct vxlan_gpe_hdr)) > +/**< VXLAN-GPE tunnel header length. */ > + > +/** > * Extract VLAN tag information into mbuf > * > * Software version of VLAN stripping Should we define the VXLAN-GPE protocol and related macros in a separate file (say lib/librte_net/rte_vxlan_gpe.h)? I can see that VXLAN header also defined in the rte_ether.h file but we should consider moving that VXLAN definition in a separate header file (rte_vxlan.h) as well. Regards, Awal.