From: Jakub Kicinski <kuba@kernel.org>
To: Joe Damato <jdamato@fastly.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Samiullah Khawaja <skhawaja@google.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
almasrymina@google.com, willemb@google.com,
mkarsten@uwaterloo.ca, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v5] Add support to set napi threaded for individual napi
Date: Fri, 2 May 2025 19:10:11 -0700 [thread overview]
Message-ID: <20250502191011.68ccfdfe@kernel.org> (raw)
In-Reply-To: <aBFrwyxWzLle6B03@LQ3V64L9R2>
On Tue, 29 Apr 2025 17:16:03 -0700 Joe Damato wrote:
> > The way I see it - the traditional permission model doesn't extend
> > in any meaningful way to network settings. All the settings are done
> > by some sort of helper or intermediary which implements its own
> > privilege model.
>
> I agree that is how it is today, but maybe we are misunderstanding
> each other? In my mind, today, the intermediary is something like a
> script that runs a bunch of ethtool commands.
>
> In my mind with the movement of more stuff to core and the existence
> of YNL, it seems like the future is an app uses YNL and is able to
> configure (for example) an RSS context and ntuple rules to steer
> flows to queues it cares about... which in my mind is moving toward
> eliminating the intermediary ?
Yes, AFAIU.
> > My thinking is more that the "global" settings are basically "system"
> > settings. There is a high-perf app running which applied its own
> > settings to its own queues. The remaining queues belong to the "system".
> > Now if you for some reason want to modify the settings of the "system
> > queues" you really don't want to override the app specific settings.
>
> Yea, I see what you are saying, I think.
>
> Can I rephrase it to make sure I'm following?
>
> An app uses YNL to set defer-hard-irqs to 100 for napis 2-4. napis 0
> and 1 belong to the "system."
>
> You are saying that writing to the NIC-wide sysfs path for
> defer-hard-irqs wouldn't affect napis 0 and 1 because they don't
> belong to the system anymore.
>
> Is that right?
Typo - napis 2-4, right? If so - yes, exactly.
> If so... I think that's fairly interesting and maybe it implies a
> tighter coupling of apps to queues than is possible with the API
> that exists today? For example say an app does a bunch of config to
> a few NAPIs and then suddenly crashes. I suppose core would need to
> "know" about this so it can "release" those queues ?
Exactly, Stan also pointed out the config lifetime problem.
My plan was to add the ability to tie the config to a netlink socket.
App dies, socket goes away, clears the config. Same thing as we do for
clean up of DEVMEM bindings. But I don't have full details.
The thing I did add (in the rx-buf-len series) was a hook to the queue
count changing code which wipes the configuration for queues which are
explicitly disabled.
So if you do some random reconfig (eg attach XDP) and driver recreates
all NAPIs - the config should stay around. Same if you do ifdown ifup.
But if you set NAPI count from 8 to 4 - the NAPIs 4..7 should get wiped.
next prev parent reply other threads:[~2025-05-03 2:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 20:14 [PATCH net-next v5] Add support to set napi threaded for individual napi Samiullah Khawaja
2025-04-24 23:13 ` Joe Damato
2025-04-25 18:28 ` Samiullah Khawaja
2025-04-25 22:24 ` Joe Damato
2025-04-25 22:52 ` Samiullah Khawaja
2025-04-26 0:37 ` Jakub Kicinski
2025-04-26 2:34 ` Joe Damato
2025-04-26 2:47 ` Jakub Kicinski
2025-04-26 3:12 ` Jakub Kicinski
2025-04-26 3:53 ` Samiullah Khawaja
2025-04-28 18:23 ` Jakub Kicinski
2025-04-28 19:25 ` Samiullah Khawaja
2025-04-25 23:06 ` Samiullah Khawaja
2025-04-26 0:42 ` Jakub Kicinski
2025-04-26 2:31 ` Joe Damato
2025-04-26 14:41 ` Willem de Bruijn
2025-04-28 18:12 ` Joe Damato
2025-04-28 18:38 ` Jakub Kicinski
2025-04-28 21:29 ` Joe Damato
2025-04-28 22:32 ` Jakub Kicinski
2025-04-30 0:16 ` Joe Damato
2025-05-03 2:10 ` Jakub Kicinski [this message]
2025-05-03 3:04 ` Joe Damato
2025-05-05 18:56 ` Jakub Kicinski
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=20250502191011.68ccfdfe@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=mkarsten@uwaterloo.ca \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhawaja@google.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@gmail.com \
/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).