]> git.itanic.dy.fi Git - linux-stable/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)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Feb 2024 19:32:14 +0000 (11:32 -0800)
commitf97f1fcc96908c97a240ff6cb4474e155abfa0d7
treec17c8329f6e8ee777f8a2bae5b0ca8edc2b64e61
parentdd6b34589441f2ad4698dd88a664811550148b41
selftests: forwarding: Fix bridge locked port test flakiness

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>
tools/testing/selftests/net/forwarding/bridge_locked_port.sh