nexthop: Extract a common helper for parsing dump attributes
authorPetr Machata <petrm@nvidia.com>
Thu, 28 Jan 2021 12:49:20 +0000 (13:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jan 2021 04:49:53 +0000 (20:49 -0800)
commitb9ebea127661e8982c03065d99422dbf0f73e4d1
treed6f7ddf65e5e2f6ecd4999fa94b04e120e9e1dfd
parent56450ec6b7fc2824d6402fc3a60bff1a6fe32c04
nexthop: Extract a common helper for parsing dump attributes

Requests to dump nexthops have many attributes in common with those that
requests to dump buckets of resilient NH groups will have. However, they
have different policies. To allow reuse of this code, extract a
policy-agnostic wrapper out of nh_valid_dump_req(), and convert this
function into a thin wrapper around it.

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