Subject: [PATCH net 0/3] selftests: forwarding: vxlan_bridge_1q_mc_ul: Fix flakiness

From: Petr Machata <[email-masked]>
Date: Tue, 9 Dec 2025 16:29:00 +0100

The net/forwarding/vxlan_bridge_1q_mc_ul selftest runs an overlay traffic,
forwarded over a multicast-routed VXLAN underlay. In order to determine
whether packets reach their intended destination, it uses a TC match. For
convenience, it uses a flower match, which however does not allow matching
on the encapsulated packet. So various service traffic ends up being
indistinguishable from the test packets, and ends up confusing the test. To
alleviate the problem, the test uses sleep to allow the necessary service
traffic to run and clear the channel, before running the test traffic. This
worked for a while, but lately we have nevertheless seen flakiness of the
test in the CI.

In this patchset, first generalize tc_rule_stats_get() to support u32 in
patch #1, then in patch #2 convert the test to use u32 to allow parsing
deeper into the packet, and in #3 drop the now-unnecessary sleep.

Petr Machata (3):
  selftests: net: lib: tc_rule_stats_get(): Don't hard-code array index
  selftests: forwarding: vxlan_bridge_1q_mc_ul: Fix flakiness
  selftests: forwarding: vxlan_bridge_1q_mc_ul: Drop useless sleeping

 tools/testing/selftests/net/forwarding/config |  1 +
 .../net/forwarding/vxlan_bridge_1q_mc_ul.sh   | 76 ++++++++-----------
 tools/testing/selftests/net/lib.sh            |  3 +-
 3 files changed, 34 insertions(+), 46 deletions(-)

-- 
2.51.1