]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: mlxsw: vxlan_flooding: Prevent flooding of unwanted packets
authorIdo Schimmel <idosch@nvidia.com>
Tue, 19 Apr 2022 13:51:54 +0000 (16:51 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:38:55 +0000 (14:38 +0200)
commitbadda802a3ea6d1314162dc7062e638d7e1a5666
tree22278a69d92dde1ece2f4c0d38e436c76762f5dd
parentabd902291820c384d01a835f65837081691b0016
selftests: mlxsw: vxlan_flooding: Prevent flooding of unwanted packets

[ Upstream commit 150c4d3e7fefc896c1e910d44840d47ac85e1eba ]

The test verifies that packets are correctly flooded by the bridge and
the VXLAN device by matching on the encapsulated packets at the other
end. However, if packets other than those generated by the test also
ingress the bridge (e.g., MLD packets), they will be flooded as well and
interfere with the expected count.

Make the test more robust by making sure that only the packets generated
by the test can ingress the bridge. Drop all the rest using tc filters
on the egress of 'br0' and 'h1'.

In the software data path, the problem can be solved by matching on the
inner destination MAC or dropping unwanted packets at the egress of the
VXLAN device, but this is not currently supported by mlxsw.

Fixes: b6a626a03318 ("selftests: mlxsw: Add a test for VxLAN flooding")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/drivers/net/mlxsw/vxlan_flooding.sh