From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH v2] net/i40e: fix packet type parser issue
Date: Mon, 15 Jan 2018 07:26:50 +0000 [thread overview]
Message-ID: <94479800C636CB44BD422CB454846E013208C830@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <039ED4275CED7440929022BC67E706115312D4B4@SHSMSX103.ccr.corp.intel.com>
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Sunday, January 14, 2018 12:02 PM
> To: Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; stable@dpdk.org
> Subject: RE: [PATCH v2] net/i40e: fix packet type parser issue
>
>
>
> > -----Original Message-----
> > From: Xing, Beilei
> > Sent: Friday, January 12, 2018 4:42 PM
> > To: Zhang, Qi Z <qi.z.zhang@intel.com>
> > Cc: dev@dpdk.org; stable@dpdk.org
> > Subject: [PATCH v2] net/i40e: fix packet type parser issue
> >
> > Ptype mapping table will fail to update when loading PPP profile, fix
> > the issue via modifying metadata and adding check.
> > This patch also adds parser for IPV4FRAG and IPV6FRAG.
> >
> > Fixes: ab2e350c4f4b ("net/i40e: improve packet type parser")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Beilei Xing <beilei.xing@intel.com>
> > ---
> >
> > v2 changes:
> > - Add parser for IPV4FRAG and IPV6FRAG.
> >
> > drivers/net/i40e/i40e_ethdev.c | 44
> > ++++++++++++++++++++++++++---------------
> > drivers/net/i40e/rte_pmd_i40e.c | 6 ++++--
> > 2 files changed, 32 insertions(+), 18 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index d80671a..69704e3 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -11283,43 +11283,55 @@ i40e_update_customized_ptype(struct
> > rte_eth_dev *dev, uint8_t *pkg,
> > continue;
> > memset(name, 0, sizeof(name));
> > strcpy(name, proto[n].name);
> > - if (!strncmp(name, "PPPOE", 5))
> > + if (!strncmp(name, "PPPoE", 5))
> > ptype_mapping[i].sw_ptype |=
> >
> RTE_PTYPE_L2_ETHER_PPPOE;
> > - else if (!strncmp(name, "OIPV4", 5)) {
> > + else if (!strncmp(name, "IPV4FRAG", 8) &&
> > + !in_tunnel) {
> > ptype_mapping[i].sw_ptype |=
> >
> RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
> > - in_tunnel = true;
> > - } else if (!strncmp(name, "IPV4", 4) &&
> > - !in_tunnel)
> > ptype_mapping[i].sw_ptype |=
> > -
> RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
> > - else if (!strncmp(name, "IPV4FRAG", 8) &&
> > - in_tunnel) {
> > + RTE_PTYPE_L4_FRAG;
> > + } else if (!strncmp(name, "IPV4FRAG", 8) &&
> > + in_tunnel) {
> > ptype_mapping[i].sw_ptype |=
> >
> RTE_PTYPE_INNER_L3_IPV4_EXT_UNKNOWN;
> > ptype_mapping[i].sw_ptype |=
> > RTE_PTYPE_INNER_L4_FRAG;
> > } else if (!strncmp(name, "IPV4", 4) &&
> > + !in_tunnel)
> > + ptype_mapping[i].sw_ptype |=
> > +
> RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
> > + else if (!strncmp(name, "OIPV4", 5)) {
> > + ptype_mapping[i].sw_ptype |=
> > +
> RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
> > + in_tunnel = true;
> > + } else if (!strncmp(name, "IPV4", 4) &&
> > in_tunnel)
> Since you are doing some reordering here, it's better to move IPV4 &&
> in_tunnel case above OIPV4, to match IPV4 && !in_tunnel case.
OK, will update in next version, thanks.
next prev parent reply other threads:[~2018-01-15 7:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 10:03 [dpdk-stable] [PATCH v1] " Beilei Xing
2018-01-12 8:41 ` [dpdk-stable] [PATCH v2] " Beilei Xing
2018-01-14 4:02 ` Zhang, Qi Z
2018-01-15 7:26 ` Xing, Beilei [this message]
2018-01-15 13:51 ` [dpdk-stable] [PATCH v3] " Beilei Xing
2018-01-15 23:55 ` Zhang, Qi Z
2018-01-17 14:56 ` Zhang, Helin
2018-01-20 9:45 ` Zhang, Helin
[not found] ` <1516348206-89406-1-git-send-email-beilei.xing@intel.com>
2018-01-19 7:50 ` [dpdk-stable] [PATCH v4 1/3] net/i40e: fix fail to update ptype table Beilei Xing
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=94479800C636CB44BD422CB454846E013208C830@SHSMSX101.ccr.corp.intel.com \
--to=beilei.xing@intel.com \
--cc=dev@dpdk.org \
--cc=qi.z.zhang@intel.com \
--cc=stable@dpdk.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 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).