From: Stephen Hemminger <stephen@networkplumber.org>
To: "Loftus, Ciara" <ciara.loftus@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"stable@dpdk.org" <stable@dpdk.org>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Zhang, Qi Z" <qi.z.zhang@intel.com>,
"Burakov, Anatoly" <anatoly.burakov@intel.com>
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary process
Date: Tue, 21 Sep 2021 10:45:24 -0700 [thread overview]
Message-ID: <20210921104524.6cda31b9@hermes.local> (raw)
In-Reply-To: <PH0PR11MB479125538268219C678ECA8B8EA09@PH0PR11MB4791.namprd11.prod.outlook.com>
On Mon, 20 Sep 2021 15:09:36 +0000
"Loftus, Ciara" <ciara.loftus@intel.com> wrote:
> >
> > On Mon, 20 Sep 2021 13:23:57 +0000
> > "Loftus, Ciara" <ciara.loftus@intel.com> wrote:
> >
> > > > -----Original Message-----
> > > > From: dev <dev-bounces@dpdk.org> On Behalf Of Stephen Hemminger
> > > > Sent: Friday 3 September 2021 17:15
> > > > To: dev@dpdk.org
> > > > Cc: Stephen Hemminger <stephen@networkplumber.org>;
> > > > stable@dpdk.org; xiaolong.ye@intel.com
> > > > Subject: [dpdk-dev] [PATCH] net/af_xdp: fix support of secondary
> > process
> > > >
> > > > Doing basic operations like info_get or get_stats was broken
> > > > in af_xdp PMD. The info_get would crash because dev->device
> > > > was NULL in secondary process. Fix this by doing same initialization
> > > > as af_packet and tap devices.
> > > >
> > > > The get_stats would crash because the XDP socket is not open in
> > > > primary process. As a workaround don't query kernel for dropped
> > > > packets when called from secondary process.
> > > >
> > > > Note: this does not address the other bug which is that transmitting
> > > > in secondary process is broken because the send() in tx_kick
> > > > will fail because XDP socket fd is not valid in secondary process.
> > >
> > > Hi Stephen,
> > >
> > > Apologies for the delayed reply, I was on vacation.
> > >
> > > In the Bugzilla report you suggest we:
> > > "mark AF_XDP as broken in with primary/secondary
> > > and return an error in probe in secondary process".
> > > I agree with this suggestion. However with this patch we still permit
> > secondary, and just make sure it doesn't crash for get_stats. Did you change
> > your mind?
> > > Personally, I would prefer to have primary/secondary either working 100%
> > or else not allowed at all by throwing an error during probe. What do you
> > think? Do you have a reason/use case to permit secondary processes despite
> > some features not being available eg. full stats, tx?
> > >
> > > Thanks,
> > > Ciara
> >
> > There are two cases where secondary is useful even if send/receive can't
> > work from secondary process.
> > The pdump and proc-info applications can work with these patches.
> >
> > I am using XDP over pdump as an easy way to get packets into the code for
> > testing.
> >
> > The flag in the documentation doesn't have a "limited" version.
> > If you want, will send another patch to disable secondary support.
>
> Thanks for explaining. Since there are use cases for secondary, even if the functionality is limited, I don't think it should be disabled.
> Since we can't flag it as 'limited' in the feature matrix, could you please add a note about the send/receive limitation in the AF_XDP PMD documentation in a v2? There are already a number of limitations listed, which you can add to.
>
> Thanks,
> Ciara
>
> >
> > Supporting secondary, means adding a mechanism to pass the socket
> > around.
Looking at this in more detail, and my recommendation is:
For 21.11 release (and mark it as Fixes so it gets backported). Have the driver
return -ENOTSUP in secondary process.
For 22.03 add real secondary support using the rte_mp_msg to pass necessary
state to secondary process. Includes socket (and other memory regions?).
The pdump and proc-info cases are only useful for developer testing, and there are
other ways to do the same thing.
next prev parent reply other threads:[~2021-09-21 17:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-03 16:15 [dpdk-stable] " Stephen Hemminger
2021-09-15 8:19 ` Ferruh Yigit
2021-09-20 13:23 ` [dpdk-stable] [dpdk-dev] " Loftus, Ciara
2021-09-20 14:43 ` Stephen Hemminger
2021-09-20 15:09 ` Loftus, Ciara
2021-09-21 17:45 ` Stephen Hemminger [this message]
2021-09-23 12:33 ` Loftus, Ciara
2021-10-05 15:02 ` 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=20210921104524.6cda31b9@hermes.local \
--to=stephen@networkplumber.org \
--cc=anatoly.burakov@intel.com \
--cc=ciara.loftus@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--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).