]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 17 Mar 2021 18:39:46 +0000 (13:39 -0500)
commitb02a1be6e2100aca7c3574dac5cb9cae2bf412a4
tree4757120499fa85ede713f745712c4b4e03979845
parent2ad9526ff5c108a336abdfab43565a3d6e340a8c
selftests: forwarding: Fix race condition in mirror installation

BugLink: https://bugs.launchpad.net/bugs/1919492
commit edcbf5137f093b5502f5f6b97cce3cbadbde27aa upstream.

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: b5b029399fa6d ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh