From: Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
To: Jijiang Liu <jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [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-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
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:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 0:45 [PATCH v2 0/4] Support NVGRE on i40e Jijiang Liu
[not found] ` <1423701947-17996-1-git-send-email-jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-12 0:45 ` [PATCH v2 1/4] librte_ether:add an ETHER_TYPE_TEB macro Jijiang Liu
2015-02-12 0:45 ` [PATCH v2 2/4] i40e:support RX tunnel filter for NVGRE packet Jijiang Liu
2015-02-12 0:45 ` [PATCH v2 3/4] app/testpmd:test " Jijiang Liu
[not found] ` <1423701947-17996-4-git-send-email-jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-13 1:23 ` Wu, Jingjing
[not found] ` <9BB6961774997848B5B42BEC655768F8BA72B3-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-13 1:27 ` Liu, Jijiang
2015-02-12 0:45 ` [PATCH v2 4/4] app/testpmd:test NVGRE Tx checksum offload Jijiang Liu
[not found] ` <1423701947-17996-5-git-send-email-jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-13 9:52 ` Olivier MATZ [this message]
[not found] ` <54DDC978.8050606-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2015-02-15 1:13 ` Liu, Jijiang
2015-02-20 17:01 ` [PATCH v3 0/4] Support NVGRE on i40e Declan Doherty
[not found] ` <1424451707-12342-1-git-send-email-declan.doherty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-20 17:01 ` [PATCH v3 1/4] librte_ether:add an ETHER_TYPE_TEB macro Declan Doherty
[not found] ` <1424451707-12342-2-git-send-email-declan.doherty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-20 17:01 ` [PATCH v3 2/4] i40e:support RX tunnel filter for NVGRE packet Declan Doherty
[not found] ` <1424451707-12342-3-git-send-email-declan.doherty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-20 17:01 ` [PATCH v3 3/4] app/testpmd:test " Declan Doherty
[not found] ` <1424451707-12342-4-git-send-email-declan.doherty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2015-02-20 17:01 ` [PATCH v3 4/4] app/testpmd:test NVGRE Tx checksum offload Declan Doherty
2015-02-23 15:42 ` [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-pdr9zngts4eavxtiumwx3w@public.gmane.org \
--cc=dev-VfR2kkLFssw@public.gmane.org \
--cc=jijiang.liu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.