From: Olivier MATZ <olivier.matz@6wind.com>
To: Jijiang Liu <jijiang.liu@intel.com>, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload
Date: Fri, 13 Feb 2015 10:52:56 +0100 [thread overview]
Message-ID: <54DDC978.8050606@6wind.com> (raw)
In-Reply-To: <1423701947-17996-5-git-send-email-jijiang.liu@intel.com>
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;
Regards,
Olivier
next prev parent reply other threads:[~2015-02-13 9:53 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 [this message]
2015-02-15 1:13 ` Liu, Jijiang
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=54DDC978.8050606@6wind.com \
--to=olivier.matz@6wind.com \
--cc=dev@dpdk.org \
--cc=jijiang.liu@intel.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).