]> git.ipfire.org Git - thirdparty/linux.git/commit
inet: use xa_array iterator to implement inet_netconf_dump_devconf()
authorEric Dumazet <edumazet@google.com>
Tue, 27 Feb 2024 09:24:11 +0000 (09:24 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 29 Feb 2024 03:36:40 +0000 (19:36 -0800)
commit167487070d644a285ed863516c80b3c35ec929d6
treedf97cdf2c48cada009cc49dbb434c923a202f068
parentbbcf91053bb622c4c26a9bfc998d3b0c59227f10
inet: use xa_array iterator to implement inet_netconf_dump_devconf()

1) inet_netconf_dump_devconf() can run under RCU protection
   instead of RTNL.

2) properly return 0 at the end of a dump, avoiding an
   an extra recvmsg() system call.

3) Do not use inet_base_seq() anymore, for_each_netdev_dump()
   has nice properties. Restarting a GETDEVCONF dump if a device has
   been added/removed or if net->ipv4.dev_addr_genid has changed is moot.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/20240227092411.2315725-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/devinet.c