]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
selftests: forwarding: Add a test for NH group stats
authorPetr Machata <petrm@nvidia.com>
Fri, 8 Mar 2024 12:59:55 +0000 (13:59 +0100)
committerJakub Kicinski <kuba@kernel.org>
Mon, 11 Mar 2024 21:14:10 +0000 (14:14 -0700)
commita22b042660ca1d695cc225401c72b3fb393acd49
tree9138e0b99192bdfe1134a0fa003b4bd32d6fcfe5
parent44c2fbebe18aa2452cf8a3dbef4f38850d42b564
selftests: forwarding: Add a test for NH group stats

Add to lib.sh support for fetching NH stats, and a new library,
router_mpath_nh_lib.sh, with the common code for testing NH stats.
Use the latter from router_mpath_nh.sh and router_mpath_nh_res.sh.

The test works by sending traffic through a NH group, and checking that the
reported values correspond to what the link that ultimately receives the
traffic reports having seen.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Link: https://lore.kernel.org/r/2a424c54062a5f1efd13b9ec5b2b0e29c6af2574.1709901020.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/Makefile
tools/testing/selftests/net/forwarding/lib.sh
tools/testing/selftests/net/forwarding/router_mpath_nh.sh
tools/testing/selftests/net/forwarding/router_mpath_nh_lib.sh [new file with mode: 0644]
tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh