diff options
| author | Petr Machata <petrm@nvidia.com> | 2021-01-28 15:49:24 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-29 07:49:54 +0300 |
| commit | 0bccf8ed8aa6ecdd12cd2b3b0a73ff2c4c88d62b (patch) | |
| tree | ae579078e80caa64d4dc0b3b2a58478ec7d39ec9 /tools/perf/scripts/python/futex-contention.py | |
| parent | e948217d258f35b248578f7b400d6df23ac562da (diff) | |
| download | linux-0bccf8ed8aa6ecdd12cd2b3b0a73ff2c4c88d62b.tar.xz | |
nexthop: Extract a helper for validation of get/del RTNL requests
Validation of messages for get / del of a next hop is the same as will be
validation of messages for get of a resilient next hop group bucket. The
difference is that policy for resilient next hop group buckets is a
superset of that used for next-hop get.
It is therefore possible to reuse the code that validates the nhmsg fields,
extracts the next-hop ID, and validates that. To that end, extract from
nh_valid_get_del_req() a helper __nh_valid_get_del_req() that does just
that.
Make the nlh argument const so that the function can be called from the
dump context, which only has a const nlh. Propagate the constness to
nh_valid_get_del_req().
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>
Diffstat (limited to 'tools/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions
