From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Stephen Hemminger" <stephen@networkplumber.org>
Cc: "David Marchand" <david.marchand@redhat.com>, <dev@dpdk.org>,
<konstantin.v.ananyev@yandex.ru>
Subject: RE: [PATCH] dumpcap: fix mbuf pool ring type
Date: Mon, 6 Nov 2023 22:50:50 +0100 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EFE6@smartserver.smartshare.dk> (raw)
In-Reply-To: <20231106112331.690cc454@hermes.local>
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Monday, 6 November 2023 20.24
>
> On Mon, 2 Oct 2023 10:42:53 +0200
> Morten Brørup <mb@smartsharesystems.com> wrote:
>
> > > Switching to rte_pktmbuf_pool_create() still leaves the user with
> the
> > > possibility to shoot himself in the foot (I was thinking of setting
> > > some --mbuf-pool-ops-name EAL option).
> > >
> > > This application has explicit requirements in terms of concurrent
> > > access (and I don't think the mempool library exposes per driver
> > > capabilities in that regard).
> > > The application was enforcing the use of mempool/ring so far.
> > >
> > > I think it is safer to go with an explicit
> > > rte_pktmbuf_pool_create_by_ops(... "ring_mp_mc").
> > > WDYT?
> >
> > <feature creep>
> > Or perhaps one of "ring_mt_rts" or "ring_mt_hts", if any of those
> mbuf pool drivers are specified on the command line; otherwise fall
> back to "ring_mp_mc".
> >
> > Actually, I prefer Stephen's suggestion of using the default mbuf
> pool driver. The option is there for a reason.
> >
> > However, David is right: We want to prevent the user from using a
> thread-unsafe mempool driver in this use case.
> >
> > And I guess there might be other use cases than this one, where a
> thread-safe mempool driver is required. So adding a generalized
> function to get the "upgraded" (i.e. thread safe) variant of a mempool
> driver would be nice.
> > </feature creep>
>
> If the user overrides the default mbuf pool type, then it will need to
> be thread safe for
> the general case of driver as well (or they are on single cpu).
If they have chosen a thread safe pool type, using the chosen type will work for dumpcap too. I think we all agree on that.
I'm not sure I understand your single-cpu argument, so let me try to paraphrase:
If their application only uses one EAL thread, and they have chosen "ring_sc_sp", dumpcap also work, because mempool accesses are still single-threaded. Is this correctly understood?
Or are you saying that if they want to use dumpcap, they must choose a thread safe pool type for their application (regardless if the application is single-threaded or not)?
>
>
> I think the patch should be applied as is.
next prev parent reply other threads:[~2023-11-06 21:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-04 16:16 Stephen Hemminger
2023-08-05 9:05 ` Morten Brørup
2023-10-02 7:33 ` David Marchand
2023-10-02 8:42 ` Morten Brørup
2023-11-06 19:23 ` Stephen Hemminger
2023-11-06 21:50 ` Morten Brørup [this message]
2023-11-07 2:36 ` Stephen Hemminger
2023-11-07 7:22 ` Morten Brørup
2023-11-07 16:41 ` Stephen Hemminger
2023-11-07 17:38 ` Morten Brørup
2023-11-08 16:50 ` Stephen Hemminger
2023-11-08 17:43 ` Morten Brørup
2023-11-07 17:00 ` Stephen Hemminger
2023-11-06 19:24 ` Stephen Hemminger
2023-11-06 19:34 ` [PATCH v2] " Stephen Hemminger
2023-11-08 17:47 ` [PATCH v3 ] " Stephen Hemminger
2023-11-09 7:21 ` Morten Brørup
2023-11-12 14:05 ` 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=98CBD80474FA8B44BF855DF32C47DC35E9EFE6@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=konstantin.v.ananyev@yandex.ru \
--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).