selftests: mptcp: simult_flows: reduce bufferbloat
Subsystems (3)
Matthieu Baerts (NGI0)
maintainercover selftests: mptcp: simult_flows: reduce bufferbloat
Bufferbloat is baaaad, even in our selftests, let's kill it (or at least reduce it). By doing that, the tests (seem to) have a more stable transfer, and are then less unstable. But to be tested on CI sharing its resources!
The last patch is for -next, safer.
---
Matthieu Baerts (NGI0) (3):
selftests: mptcp: simult_flows: disable GSO
selftests: mptcp: simult_flows: adapt limits
selftests: mptcp: simult_flows: disable 'flaky' mark
tools/testing/selftests/net/mptcp/simult_flows.sh | 34 ++++++++++++----------- 1 file changed, 18 insertions(+), 16 deletions(-)
---
base-commit: 1b5f90649a5adc94f765b5dee7fbfec433a5a797
change-id: 20260508-mptcp-sft-sflows-bufferbloat-49122c97440e
Best regards,
Signature · 1 line
Matthieu Baerts (NGI0) <[email protected]>
Matthieu Baerts (NGI0)
maintainerPATCH 1/3 selftests: mptcp: simult_flows: disable GSO
Netem is used to apply a rate limit, and its 'limit' option is per packet.
Disable GSO on both sides to work with packets of a specific size. That increases the number of packets, but stabilise the throughput. As a consequence, limits are more adapted, and the bufferbloat is reduced.
--- tools/testing/selftests/net/mptcp/simult_flows.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tools/testing/selftests/net/mptcp/simult_flows.sh +6 -6
@@ -76,13 +76,13 @@ setup() ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth1 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth1 nodad - ip -net "$ns1" link set ns1eth1 up mtu 1500 + ip -net "$ns1" link set ns1eth1 up mtu 1500 gso_max_segs 0 ip -net "$ns1" route add default via 10.0.1.2 ip -net "$ns1" route add default via dead:beef:1::2 ip -net "$ns1" addr add 10.0.2.1/24 dev ns1eth2 ip -net "$ns1" addr add dead:beef:2::1/64 dev ns1eth2 nodad - ip -net "$ns1" link set ns1eth2 up mtu 1500 + ip -net "$ns1" link set ns1eth2 up mtu 1500 gso_max_segs 0 ip -net "$ns1" route add default via 10.0.2.2 metric 101 ip -net "$ns1" route add default via dead:beef:2::2 metric 101
@@ -91,21 +91,21 @@ setup() ip -net "$ns2" addr add 10.0.1.2/24 dev ns2eth1 ip -net "$ns2" addr add dead:beef:1::2/64 dev ns2eth1 nodad - ip -net "$ns2" link set ns2eth1 up mtu 1500 + ip -net "$ns2" link set ns2eth1 up mtu 1500 gso_max_segs 0 ip -net "$ns2" addr add 10.0.2.2/24 dev ns2eth2 ip -net "$ns2" addr add dead:beef:2::2/64 dev ns2eth2 nodad - ip -net "$ns2" link set ns2eth2 up mtu 1500 + ip -net "$ns2" link set ns2eth2 up mtu 1500 gso_max_segs 0 ip -net "$ns2" addr add 10.0.3.2/24 dev ns2eth3 ip -net "$ns2" addr add dead:beef:3::2/64 dev ns2eth3 nodad - ip -net "$ns2" link set ns2eth3 up mtu 1500 + ip -net "$ns2" link set ns2eth3 up mtu 1500 gso_max_segs 0 ip netns exec "$ns2" sysctl -q net.ipv4.ip_forward=1 ip netns exec "$ns2" sysctl -q net.ipv6.conf.all.forwarding=1 ip -net "$ns3" addr add 10.0.3.3/24 dev ns3eth1 ip -net "$ns3" addr add dead:beef:3::3/64 dev ns3eth1 nodad - ip -net "$ns3" link set ns3eth1 up mtu 1500 + ip -net "$ns3" link set ns3eth1 up mtu 1500 gso_max_segs 0 ip -net "$ns3" route add default via 10.0.3.2 ip -net "$ns3" route add default via dead:beef:3::2
Signature · 1 line
2.53.0
Matthieu Baerts (NGI0)
maintainerPATCH 2/3 selftests: mptcp: simult_flows: adapt limits
In reply to Matthieu Baerts (NGI0)Avoid using a fixed limit, no matter the setup. This was causing too high bufferbloat in some situations, e.g. with a low bandwidth and very low delay because the default limit was too high for this case.
Instead, use more appropriated limits. Note that unbalanced bandwidth modes seem to require slightly higher limits to cope with the different bursts.
--- tools/testing/selftests/net/mptcp/simult_flows.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
tools/testing/selftests/net/mptcp/simult_flows.sh +12 -10
@@ -223,9 +223,11 @@ run_test() local rate2=$2 local delay1=$3 local delay2=$4 + local limit1=$5 + local limit2=$6 local lret local dev - shift 4 + shift 6 local msg=$* [ $delay1 -gt 0 ] && delay1="delay ${delay1}ms" || delay1=""
@@ -240,10 +242,10 @@ run_test() # keep the queued pkts number low, or the RTT estimator will see # increasing latency over time. - tc -n $ns1 qdisc add dev ns1eth1 root netem rate ${rate1}mbit $delay1 limit 50 - tc -n $ns1 qdisc add dev ns1eth2 root netem rate ${rate2}mbit $delay2 limit 50 - tc -n $ns2 qdisc add dev ns2eth1 root netem rate ${rate1}mbit $delay1 limit 50 - tc -n $ns2 qdisc add dev ns2eth2 root netem rate ${rate2}mbit $delay2 limit 50 + tc -n $ns1 qdisc add dev ns1eth1 root netem rate ${rate1}mbit $delay1 limit ${limit1} + tc -n $ns1 qdisc add dev ns1eth2 root netem rate ${rate2}mbit $delay2 limit ${limit2} + tc -n $ns2 qdisc add dev ns2eth1 root netem rate ${rate1}mbit $delay1 limit ${limit1} + tc -n $ns2 qdisc add dev ns2eth2 root netem rate ${rate2}mbit $delay2 limit ${limit2} # time is measured in ms, account for transfer size, aggregated link speed # and header overhead (10%)
@@ -301,13 +303,13 @@ done setup mptcp_lib_subtests_last_ts_reset -run_test 10 10 0 0 "balanced bwidth" -run_test 10 10 1 25 "balanced bwidth with unbalanced delay" +run_test 10 10 0 0 20 20 "balanced bwidth" +run_test 10 10 1 25 20 50 "balanced bwidth with unbalanced delay" # we still need some additional infrastructure to pass the following test-cases -MPTCP_LIB_SUBTEST_FLAKY=1 run_test 10 3 0 0 "unbalanced bwidth" -run_test 10 3 1 25 "unbalanced bwidth with unbalanced delay" -run_test 10 3 25 1 "unbalanced bwidth with opposed, unbalanced delay" +MPTCP_LIB_SUBTEST_FLAKY=1 run_test 10 3 0 0 30 20 "unbalanced bwidth" +run_test 10 3 1 25 40 30 "unbalanced bwidth with unbalanced delay" +run_test 10 3 25 1 50 30 "unbalanced bwidth with opposed, unbalanced delay" mptcp_lib_result_print_all_tap exit $ret
Signature · 1 line
2.53.0
Matthieu Baerts (NGI0)
maintainerPATCH 3/3 selftests: mptcp: simult_flows: disable 'flaky' mark
In reply to Matthieu Baerts (NGI0)Thanks to recent commits removing high bufferbloat in this case, the "unbalanced bwidth" subtest has a more stable transfer.
Thanks to that, it looks like the test is no longer flaky (hopefully).
---
Note: for -next.
--- tools/testing/selftests/net/mptcp/simult_flows.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/net/mptcp/simult_flows.sh +1 -1
@@ -307,7 +307,7 @@ run_test 10 10 0 0 20 20 "balanced bwidth" run_test 10 10 1 25 20 50 "balanced bwidth with unbalanced delay" # we still need some additional infrastructure to pass the following test-cases -MPTCP_LIB_SUBTEST_FLAKY=1 run_test 10 3 0 0 30 20 "unbalanced bwidth" +run_test 10 3 0 0 30 20 "unbalanced bwidth" run_test 10 3 1 25 40 30 "unbalanced bwidth with unbalanced delay" run_test 10 3 25 1 50 30 "unbalanced bwidth with opposed, unbalanced delay"
Signature · 1 line
2.53.0
Matthieu Baerts
maintainerRe: [PATCH mptcp-net 3/3] selftests: mptcp: simult_flows: disable 'flaky' mark
Hello,
Quoted 4 lines · On 08/05/2026 19:54, Matthieu Baerts (NGI0) wrote:
Thanks to recent commits removing high bufferbloat in this case, the "unbalanced bwidth" subtest has a more stable transfer.
Thanks to that, it looks like the test is no longer flaky (hopefully).
Too soon apparently: when validating something else, I managed to have this "unbalanced bwidth" subtest failing again... I then reverted this patch, keeping the flaky mark for the moment:
New patches for t/upstream:
- 584a6166fbf6: Revert "selftests: mptcp: simult_flows: disable 'flaky' mark"
- Results: 0c8a93820ed7..23350e342bf2 (export)
Tests are now in progress:
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.
Hi Matthieu,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 1 failed test(s): packetdrill_mp_capable ⚠️
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/25571380159
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/2bbcbfb2925e
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1091768
If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normalFor more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Hi Matthieu,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Unstable: 1 failed test(s): packetdrill_dss ⚠️
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/25571380159
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/2bbcbfb2925e
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1091768
If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normalFor more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Hi Matthieu,
Thank you for your modifications, that's great!
Our CI did some validations and here is its report:
- KVM Validation: normal (except selftest_mptcp_join): Success! ✅
- KVM Validation: normal (only selftest_mptcp_join): Success! ✅
- KVM Validation: debug (except selftest_mptcp_join): Success! ✅
- KVM Validation: debug (only selftest_mptcp_join): Success! ✅
- KVM Validation: btf-normal (only bpftest_all): Success! ✅
- KVM Validation: btf-debug (only bpftest_all): Success! ✅
- Task: https://github.com/multipath-tcp/mptcp_net-next/actions/runs/25571380159
Initiator: Patchew Applier
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/2bbcbfb2925e
Patchwork: https://patchwork.kernel.org/project/mptcp/list/?series=1091768
If there are some issues, you can reproduce them using the same environment as the one used by the CI thanks to a docker image, e.g.:
$ cd [kernel source code]
$ docker run -v "${PWD}:${PWD}:rw" -w "${PWD}" --privileged --rm -it \
--pull always mptcp/mptcp-upstream-virtme-docker:latest \
auto-normalFor more details:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker
Please note that despite all the efforts that have been already done to have a stable tests suite when executed on a public CI like here, it is possible some reported issues are not due to your modifications. Still, do not hesitate to help us improve that ;-)
Cheers,
MPTCP GH Action bot
Bot operated by Matthieu Baerts (NGI0 Core)
Quoted 14 lines · On Fri, 8 May 2026, Matthieu Baerts (NGI0) wrote:
Bufferbloat is baaaad, even in our selftests, let's kill it (or at least reduce it). By doing that, the tests (seem to) have a more stable transfer, and are then less unstable. But to be tested on CI sharing its resources!
The last patch is for -next, safer.
Signed-off-by Matthieu Baerts (NGI0) <[email protected]>---
Matthieu Baerts (NGI0) (3):
selftests: mptcp:simult_flows: disable GSO
selftests: mptcp:simult_flows: adapt limits
selftests: mptcp:simult_flows: disable 'flaky' mark
Quoted 5 lines
tools/testing/selftests/net/mptcp/simult_flows.sh| 34 ++++++++++++-----------1 file changed, 18 insertions(+), 16 deletions(-)---
base-commit:1b5f90649a5adc94f765b5dee7fbfec433a5a797
change-id: 20260508-mptcp-sft-sflows-bufferbloat-49122c97440e
Hi Matthieu -
Series LGTM, thanks for stabilizing these tests.
Matthieu Baerts
maintainerHi Mat,
Quoted 8 lines · Mat Martineau
Quoted 6 lines · On Fri, 8 May 2026, Matthieu Baerts (NGI0) wrote:
Bufferbloat is baaaad, even in our selftests, let's kill it (or at least reduce it). By doing that, the tests (seem to) have a more stable transfer, and are then less unstable. But to be tested on CI sharing its resources!
The last patch is for -next, safer.
(...)
Quoted 1 line
Series LGTM, thanks for stabilizing these tests.
Thank you for the review! Now in our tree:
New patches for t/upstream-net and t/upstream:
- c63cea58b84b: selftests: mptcp: simult_flows: disable GSO
- 4331d54635fb: selftests: mptcp: simult_flows: adapt limits
- Results: d517676f86ac..412c23275fba (export-net)
- Results: c4353991ae52..a3548004f9ed (export)
Tests are now in progress:
- export-net:
https://github.com/multipath-tcp/mptcp_net-next/commit/d3218264037efc171c3a4f63b4602cb3407ad024/checks
- export:
https://github.com/multipath-tcp/mptcp_net-next/commit/f40e63356649b57b96b78acccc9d42c80220da16/checks
New patches for t/upstream:
- 4845dd70e328: selftests: mptcp: simult_flows: disable 'flaky' mark
- Results: a3548004f9ed..f02cf668b123 (export)
Tests are now in progress:
Cheers,
Matt
Signature · 1 line
Sponsored by the NGI0 Core fund.