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 8F533B50D for ; Sun, 15 Feb 2015 02:13:58 +0100 (CET) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP; 14 Feb 2015 17:08:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,578,1418112000"; d="scan'208";a="685875809" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga002.jf.intel.com with ESMTP; 14 Feb 2015 17:13:56 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by PGSMSX108.gar.corp.intel.com (10.221.44.103) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 15 Feb 2015 09:13:54 +0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.192]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.46]) with mapi id 14.03.0195.001; Sun, 15 Feb 2015 09:13:53 +0800 From: "Liu, Jijiang" To: Olivier MATZ Thread-Topic: [dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload Thread-Index: AQHQRl1Hgws4xxoqW0igbei+iRh1wJzt0tgAgAMZh5A= Date: Sun, 15 Feb 2015 01:13:53 +0000 Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01DDC678@SHSMSX101.ccr.corp.intel.com> References: <1423701947-17996-1-git-send-email-jijiang.liu@intel.com> <1423701947-17996-5-git-send-email-jijiang.liu@intel.com> <54DDC978.8050606@6wind.com> In-Reply-To: <54DDC978.8050606@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload 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: Sun, 15 Feb 2015 01:13:59 -0000 > -----Original Message----- > From: Olivier MATZ [mailto:olivier.matz@6wind.com] > Sent: Friday, February 13, 2015 5:53 PM > To: Liu, Jijiang; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum > offload >=20 > Hi Jijiang, >=20 >=20 > On 02/12/2015 01:45 AM, Jijiang Liu wrote: > > Enhance csum fwd engine based on current TX checksum framework in order > to test TX Checksum offload for NVGRE packet. > > > > It includes: > > - IPv4 and IPv6 packet > > - outer L3, inner L3 and L4 checksum offload for Tx side. > > > > [...] > > @@ -231,20 +235,25 @@ parse_gre(struct simple_gre_hdr *gre_hdr, struct > testpmd_offload_info *info) > > struct ether_hdr *eth_hdr; > > struct ipv4_hdr *ipv4_hdr; > > struct ipv6_hdr *ipv6_hdr; > > + uint8_t gre_len =3D 0; > > > > - /* if flags !=3D 0; it's not supported */ > > - if (gre_hdr->flags !=3D 0) > > + /* check which fields are supported */ > > + if (gre_hdr->flags !=3D 0 && > > + (gre_hdr->flags & _htons(GRE_SUPPORTED_FIELDS)) =3D=3D 0) > > return; > > > > + gre_len +=3D sizeof(struct simple_gre_hdr); > > + > > + if (gre_hdr->flags & _htons(GRE_KEY_PRESENT)) > > + gre_len +=3D GRE_KEY_LEN; > > + >=20 > I think this test won't work if the flags contains both supported and uns= upported > flags. >=20 > What about this instead: >=20 > if ((gre_hdr->flags & _htons(~GRE_SUPPORTED_FIELDS)) !=3D 0) > return; >=20 That's correct, I will update it in next version. >=20 > Regards, > Olivier