netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] net: remove rtnl_lock from the callers of queue APIs
@ 2025-03-11 14:40 Stanislav Fomichev
  2025-03-11 14:40 ` [PATCH net-next v2 1/3] net: create netdev_nl_sock to wrap bindings list Stanislav Fomichev
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Stanislav Fomichev @ 2025-03-11 14:40 UTC (permalink / raw)
  To: netdev
  Cc: davem, edumazet, kuba, pabeni, linux-kernel, donald.hunter, horms,
	michael.chan, pavan.chebbi, andrew+netdev, jdamato, xuanzhuo, sdf,
	almasrymina, asml.silence, dw

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@google.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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-03-12 20:49 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-11 14:40 [PATCH net-next v2 0/3] net: remove rtnl_lock from the callers of queue APIs Stanislav Fomichev
2025-03-11 14:40 ` [PATCH net-next v2 1/3] net: create netdev_nl_sock to wrap bindings list Stanislav Fomichev
2025-03-11 15:24   ` Mina Almasry
2025-03-11 14:40 ` [PATCH net-next v2 2/3] net: add granular lock for the netdev netlink socket Stanislav Fomichev
2025-03-11 15:30   ` Mina Almasry
2025-03-11 20:03     ` Stanislav Fomichev
2025-03-11 23:43       ` Mina Almasry
2025-03-11 14:40 ` [PATCH net-next v2 3/3] net: drop rtnl_lock for queue_mgmt operations Stanislav Fomichev
2025-03-11 15:52   ` Mina Almasry
2025-03-12 20:50 ` [PATCH net-next v2 0/3] net: remove rtnl_lock from the callers of queue APIs patchwork-bot+netdevbpf

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).