From: Olivier Matz <olivier.matz@6wind.com>
To: Ajit Khaparde <ajit.khaparde@broadcom.com>
Cc: dev@dpdk.org, Somnath Kotur <somnath.kotur@broadcom.com>,
dpdk stable <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/bnxt: fix packet type
Date: Wed, 7 Feb 2018 22:56:29 +0100 [thread overview]
Message-ID: <20180207215629.iuob3danxgqaauks@neon> (raw)
In-Reply-To: <CACZ4nhts2krWb8fVQqh_RMM30TyVN38-d=agrNPQYepOMMy-Jw@mail.gmail.com>
Hi,
On Tue, Feb 06, 2018 at 03:23:34PM -0800, Ajit Khaparde wrote:
> On Tue, Feb 6, 2018 at 9:07 AM, Olivier Matz <olivier.matz@6wind.com> wrote:
>
> > The hw flags are not read correctly: the defines
> > RX_PKT_CMPL_FLAGS_ITYPE_* are not bits but values, so the should not be
> > tested with if (value & X) but with if ((value & MASK) == X).
> > This was resulting in a wrong packet type.
> >
> > For instance, an IPv4/ICMP packet was returning a value of 7 for
> > the layer 4, which is undefined.
> >
> > This patch rework the way packet types are processed, to ensure
> > that only valid packet types will be advertised.
> >
> > Fixes: 3d2a6644eb05 ("net/bnxt: support getting ptypes")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> >
> Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
>
[...]
> > + case RTE_LE32(RX_PKT_CMPL_FLAGS_ITYPE_UDP):
> > + if (!t_ipcs)
> > + pkt_type |= l3 | RTE_PTYPE_L4_UDP;
> > + else
> > + pkt_type |= l3 | RTE_PTYPE_INNER_L4_UDP;
> > + break;
> > +
> > + case RTE_LE32(RX_PKT_CMPL_FLAGS_ITYPE_IP):
> > + if (!t_ipcs)
> > + pkt_type |= l3 | RTE_PTYPE_L4_ICMP;
> > + else
> > + pkt_type |= l3 | RTE_PTYPE_INNER_L4_ICMP;
> > + break;
> > + }
Sorry, it looks there is a typo here: it should be pkt_type |= l3
(not ICMP). I'll send a new version.
next prev parent reply other threads:[~2018-02-07 21:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-06 17:07 Olivier Matz
2018-02-06 23:23 ` Ajit Khaparde
2018-02-07 21:56 ` Olivier Matz [this message]
2018-02-08 8:24 ` [dpdk-stable] [PATCH v2] " Olivier Matz
2018-02-08 13:30 ` Ferruh Yigit
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=20180207215629.iuob3danxgqaauks@neon \
--to=olivier.matz@6wind.com \
--cc=ajit.khaparde@broadcom.com \
--cc=dev@dpdk.org \
--cc=somnath.kotur@broadcom.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).