]> git.baikalelectronics.ru Git - kernel.git/commit
selftests: forwarding: Fix race condition in mirror installation
authorDanielle Ratson <danieller@nvidia.com>
Thu, 25 Feb 2021 16:57:19 +0000 (18:57 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Feb 2021 23:47:52 +0000 (15:47 -0800)
commit95d3a92eaefcec9b03eed021ca91ed608632fff9
tree9436fba77baa9db56478ad916de7f6daeea3d2bb
parent467312aad82e7b1174c58095fd7a62137f4fe68c
selftests: forwarding: Fix race condition in mirror installation

When mirroring to a gretap in hardware the device expects to be
programmed with the egress port and all the encapsulating headers. This
requires the driver to resolve the path the packet will take in the
software data path and program the device accordingly.

If the path cannot be resolved (in this case because of an unresolved
neighbor), then mirror installation fails until the path is resolved.
This results in a race that causes the test to sometimes fail.

Fix this by setting the neighbor's state to permanent, so that it is
always valid.

Fixes: 130fcc62970c9 ("selftests: forwarding: mirror_gre_bridge_1d_vlan: Add STP test")
Signed-off-by: Danielle Ratson <danieller@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh