From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D89BA328D for ; Tue, 22 Oct 2019 07:34:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF3E74C74; Tue, 22 Oct 2019 07:34:07 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 1F332271 for ; Tue, 22 Oct 2019 07:34:05 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Oct 2019 22:34:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,326,1566889200"; d="scan'208";a="203540667" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by FMSMGA003.fm.intel.com with ESMTP; 21 Oct 2019 22:34:04 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 21 Oct 2019 22:34:04 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 21 Oct 2019 22:34:04 -0700 Received: from shsmsx106.ccr.corp.intel.com ([169.254.10.119]) by SHSMSX151.ccr.corp.intel.com ([10.239.6.50]) with mapi id 14.03.0439.000; Tue, 22 Oct 2019 13:34:02 +0800 From: "Xu, Ting" To: Olivier Matz , "Yigit, Ferruh" CC: "dev@dpdk.org" , "Lu, Wenzhuo" , "Wu, Jingjing" , "Iremonger, Bernard" Thread-Topic: [dpdk-dev] [PATCH v4] app/testpmd: enable GTP header parse and Tx checksum offload Thread-Index: AQHVh/HzxVKlG5YvzUmYe1HFR6pwuKdkZVcAgABkFQCAAVoowA== Date: Tue, 22 Oct 2019 05:34:01 +0000 Message-ID: <8C448DD570D7CD459EACDF44AB3869D701926C95@SHSMSX106.ccr.corp.intel.com> References: <20191018160819.24678-1-ting.xu@intel.com> <20191021122913.35281-1-ting.xu@intel.com> <61d640b1-23e9-f4c6-14c2-c7c25a5c8da5@intel.com> <20191021165058.b7haufktbylwvidu@platinum> In-Reply-To: <20191021165058.b7haufktbylwvidu@platinum> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4] app/testpmd: enable GTP header parse and Tx checksum offload 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Ferruh, Olivier, Thanks for your advice. I think I misunderstood the comments in the last co= mmit. This time I move the GTP header definition in the new file rte_gtp.h. Hope = it would be better. Thanks. -----Original Message----- From: Olivier Matz [mailto:olivier.matz@6wind.com]=20 Sent: Tuesday, October 22, 2019 12:51 AM To: Yigit, Ferruh Cc: Xu, Ting ; dev@dpdk.org; Lu, Wenzhuo ; Wu, Jingjing ; Iremonger, Bernard Subject: Re: [dpdk-dev] [PATCH v4] app/testpmd: enable GTP header parse and= Tx checksum offload On Mon, Oct 21, 2019 at 11:52:46AM +0100, Ferruh Yigit wrote: > On 10/21/2019 10:28 AM, Ferruh Yigit wrote: > > On 10/21/2019 1:29 PM, Ting Xu wrote: > >> This patch enables testpmd to forward GTP packet in csum fwd mode. > >> GTP header structure (without optional fields and extension header)=20 > >> and parser function are added. GTPU and GTPC packets are both=20 > >> supported, with respective UDP destination port and GTP message=20 > >> type. > >> > >> Signed-off-by: Ting Xu > >> > >> --- > >> v4: Move GTP header defination to rte_ether.h > >> v3: correct coding style issue. > >> v2: modify commit log > >> depend on patch: lib/mbuf: add GTP tunnel type flag. > >> --- > >> app/test-pmd/csumonly.c | 96 ++++++++++++++++++++++++++++++++++---= - > >> lib/librte_net/rte_ether.h | 23 +++++++++ > >> 2 files changed, 109 insertions(+), 10 deletions(-) > >=20 > > <...> > >=20 > >> --- a/lib/librte_net/rte_ether.h > >> +++ b/lib/librte_net/rte_ether.h > >> @@ -342,6 +342,29 @@ struct rte_vxlan_gpe_hdr { > >> sizeof(struct rte_vxlan_gpe_hdr)) /**< VXLAN-GPE tunnel=20 > >> header length. */ > >> =20 > >> +/** > >> + * Simplified GTP protocol header. > >> + * Contains 8-bit flag, 8-bit message type, > >> + * 16-bit message length, 32-bit TEID. > >> + * No optional fields and next extension header. > >> + */ > >> +struct rte_gtp_hdr { > >> + uint8_t gtp_hdr_info; > >> + uint8_t msg_type; > >> + uint16_t msg_len; > >> + uint32_t teid; > >> +} __attribute__((__packed__)); > >> + > >> +/* GTP header length */ > >> +#define RTE_ETHER_GTP_HLEN \ > >> + (sizeof(struct rte_udp_hdr) + sizeof(struct rte_gtp_hdr)) > >> +/* GTP next protocal type */ > >> +#define RTE_GTP_TYPE_IPV4 0x40 > >> +#define RTE_GTP_TYPE_IPV6 0x60 > >> +/* GTP destination port number */ > >> +#define RTE_GTPC_UDP_PORT 2123 > >> +#define RTE_GTPU_UDP_PORT 2152 > >> + > >> /** > >> * Extract VLAN tag information into mbuf > >> * > >> > >=20 > > lgtm, @Oliver, any comment/objection on GTP part in rte_ether.h? > >=20 >=20 > What about moving the defines to its own header, like rte_gtp? Is=20 > these defines part of the ether? +1 I also think it deserves its own file.