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 05461A48A for ; Tue, 17 Apr 2018 17:13:45 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2018 08:12:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,464,1517904000"; d="scan'208";a="34043042" Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23]) by orsmga007.jf.intel.com with ESMTP; 17 Apr 2018 08:12:01 -0700 Received: from irsmsx111.ger.corp.intel.com (10.108.20.4) by IRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 17 Apr 2018 16:12:00 +0100 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.155]) by irsmsx111.ger.corp.intel.com ([169.254.2.167]) with mapi id 14.03.0319.002; Tue, 17 Apr 2018 16:12:00 +0100 From: "Iremonger, Bernard" To: Xueming Li , "Lu, Wenzhuo" , "Wu, Jingjing" , Thomas Monjalon , Adrien Mazarguil CC: Nelio Laranjeiro , Shahaf Shuler , "dev@dpdk.org" , Olivier Matz Thread-Topic: [dpdk-dev] [PATCH v4 5/5] app/testpmd: add more GRE extension support to csum engine Thread-Index: AQHT0xcfo0iIqthpBEqE9CkV8EXHrqQFFnhg Date: Tue, 17 Apr 2018 15:12:00 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C24E0AEB1D@IRSMSX108.ger.corp.intel.com> References: <20180226150947.107179-2-xuemingl@mellanox.com> <20180413110218.105894-6-xuemingl@mellanox.com> In-Reply-To: <20180413110218.105894-6-xuemingl@mellanox.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMmQ4YWU2NjAtYTNlNi00NTAwLThkZjItZGY2NTE0YzFkMDEyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiI3RnQ2dTdhOWpcL0JJTHUyZkVLZnJMUWpiV0tPeEMrOHhVUXRPVnNKQkVweExheTEwcmNKVGZNS0E4WDhOTHJuayJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 5/5] app/testpmd: add more GRE extension support to csum engine 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, 17 Apr 2018 15:13:46 -0000 Hi Li, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xueming Li > Sent: Friday, April 13, 2018 12:02 PM > To: Lu, Wenzhuo ; Wu, Jingjing > ; Thomas Monjalon ; Adrien > Mazarguil > Cc: Xueming Li ; Nelio Laranjeiro > ; Shahaf Shuler ; > dev@dpdk.org; Olivier Matz > Subject: [dpdk-dev] [PATCH v4 5/5] app/testpmd: add more GRE extension > support to csum engine >=20 > This patch adds GRE checksum and sequence extension supports in addtion t= o > key extension to csum forwarding engine. >=20 > Signed-off-by: Xueming Li > --- > app/test-pmd/csumonly.c | 20 ++++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) >=20 > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index > 285709872..53b98412a 100644 > --- a/app/test-pmd/csumonly.c > +++ b/app/test-pmd/csumonly.c > @@ -49,9 +49,12 @@ > #define IP_HDRLEN 0x05 /* default IP header length =3D=3D five 32-bits = words. */ > #define IP_VHL_DEF (IP_VERSION | IP_HDRLEN) >=20 > -#define GRE_KEY_PRESENT 0x2000 > -#define GRE_KEY_LEN 4 > -#define GRE_SUPPORTED_FIELDS GRE_KEY_PRESENT > +#define GRE_CHECKSUM_PRESENT 0x8000 > +#define GRE_KEY_PRESENT 0x2000 > +#define GRE_SEQUENCE_PRESENT 0x1000 > +#define GRE_EXT_LEN 4 > +#define GRE_SUPPORTED_FIELDS (GRE_CHECKSUM_PRESENT | > GRE_KEY_PRESENT |\ > + GRE_SEQUENCE_PRESENT) >=20 > /* We cannot use rte_cpu_to_be_16() on a constant in a switch/case */ #= if > RTE_BYTE_ORDER =3D=3D RTE_LITTLE_ENDIAN @@ -269,14 +272,14 @@ > parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *in= fo) > struct ipv6_hdr *ipv6_hdr; > uint8_t gre_len =3D 0; >=20 > - /* check which fields are supported */ > - if ((gre_hdr->flags & _htons(~GRE_SUPPORTED_FIELDS)) !=3D 0) > - return; > - > gre_len +=3D sizeof(struct simple_gre_hdr); >=20 > if (gre_hdr->flags & _htons(GRE_KEY_PRESENT)) > - gre_len +=3D GRE_KEY_LEN; > + gre_len +=3D GRE_EXT_LEN; > + if (gre_hdr->flags & _htons(GRE_SEQUENCE_PRESENT)) > + gre_len +=3D GRE_EXT_LEN; > + if (gre_hdr->flags & _htons(GRE_CHECKSUM_PRESENT)) > + gre_len +=3D GRE_EXT_LEN; >=20 > if (gre_hdr->proto =3D=3D _htons(ETHER_TYPE_IPv4)) { > info->is_tunnel =3D 1; > @@ -815,6 +818,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) >=20 > /* step 3: fill the mbuf meta data (flags and header lengths) */ >=20 > + m->tx_offload =3D 0; > if (info.is_tunnel =3D=3D 1) { > if (info.tunnel_tso_segsz || > (tx_offloads & > -- > 2.13.3 This patch fails to apply to the current master branch. Regards, Bernard.