nexthop: Add a callback parameter to rtm_dump_walk_nexthops()
authorPetr Machata <petrm@nvidia.com>
Thu, 28 Jan 2021 12:49:23 +0000 (13:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jan 2021 04:49:53 +0000 (20:49 -0800)
commite948217d258f35b248578f7b400d6df23ac562da
treeec23e963b85d1b2ee3d0cc3caf830cd899821428
parentcbee18071e72b68d63b055655ac96ae97126776e
nexthop: Add a callback parameter to rtm_dump_walk_nexthops()

In order to allow different handling for next-hop tree dumper and for
bucket dumper, parameterize the next-hop tree walker with a callback. Add
rtm_dump_nexthop_cb() with just the bits relevant for next-hop tree
dumping.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/nexthop.c