selftests: mlxsw: Fix mausezahn invocation in ERSPAN scale test
authorPetr Machata <petrm@nvidia.com>
Fri, 23 Apr 2021 12:19:48 +0000 (14:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Apr 2021 21:01:28 +0000 (14:01 -0700)
commit1233898ab758cbcf5f6fea10b8dd16a0b2c24fab
tree1008bcda2cee73d8e683d4bb971acf5f67e82718
parentdda7f4fa55839baeb72ae040aeaf9ccf89d3e416
selftests: mlxsw: Fix mausezahn invocation in ERSPAN scale test

The mirror_gre_scale test creates as many ERSPAN sessions as the underlying
chip supports, and tests that they all work. In order to determine that it
issues a stream of ICMP packets and checks if they are mirrored as
expected.

However, the mausezahn invocation missed the -6 flag to identify the use of
IPv6 protocol, and was sending ICMP messages over IPv6, as opposed to
ICMP6. It also didn't pass an explicit source IP address, which apparently
worked at some point in the past, but does not anymore.

To fix these issues, extend the function mirror_test() in mirror_lib by
detecting the IPv6 protocol addresses, and using a different ICMP scheme.
Fix __mirror_gre_test() in the selftest itself to pass a source IP address.

Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh
tools/testing/selftests/net/forwarding/mirror_lib.sh