DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Liu, Jijiang" <jijiang.liu@intel.com>
To: Olivier MATZ <olivier.matz@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload
Date: Sun, 15 Feb 2015 01:13:53 +0000	[thread overview]
Message-ID: <1ED644BD7E0A5F4091CF203DAFB8E4CC01DDC678@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <54DDC978.8050606@6wind.com>



> -----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
> 
> Hi Jijiang,
> 
> 
> 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 = 0;
> >
> > -	/* if flags != 0; it's not supported */
> > -	if (gre_hdr->flags != 0)
> > +	/* check which fields are supported */
> > +	if (gre_hdr->flags != 0 &&
> > +		(gre_hdr->flags & _htons(GRE_SUPPORTED_FIELDS)) == 0)
> >  		return;
> >
> > +	gre_len += sizeof(struct simple_gre_hdr);
> > +
> > +	if (gre_hdr->flags & _htons(GRE_KEY_PRESENT))
> > +		gre_len += GRE_KEY_LEN;
> > +
> 
> I think this test won't work if the flags contains both supported and unsupported
> flags.
> 
> What about this instead:
> 
> if ((gre_hdr->flags & _htons(~GRE_SUPPORTED_FIELDS)) != 0)
> 	return;
> 
That's correct, I will update it in next version.

> 
> Regards,
> Olivier

  reply	other threads:[~2015-02-15  1:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-12  0:45 [dpdk-dev] [PATCH v2 0/4] Support NVGRE on i40e Jijiang Liu
2015-02-12  0:45 ` [dpdk-dev] [PATCH v2 1/4] librte_ether:add an ETHER_TYPE_TEB macro Jijiang Liu
2015-02-12  0:45 ` [dpdk-dev] [PATCH v2 2/4] i40e:support RX tunnel filter for NVGRE packet Jijiang Liu
2015-02-12  0:45 ` [dpdk-dev] [PATCH v2 3/4] app/testpmd:test " Jijiang Liu
2015-02-13  1:23   ` Wu, Jingjing
2015-02-13  1:27     ` Liu, Jijiang
2015-02-12  0:45 ` [dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload Jijiang Liu
2015-02-13  9:52   ` Olivier MATZ
2015-02-15  1:13     ` Liu, Jijiang [this message]
2015-02-20 17:01 ` [dpdk-dev] [PATCH v3 0/4] Support NVGRE on i40e Declan Doherty
2015-02-20 17:01   ` [dpdk-dev] [PATCH v3 1/4] librte_ether:add an ETHER_TYPE_TEB macro Declan Doherty
2015-02-20 17:01     ` [dpdk-dev] [PATCH v3 2/4] i40e:support RX tunnel filter for NVGRE packet Declan Doherty
2015-02-20 17:01       ` [dpdk-dev] [PATCH v3 3/4] app/testpmd:test " Declan Doherty
2015-02-20 17:01         ` [dpdk-dev] [PATCH v3 4/4] app/testpmd:test NVGRE Tx checksum offload Declan Doherty
2015-02-23 15:42   ` [dpdk-dev] [PATCH v3 0/4] Support NVGRE on i40e Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1ED644BD7E0A5F4091CF203DAFB8E4CC01DDC678@SHSMSX101.ccr.corp.intel.com \
    --to=jijiang.liu@intel.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).