This is a note to let you know that I've just added the patch titled selftests: forwarding: tc_flower: Relax success criterion to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: selftests-forwarding-tc_flower-relax-success-criterion.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 9ee37e53e7687654b487fc94e82569377272a7a8 Mon Sep 17 00:00:00 2001 From: Ido Schimmel <idosch@xxxxxxxxxx> Date: Tue, 8 Aug 2023 17:14:58 +0300 Subject: selftests: forwarding: tc_flower: Relax success criterion From: Ido Schimmel <idosch@xxxxxxxxxx> commit 9ee37e53e7687654b487fc94e82569377272a7a8 upstream. The test checks that filters that match on source or destination MAC were only hit once. A host can send more than one packet with a given source or destination MAC, resulting in failures. Fix by relaxing the success criterion and instead check that the filters were not hit zero times. Using tc_check_at_least_x_packets() is also an option, but it is not available in older kernels. Fixes: 07e5c75184a1 ("selftests: forwarding: Introduce tc flower matching tests") Reported-by: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx> Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@xxxxxxxxxxxx/ Signed-off-by: Ido Schimmel <idosch@xxxxxxxxxx> Reviewed-by: Petr Machata <petrm@xxxxxxxxxx> Tested-by: Mirsad Todorovac <mirsad.todorovac@xxxxxxxxxxxx> Reviewed-by: Hangbin Liu <liuhangbin@xxxxxxxxx> Acked-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20230808141503.4060661-13-idosch@xxxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- tools/testing/selftests/net/forwarding/tc_flower.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/tools/testing/selftests/net/forwarding/tc_flower.sh +++ b/tools/testing/selftests/net/forwarding/tc_flower.sh @@ -52,8 +52,8 @@ match_dst_mac_test() tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" - tc_check_packets "dev $h2 ingress" 102 1 - check_err $? "Did not match on correct filter" + tc_check_packets "dev $h2 ingress" 102 0 + check_fail $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower @@ -78,8 +78,8 @@ match_src_mac_test() tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" - tc_check_packets "dev $h2 ingress" 102 1 - check_err $? "Did not match on correct filter" + tc_check_packets "dev $h2 ingress" 102 0 + check_fail $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower Patches currently in stable-queue which might be from idosch@xxxxxxxxxx are queue-5.15/selftests-forwarding-ethtool-skip-when-using-veth-pairs.patch queue-5.15/selftests-forwarding-skip-test-when-no-interfaces-are-specified.patch queue-5.15/selftests-forwarding-tc_flower-relax-success-criterion.patch queue-5.15/vlan-fix-vlan-0-memory-leak.patch queue-5.15/bonding-fix-incorrect-deletion-of-eth_p_8021ad-protocol-vid-from-slaves.patch queue-5.15/selftests-forwarding-ethtool_extended_state-skip-when-using-veth-pairs.patch queue-5.15/selftests-forwarding-add-a-helper-to-skip-test-when-using-veth-pairs.patch queue-5.15/selftests-forwarding-switch-off-timeout.patch