selftests: forwarding: Make {, ip6}gre-inner-v6-multipath tests more robust
authorIdo Schimmel <idosch@nvidia.com>
Mon, 4 Mar 2024 09:56:12 +0000 (11:56 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 5 Mar 2024 17:18:17 +0000 (09:18 -0800)
commit35df2ce896dc098554152db063aff1b52e09457a
treeb9df8d834f611f798c1b8b30df9c1cd2ab3eadac
parentf0008b04977a741b2fb9c5e220120f82a0e50aa8
selftests: forwarding: Make {, ip6}gre-inner-v6-multipath tests more robust

These tests generate various IPv6 flows, encapsulate them in GRE packets
and check that the encapsulated packets are distributed between the
available nexthops according to the configured weights.

Unlike the corresponding IPv4 tests, these tests sometimes fail in the
netdev CI because of large discrepancies between the expected and
measured ratios [1]. This can be explained by the fact that the IPv4
tests generate about 3,600 different flows whereas the IPv6 tests only
generate about 784 different flows (potentially by mistake).

Fix by aligning the IPv6 tests to the IPv4 ones and increase the number
of generated flows.

[1]
 [...]
 # TEST: ping                                                          [ OK ]
 # INFO: Running IPv6 over GRE over IPv4 multipath tests
 # TEST: ECMP                                                          [FAIL]
 # Too large discrepancy between expected and measured ratios
 # INFO: Expected ratio 1.00 Measured ratio 1.18
 [...]

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20240304095612.462900-7-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh
tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh