From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>,
dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>,
David Marchand <david.marchand@redhat.com>,
stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v2] net/failsafe: fix source port ID in Rx packets
Date: Thu, 18 Apr 2019 17:51:54 +0200 [thread overview]
Message-ID: <20190418155154.e65prl6i4wjoe7af@bidouze.vm.6wind.com> (raw)
Message-ID: <20190418155154.DYKenIwwlvczbxr3RG3-A5oqewUfV9x0tLiREq4vX9M@z> (raw)
In-Reply-To: <8815526.EAVJVpUmGC@xps>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 2674 bytes --]
On Thu, Apr 18, 2019 at 05:39:37PM +0200, Thomas Monjalon wrote:
> 18/04/2019 17:32, Adrien Mazarguil:
> > When passed to the application, Rx packets retain the port ID value
> > originally set by slave devices. Unfortunately these IDs have no meaning to
> > applications, which are typically unaware of their existence.
> >
> > This confuses those caring about the source port field in mbufs (m->port)
> > which experience issues ranging from traffic drop to crashes.
> >
> > Fixes: a46f8d584eb8 ("net/failsafe: add fail-safe PMD")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
> > Reviewed-by: David Marchand <david.marchand@redhat.com>
> > Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
> > --
> > v2 changes:
> >
> > Modified "rxq->priv->dev->data->port_id" (v18.11-style) to
> > "rxq->priv->data->port_id" (since v19.05) and checked compilation against
> > master this time.
> >
> > Given the limited scope of that change, reviewed-by/acked-by lines were
> > kept.
> > ---
> > +/*
> > + * Override source port in Rx packets.
> > + *
> > + * Make Rx packets originate from this PMD instance instead of one of its
> > + * slaves. This is mandatory to avoid breaking applications.
>
> "slave" is a wording from bonding.
> In failsafe, it is sub-device, isn't it?
>
Yes, there is however one other comment in failsafe code refering to a
sub-device as a slave.
I'm not really up-to-par with the LSF CoC[1] and whether it is aligned
with the Contributor Covenant also adopted by Linux[2]. I guess you were
only referring to using the proper nomenclature and not this subject,
but I can't pass on an opportunity to out-nitpick :D .
This can be changed on merge as sub-device is more correct. Overall personally
I don't really care either way.
[1]: https://www.linuxfoundation.org/code-of-conduct/
[2]: https://www.kernel.org/doc/html/latest/process/code-of-conduct.html
> > + */
> > +static void
> > +failsafe_rx_set_port(struct rte_mbuf **rx_pkts, uint16_t nb_pkts, uint16_t port)
> > +{
> > + unsigned int i;
> > +
> > + for (i = 0; i != nb_pkts; ++i)
> > + rx_pkts[i]->port = port;
> > +}
> > +
> > uint16_t
> > failsafe_rx_burst(void *queue,
> > struct rte_mbuf **rx_pkts,
> > @@ -87,6 +102,9 @@ failsafe_rx_burst(void *queue,
> > sdev = sdev->next;
> > } while (nb_rx == 0 && sdev != rxq->sdev);
> > rxq->sdev = sdev;
> > + if (nb_rx)
> > + failsafe_rx_set_port(rx_pkts, nb_rx,
> > + rxq->priv->data->port_id);
> > return nb_rx;
> > }
>
> I'm afraid the performance drop to be hard.
> How the port id in mbuf is used exactly? What crash are you seeing?
>
>
--
Gaëtan Rivet
6WIND
next prev parent reply other threads:[~2019-04-18 15:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-18 13:11 [dpdk-dev] [PATCH] " Adrien Mazarguil
2019-04-18 13:11 ` Adrien Mazarguil
2019-04-18 14:06 ` David Marchand
2019-04-18 14:06 ` David Marchand
2019-04-19 8:08 ` Adrien Mazarguil
2019-04-19 8:08 ` Adrien Mazarguil
2019-04-18 14:08 ` Gaëtan Rivet
2019-04-18 14:08 ` Gaëtan Rivet
2019-04-18 14:42 ` Ferruh Yigit
2019-04-18 14:42 ` Ferruh Yigit
2019-04-18 15:08 ` Adrien Mazarguil
2019-04-18 15:08 ` Adrien Mazarguil
2019-04-18 15:32 ` [dpdk-dev] [PATCH v2] " Adrien Mazarguil
2019-04-18 15:32 ` Adrien Mazarguil
2019-04-18 15:39 ` Thomas Monjalon
2019-04-18 15:39 ` Thomas Monjalon
2019-04-18 15:51 ` Thomas Monjalon
2019-04-18 15:51 ` Thomas Monjalon
2019-04-18 16:46 ` Adrien Mazarguil
2019-04-18 16:46 ` Adrien Mazarguil
2019-04-18 16:54 ` Thomas Monjalon
2019-04-18 16:54 ` Thomas Monjalon
2019-04-18 17:09 ` Adrien Mazarguil
2019-04-18 17:09 ` Adrien Mazarguil
2019-04-18 17:43 ` Thomas Monjalon
2019-04-18 17:43 ` Thomas Monjalon
2019-04-18 15:51 ` Gaëtan Rivet [this message]
2019-04-18 15:51 ` Gaëtan Rivet
2019-04-18 17:20 ` [dpdk-dev] [PATCH v3] " Adrien Mazarguil
2019-04-18 17:20 ` Adrien Mazarguil
2019-04-18 18:51 ` Ferruh Yigit
2019-04-18 18:51 ` 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=20190418155154.e65prl6i4wjoe7af@bidouze.vm.6wind.com \
--to=gaetan.rivet@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=stable@dpdk.org \
--cc=thomas@monjalon.net \
/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).