rtnetlink: use for_each_netdev_dump() in rtnl_stats_dump()
authorEric Dumazet <edumazet@google.com>
Thu, 2 May 2024 11:37:48 +0000 (11:37 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 May 2024 22:03:42 +0000 (15:03 -0700)
commit0feb396f7428b95710ea72c1dc33ae363019fae5
tree88f3935a0535f10c5812d8012b29601efd917e6d
parent136c2a9a2a8760d8dae83ae7c882c50be02bdb63
rtnetlink: use for_each_netdev_dump() in rtnl_stats_dump()

Switch rtnl_stats_dump() to use for_each_netdev_dump()
instead of net->dev_index_head[] hash table.

This makes the code much easier to read, and fixes
scalability issues.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240502113748.1622637-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/rtnetlink.c