net: add netdev_lock() / netdev_unlock() helpers
authorJakub Kicinski <kuba@kernel.org>
Wed, 15 Jan 2025 03:53:09 +0000 (19:53 -0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Jan 2025 03:13:33 +0000 (19:13 -0800)
commitebda2f0bbde540ff7da168d2837f8cfb14581e2e
treea6679a8491522b3c1cc29d952ba55d3e96d9a29d
parent0b6f6593aa8c3a05f155c12fd0e7ad33a5149c31
net: add netdev_lock() / netdev_unlock() helpers

Add helpers for locking the netdev instance, use it in drivers
and the shaper code. This will make grepping for the lock usage
much easier, as we extend the lock to cover more fields.

Reviewed-by: Joe Damato <jdamato@fastly.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Link: https://patch.msgid.link/20250115035319.559603-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/netdevsim/ethtool.c
include/linux/netdevice.h
net/shaper/shaper.c