]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/net: test tcp connection load balancing
authorWillem de Bruijn <willemb@google.com>
Thu, 24 Apr 2025 14:35:20 +0000 (10:35 -0400)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 29 Apr 2025 14:22:25 +0000 (16:22 +0200)
commit4d0dac499bf384fe3f42acc30906d304c3499dd8
treeeec501b193abac993fc2d0bab85372fd5e118c60
parent65e9024643c7512ade3aedbb341e11d77ed7abc2
selftests/net: test tcp connection load balancing

Verify that TCP connections use both routes when connecting multiple
times to a remote service over a two nexthop multipath route.

Use socat to create the connections. Use tc prio + tc filter to
count routes taken, counting SYN packets across the two egress
devices. Also verify that the saddr matches that of the device.

To avoid flaky tests when testing inherently randomized behavior,
set a low bar and pass if even a single SYN is observed on each
device.

Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://patch.msgid.link/20250424143549.669426-4-willemdebruijn.kernel@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
tools/testing/selftests/net/fib_tests.sh
tools/testing/selftests/net/lib.sh