From: Jakub Kicinski <kuba@kernel.org>
To: Joe Damato <jdamato@fastly.com>
Cc: Stanislav Fomichev <stfomichev@gmail.com>,
netdev@vger.kernel.org, mkarsten@uwaterloo.ca,
skhawaja@google.com, sdf@fomichev.me, bjorn@rivosinc.com,
amritha.nambiar@intel.com, sridhar.samudrala@intel.com,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Jonathan Corbet <corbet@lwn.net>,
Jiri Pirko <jiri@resnulli.us>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Lorenzo Bianconi <lorenzo@kernel.org>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [RFC net-next v2 1/9] net: napi: Add napi_storage
Date: Tue, 10 Sep 2024 07:56:06 -0700 [thread overview]
Message-ID: <20240910075606.565fae97@kernel.org> (raw)
In-Reply-To: <Zt_kJT9jCy1rLLCr@LQ3V64L9R2.homenet.telecomitalia.it>
On Tue, 10 Sep 2024 08:16:05 +0200 Joe Damato wrote:
> > > 2. The two step "takeover" which seemed to imply that we might
> > > pull napi_id into napi_storage? Or maybe I just read that part
> > > wrong?
> >
> > Yes, the suggestion here is to drop patch #2 from your series and
> > keep napi_id as a user facing 'id' for the persistent storage. But,
> > obviously, this requires persistent napi_id(s) that survive device
> > resets.
> >
> > The function that allocates new napi_id is napi_hash_add
> > from netif_napi_add_weight. So we can do either of the following:
> > 1. Keep everything as is, but add the napi_rehash somewhere
> > around napi_enable to 'takeover' previously allocated napi_id.
> > 2. (preferred) Separate napi_hash_add out of netif_napi_add_weight.
> > And have some new napi_hash_with_id(previous_napi_id) to expose it to the
> > userspace. Then convert mlx5 to this new interface.
>
> Jakub is this what you were thinking too?
>
> If this is the case, then the netlink code needs to be tweaked to
> operate on NAPI IDs again (since they are persistent) instead of
> ifindex + napi_storage index?
No strong preference on the driver facing API, TBH, your
netif_napi_add_storage() with some additional 'ifs' in the existing
functions should work.
Also no strong preference on the uAPI, avoiding adding new fields is
a little bit tempting. But if you think NAPI ID won't work or is less
clean - we can stick the index in.
next prev parent reply other threads:[~2024-09-10 14:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-08 16:06 [RFC net-next v2 0/9] Add support for per-NAPI config via netlink Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 1/9] net: napi: Add napi_storage Joe Damato
2024-09-08 20:49 ` Joe Damato
2024-09-09 22:37 ` Stanislav Fomichev
2024-09-10 6:16 ` Joe Damato
2024-09-10 14:56 ` Jakub Kicinski [this message]
2024-09-09 23:40 ` Jakub Kicinski
2024-09-10 6:13 ` Joe Damato
2024-09-10 14:52 ` Jakub Kicinski
2024-09-10 16:10 ` Joe Damato
2024-09-11 0:10 ` Jakub Kicinski
2024-09-11 7:47 ` Joe Damato
2024-09-11 7:51 ` Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 2/9] netdev-genl: Export NAPI index Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 3/9] net: napi: Make napi_defer_hard_irqs per-NAPI Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 4/9] netdev-genl: Dump napi_defer_hard_irqs Joe Damato
2024-09-08 20:36 ` Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 5/9] net: napi: Make gro_flush_timeout per-NAPI Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 6/9] netdev-genl: Support setting per-NAPI config values Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 7/9] bnxt: Add support for napi storage Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 8/9] mlx5: " Joe Damato
2024-09-08 16:06 ` [RFC net-next v2 9/9] mlx4: Add support for napi storage to RX CQs Joe Damato
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=20240910075606.565fae97@kernel.org \
--to=kuba@kernel.org \
--cc=amritha.nambiar@intel.com \
--cc=bigeasy@linutronix.de \
--cc=bjorn@rivosinc.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jdamato@fastly.com \
--cc=jiri@resnulli.us \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=mkarsten@uwaterloo.ca \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=skhawaja@google.com \
--cc=sridhar.samudrala@intel.com \
--cc=stfomichev@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).