[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250311144026.4154277-1-sdf@fomichev.me>
Date: Tue, 11 Mar 2025 07:40:23 -0700
From: Stanislav Fomichev <sdf@...ichev.me>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
linux-kernel@...r.kernel.org,
donald.hunter@...il.com,
horms@...nel.org,
michael.chan@...adcom.com,
pavan.chebbi@...adcom.com,
andrew+netdev@...n.ch,
jdamato@...tly.com,
xuanzhuo@...ux.alibaba.com,
sdf@...ichev.me,
almasrymina@...gle.com,
asml.silence@...il.com,
dw@...idwei.uk
Subject: [PATCH net-next v2 0/3] net: remove rtnl_lock from the callers of queue APIs
All drivers that use queue management APIs already depend on the netdev
lock. Ultimately, we want to have most of the paths that work with
specific netdev to be rtnl_lock-free (ethtool mostly in particular).
Queue API currently has a much smaller API surface, so start with
rtnl_lock from it:
- add mutex to each dmabuf binding (to replace rtnl_lock)
- move netdev lock management to the callers of netdev_rx_queue_restart
and drop rtnl_lock
v2:
- drop "net: protect net_devmem_dmabuf_bindings by new
net_devmem_bindings_mutex" (Jakub)
- add missing mutex_unlock (Jakub)
- undo rtnl_lock removal from netdev_nl_queue_get_doit and
netdev_nl_queue_get_dumpit, needs more care to grab
either or but no both rtnl_lock/ops_lock (Jakub)
Cc: Mina Almasry <almasrymina@...gle.com>
Stanislav Fomichev (3):
net: create netdev_nl_sock to wrap bindings list
net: add granular lock for the netdev netlink socket
net: drop rtnl_lock for queue_mgmt operations
Documentation/netlink/specs/netdev.yaml | 4 +--
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +--
drivers/net/netdevsim/netdev.c | 4 +--
include/net/netdev_netlink.h | 12 +++++++
net/core/devmem.c | 4 +--
net/core/netdev-genl-gen.c | 4 +--
net/core/netdev-genl-gen.h | 6 ++--
net/core/netdev-genl.c | 38 +++++++++++++----------
net/core/netdev_rx_queue.c | 16 ++++------
9 files changed, 52 insertions(+), 40 deletions(-)
create mode 100644 include/net/netdev_netlink.h
--
2.48.1
Powered by blists - more mailing lists