From: Joe Damato <jdamato@fastly.com>
To: netdev@vger.kernel.org
Cc: gerhard@engleder-embedded.com, jasowang@redhat.com,
leiyang@redhat.com, mkarsten@uwaterloo.ca,
"Joe Damato" <jdamato@fastly.com>,
"Alexander Lobakin" <aleksander.lobakin@intel.com>,
"Alexei Starovoitov" <ast@kernel.org>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
bpf@vger.kernel.org (open list:XDP (eXpress Data
Path):Keyword:(?:b|_)xdp(?:b|_)),
"Daniel Borkmann" <daniel@iogearbox.net>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Jesper Dangaard Brouer" <hawk@kernel.org>,
"John Fastabend" <john.fastabend@gmail.com>,
linux-kernel@vger.kernel.org (open list),
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
"Simon Horman" <horms@kernel.org>,
virtualization@lists.linux.dev (open list:VIRTIO CORE AND NET
DRIVERS), "Xuan Zhuo" <xuanzhuo@linux.alibaba.com>
Subject: [PATCH net-next v2 0/4] virtio_net: Link queues to NAPIs
Date: Thu, 16 Jan 2025 05:52:55 +0000 [thread overview]
Message-ID: <20250116055302.14308-1-jdamato@fastly.com> (raw)
Greetings:
Welcome to v2.
Recently [1], Jakub mentioned that there were a few drivers that are not
yet mapping queues to NAPIs.
While I don't have any of the other hardware mentioned, I do happen to
have a virtio_net laying around ;)
I've attempted to link queues to NAPIs, using the new locking Jakub
introduced avoiding RTNL.
Note: It seems virtio_net uses TX-only NAPIs which do not have NAPI IDs.
As such, I've left the TX NAPIs unset (as opposed to setting them to 0).
Note: I tried to handle the XDP case correctly (namely XDP queues should
not have NAPIs registered, but AF_XDP/XSK should have NAPIs registered,
IIUC). I would appreciate reviewers familiar with virtio_net double
checking me on that.
See the commit message of patch 3 for an example of how to get the NAPI
to queue mapping information.
See the commit message of patch 4 for an example of how NAPI IDs are
persistent despite queue count changes.
Thanks,
Joe
[1]: https://lore.kernel.org/netdev/20250109084301.2445a3e3@kernel.org/
v2:
- patch 1:
- New in the v2 from Jakub.
- patch 2:
- Previously patch 1, unchanged from v1.
- Added Gerhard Engleder's Reviewed-by.
- Added Lei Yang's Tested-by.
- patch 3:
- Introduced virtnet_napi_disable to eliminate duplicated code
in virtnet_xdp_set, virtnet_rx_pause, virtnet_disable_queue_pair,
refill_work as suggested by Jason Wang.
- As a result of the above refactor, dropped Reviewed-by and
Tested-by from patch 3.
- patch 4:
- New in v2. Adds persistent NAPI configuration. See commit message
for more details.
Jakub Kicinski (1):
net: protect queue -> napi linking with netdev_lock()
Joe Damato (3):
virtio_net: Prepare for NAPI to queue mapping
virtio_net: Map NAPIs to queues
virtio_net: Use persistent NAPI config
drivers/net/virtio_net.c | 47 +++++++++++++++++++++++++++++------
include/linux/netdevice.h | 9 +++++--
include/net/netdev_rx_queue.h | 2 +-
net/core/dev.c | 16 +++++++++---
4 files changed, 60 insertions(+), 14 deletions(-)
base-commit: 0b21051a4a6208c721615bb0285a035b416a4383
--
2.25.1
next reply other threads:[~2025-01-16 5:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-16 5:52 Joe Damato [this message]
2025-01-16 5:52 ` [PATCH net-next v2 2/4] virtio_net: Prepare for NAPI to queue mapping Joe Damato
2025-01-16 5:52 ` [PATCH net-next v2 3/4] virtio_net: Map NAPIs to queues Joe Damato
2025-01-16 7:53 ` Xuan Zhuo
2025-01-16 16:09 ` Joe Damato
2025-01-16 20:28 ` Gerhard Engleder
2025-01-21 17:57 ` Joe Damato
2025-01-20 1:58 ` Jason Wang
2025-01-21 17:55 ` Joe Damato
2025-01-16 5:52 ` [PATCH net-next v2 4/4] virtio_net: Use persistent NAPI config Joe Damato
2025-01-16 7:56 ` Xuan Zhuo
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=20250116055302.14308-1-jdamato@fastly.com \
--to=jdamato@fastly.com \
--cc=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bigeasy@linutronix.de \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=gerhard@engleder-embedded.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=jasowang@redhat.com \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=leiyang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=mkarsten@uwaterloo.ca \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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