]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: forwarding: Fix bridge locked port test flakiness
authorIdo Schimmel <idosch@nvidia.com>
Thu, 8 Feb 2024 15:55:29 +0000 (17:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:26 +0000 (09:51 +0100)
commit0a10b1b183fbb48c63194b3ec7079d13b43df334
tree3c220f4a25d8ccbb526dcb06d74d98cab67ae2c7
parent616fbea9cc364c54ac132b8d1c1d73823776e01c
selftests: forwarding: Fix bridge locked port test flakiness

[ Upstream commit f97f1fcc96908c97a240ff6cb4474e155abfa0d7 ]

The redirection test case fails in the netdev CI on debug kernels
because an FDB entry is learned despite the presence of a tc filter that
redirects incoming traffic [1].

I am unable to reproduce the failure locally, but I can see how it can
happen given that learning is first enabled and only then the ingress tc
filter is configured. On debug kernels the time window between these two
operations is longer compared to regular kernels, allowing random
packets to be transmitted and trigger learning.

Fix by reversing the order and configure the ingress tc filter before
enabling learning.

[1]
[...]
 # TEST: Locked port MAB redirect                                      [FAIL]
 # Locked entry created for redirected traffic

Fixes: 38c43a1ce758 ("selftests: forwarding: Add test case for traffic redirection from a locked port")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20240208155529.1199729-5-idosch@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/forwarding/bridge_locked_port.sh