From: Joe Damato <jdamato@fastly.com>
To: Samiullah Khawaja <skhawaja@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>,
"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 v6] Add support to set napi threaded for individual napi
Date: Wed, 30 Apr 2025 09:53:31 -0700 [thread overview]
Message-ID: <aBJVi0LmwqAtQxv_@LQ3V64L9R2> (raw)
In-Reply-To: <CAAywjhQZDd2rJiF35iyYqMd86zzgDbLVinfEcva0b1=6tne3Pg@mail.gmail.com>
On Tue, Apr 29, 2025 at 06:16:29PM -0700, Samiullah Khawaja wrote:
> On Tue, Apr 29, 2025 at 4:57 PM Joe Damato <jdamato@fastly.com> wrote:
> >
> > On Tue, Apr 29, 2025 at 10:26:56PM +0000, Samiullah Khawaja wrote:
> >
> > > v6:
> > > - Set the threaded property at device level even if the currently set
> > > value is same. This is to override any per napi settings. Update
> > > selftest to verify this scenario.
> > > - Use u8 instead of uint in netdev_nl_napi_set_config implementation.
> > > - Extend the selftest to verify the existing behaviour that the PID
> > > stays valid once threaded napi is enabled. It stays valid even after
> > > disabling the threaded napi. Also verify that the same kthread(PID)
> > > is reused when threaded napi is enabled again. Will keep this
> > > behaviour as based on the discussion on v5.
> >
> > This doesn't address the feedback from Jakub in the v5 [1] [2]:
> >
> > - Jakub said the netlink attributes need to make sense from day 1.
> > Threaded = 0 and pid = 1234 does not make sense, and
> Jakub mentioned following in v5 and that is the existing behaviour:
> ```
> That part I think needs to stay as is, the thread can be started and
> stopped on napi_add / del, IMO.
> ```
> Please see my reply to him in v5 also to confirm this. I also quoted
> the original reason, when this was added, behind not doing
> kthread_stop when unsetting napi threaded.
Here's what [2] says:
We need to handle the case Joe pointed out. The new Netlink attributes
must make sense from day 1. I think it will be cleanest to work on
killing the thread first, but it can be a separate series.
In this v6 as I understand it, it is possible to get:
threaded = 0
pid = 1234
I don't think that makes sense and it goes against my interpretation
of Jakub's message which seemed clear to me that this must be fixed.
If you disagree and think my interpretation of what Jakub said
is off, we can let him weigh in again.
> >
> > - The thread should be started and stopped.
> >
> > [1]: https://lore.kernel.org/netdev/20250425201220.58bf25d7@kernel.org/
> > [2]: https://lore.kernel.org/netdev/20250428112306.62ff198b@kernel.org/
next prev parent reply other threads:[~2025-04-30 16:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 22:26 [PATCH net-next v6] Add support to set napi threaded for individual napi Samiullah Khawaja
2025-04-29 23:57 ` Joe Damato
2025-04-30 1:16 ` Samiullah Khawaja
2025-04-30 16:53 ` Joe Damato [this message]
2025-04-30 17:54 ` Samiullah Khawaja
2025-04-30 18:11 ` Joe Damato
2025-05-03 2:15 ` 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=aBJVi0LmwqAtQxv_@LQ3V64L9R2 \
--to=jdamato@fastly.com \
--cc=almasrymina@google.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=mkarsten@uwaterloo.ca \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhawaja@google.com \
--cc=willemb@google.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).