vlan: use xarray iterator to implement /proc/net/vlan/config
authorEric Dumazet <edumazet@google.com>
Sun, 11 Feb 2024 21:44:03 +0000 (21:44 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 14 Feb 2024 02:34:49 +0000 (18:34 -0800)
commitf383ced24d6ae6c1989394d052d3109b9d645f11
tree420e4b730cc9b88315e650fdf804c0a81892c2b0
parentbed90b06b6812d9c8c848414b090ddf38f0e6cc1
vlan: use xarray iterator to implement /proc/net/vlan/config

Adopt net->dev_by_index as I did in commit 0e0939c0adf9
("net-procfs: use xarray iterator to implement /proc/net/dev")

Not only this removes quadratic behavior, it also makes sure
an existing vlan device is always visible in the dump,
regardless of concurrent net->dev_base_head changes.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240211214404.1882191-2-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/8021q/vlanproc.c