Merge branch 'net-depend-on-instance-lock-for-queue-related-netlink-ops'
authorJakub Kicinski <kuba@kernel.org>
Thu, 10 Apr 2025 00:01:54 +0000 (17:01 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Apr 2025 00:01:55 +0000 (17:01 -0700)
commitf8cb38c32eb1ba14f82226bee1825e67cffe432f
tree92629aa80020f1a3c58f50e897987cc12c6c070b
parent420aabef3ab5fa743afb4d3d391f03ef0e777ca8
parentce7b14947484e6190372f2c3dbfb69aafbc4c0fc
Merge branch 'net-depend-on-instance-lock-for-queue-related-netlink-ops'

Jakub Kicinski says:

====================
net: depend on instance lock for queue related netlink ops

netdev-genl used to be protected by rtnl_lock. In previous release
we already switched the queue management ops (for Rx zero-copy) to
the instance lock. This series converts other ops to depend on the
instance lock when possible.

Unfortunately queue related state is hard to lock (unlike NAPI)
as the process of switching the number of queues usually involves
a large reconfiguration of the driver. The reconfig process has
historically been under rtnl_lock, but for drivers which opt into
ops locking it is also under the instance lock. Leverage that
and conditionally take rtnl_lock or instance lock depending
on the device capabilities.

v1: https://lore.kernel.org/20250407190117.16528-1-kuba@kernel.org
====================

Link: https://patch.msgid.link/20250408195956.412733-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>