Re: [PATCH net-next 8/8] netdev: depend on netdev->lock for qstats in ops locked drivers

Joe Damato
2025-04-08T02:37:12Z

On Mon, Apr 07, 2025 at 12:01:17PM -0700, Jakub Kicinski wrote:
> 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.
>
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> ---
> Documentation/networking/netdevices.rst | 6 +++++
> include/net/netdev_queues.h | 4 +++-
> net/core/netdev-genl.c | 29 +++++++++++++++----------
> 3 files changed, 26 insertions(+), 13 deletions(-)

Reviewed-by: Joe Damato <jdamato@fastly.com>