From: David Marchand <david.marchand@redhat.com>
To: Antonio Di Bacco <a.dibacco.ks@gmail.com>
Cc: users@dpdk.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: Add more lcores to application after rte_eal_init has been called
Date: Mon, 27 Feb 2023 10:02:21 +0100 [thread overview]
Message-ID: <CAJFAV8y0VQUV7-K3iPJr5jmJKGkXMZagtb1R9WF6fK2Sm1bR=g@mail.gmail.com> (raw)
In-Reply-To: <20230222070359.3e45d6b6@hermes.local>
On Wed, Feb 22, 2023 at 4:05 PM Stephen Hemminger
<stephen@networkplumber.org> wrote:
>
> On Wed, 22 Feb 2023 14:10:20 +0100
> Antonio Di Bacco <a.dibacco.ks@gmail.com> wrote:
>
> > I need to add some more cores to the application after the DPDK has
> > already been initialised.
> > Is it possible?
>
> No
>
> > For other resources like network cards, I managed to probe new cards
> > dynamically but don't understand how I can do the same for new lcores.
>
> You can start with lots of cores, but only use some of them in your
> application. The unused queues could wait on something like pthread_condition
> that is blocking.
>
If you really want to go with a dynamic approach, you could do like
OVS does which is to stop using EAL threads, but have everything in
your applications: create threads + set their cpu affinity + register
them as lcores.
That's the *easy* part.
Then, if you want to go and only configure the exact number of rxq/txq
wrt to your datapath threads, next is that you need to reconfigure the
existing ports when a change happens and you will need to stop your
existing datapath threads from pulling packets before reconfiguring
the ports.
Stephen description is probably the best/least effort.
--
David Marchand
prev parent reply other threads:[~2023-02-27 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 13:10 Antonio Di Bacco
2023-02-22 15:03 ` Stephen Hemminger
2023-02-27 9:02 ` David Marchand [this message]
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='CAJFAV8y0VQUV7-K3iPJr5jmJKGkXMZagtb1R9WF6fK2Sm1bR=g@mail.gmail.com' \
--to=david.marchand@redhat.com \
--cc=a.dibacco.ks@gmail.com \
--cc=stephen@networkplumber.org \
--cc=users@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).