From: "He, Shaopeng" <shaopeng.he@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] fm10k: fix wrong VLAN value in RX mbuf
Date: Fri, 20 Nov 2015 02:54:49 +0000 [thread overview]
Message-ID: <FB82FCC69332B84596FE0CEC3C131094B44500@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <20151119092547.2ffb056c@xeon-e3>
Hi, Stephen
> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Friday, November 20, 2015 1:26 AM
> To: He, Shaopeng
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] fm10k: fix wrong VLAN value in RX mbuf
>
> On Wed, 18 Nov 2015 16:50:09 +0800
> Shaopeng He <shaopeng.he@intel.com> wrote:
>
> > VLAN value should be copied from RX descriptor to mbuf, this patch
> > fixes this issue.
> >
> > Signed-off-by: Shaopeng He <shaopeng.he@intel.com>
> > ---
> > drivers/net/fm10k/fm10k_rxtx.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/fm10k/fm10k_rxtx.c
> > b/drivers/net/fm10k/fm10k_rxtx.c index 1bac28d..eeb635e 100644
> > --- a/drivers/net/fm10k/fm10k_rxtx.c
> > +++ b/drivers/net/fm10k/fm10k_rxtx.c
> > @@ -146,6 +146,7 @@ fm10k_recv_pkts(void *rx_queue, struct rte_mbuf
> > **rx_pkts, #endif
> >
> > mbuf->hash.rss = desc.d.rss;
> > + mbuf->vlan_tci = desc.w.vlan &
> FM10K_RXD_VLAN_ID_MASK;
> >
> > rx_pkts[count] = mbuf;
> > if (++next_dd == q->nb_desc) {
> > @@ -292,6 +293,7 @@ fm10k_recv_scattered_pkts(void *rx_queue, struct
> rte_mbuf **rx_pkts,
> > rx_desc_to_ol_flags(first_seg, &desc); #endif
> > first_seg->hash.rss = desc.d.rss;
> > + first_seg->vlan_tci = desc.w.vlan &
> FM10K_RXD_VLAN_ID_MASK;
> >
> > /* Prefetch data of first segment, if configured to do so. */
> > rte_packet_prefetch((char *)first_seg->buf_addr +
>
> Good catch, this bug means VLAN's would not work right now.
> But I think it isn't quite right.
Actually, VLAN filter works well, only the vlan_tci in mbuf has wrong value.
And because not much places use the vlan_tci, this bug was not
found before.
>
> By masking the VLAN you are losing the received priority bits.
> Other drivers like ixgbe preserve the priority bits.
Yes, you are right, in next version, I will preserve the priority bits like others.
Thanks,
--Shaopeng
next prev parent reply other threads:[~2015-11-20 2:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-18 8:50 Shaopeng He
2015-11-19 7:05 ` Chen, Jing D
2015-11-20 2:33 ` He, Shaopeng
2015-11-19 17:25 ` Stephen Hemminger
2015-11-20 2:54 ` He, Shaopeng [this message]
2015-11-20 6:28 ` [dpdk-dev] [PATCH v2] " Shaopeng He
2015-11-20 10:35 ` Chen, Jing D
2015-11-20 14:23 ` He, Shaopeng
2015-11-20 14:09 ` [dpdk-dev] [PATCH v3] " Shaopeng He
2015-11-20 16:35 ` Stephen Hemminger
2015-11-24 10:28 ` 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=FB82FCC69332B84596FE0CEC3C131094B44500@shsmsx102.ccr.corp.intel.com \
--to=shaopeng.he@intel.com \
--cc=dev@dpdk.org \
--cc=stephen@networkplumber.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).