]> www.infradead.org Git - users/jedix/linux-maple.git/commit
netdev: depend on netdev->lock for qstats in ops locked drivers
authorJakub Kicinski <kuba@kernel.org>
Tue, 8 Apr 2025 19:59:55 +0000 (12:59 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 10 Apr 2025 00:01:52 +0000 (17:01 -0700)
commitce7b14947484e6190372f2c3dbfb69aafbc4c0fc
tree92629aa80020f1a3c58f50e897987cc12c6c070b
parent87eba404f2e1785d410b51a31ff030932194e1c6
netdev: depend on netdev->lock for qstats in ops locked drivers

We mostly needed rtnl_lock in qstat to make sure the queue count
is stable while we work. For "ops locked" drivers the instance
lock protects the queue count, so we don't have to take rtnl_lock.

For currently ops-locked drivers: netdevsim and bnxt need
the protection from netdev going down while we dump, which
instance lock provides. gve doesn't care.

Reviewed-by: Joe Damato <jdamato@fastly.com>
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
Link: https://patch.msgid.link/20250408195956.412733-9-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Documentation/networking/netdevices.rst
include/net/netdev_queues.h
net/core/netdev-genl.c