From nobody Fri Apr 26 13:15:52 2024 Delivered-To: wpasupplicant.patchew@gmail.com Received: by 2002:a02:1d48:0:0:0:0:0 with SMTP id 69csp2290162jaj; Mon, 6 Sep 2021 03:08:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+O6uBL1kB9JqKTgHV85hxhhtqzQBxtdZ7Z8GAOjAeNpMfKBqvxLAGoAnu35s/KxVnI4x9 X-Received: by 2002:a17:90a:5583:: with SMTP id c3mr13047074pji.133.1630922930214; Mon, 06 Sep 2021 03:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630922930; cv=none; d=google.com; s=arc-20160816; b=iVKECdg/9e2OsDRlDozqqFqaw7c3diYNZQHJA21n4Rg/t0AncFyloXCyPeum8cqaLd z5/vXOPzRLawHzLJNtTDfGICF8tTlVhSdrIImzObaLjZUEm6ABUVwvujJPj1Tw8RPrQK talriBEsOjAfLtUmTpmDeoLDtoJKmhla7b0J8uuj+IbfGCiPhaNDSHXA5OCvHlUW97mC ed6/47B5irH5oGcHnIkJthTsV9+8lEhtpogmP1LBvV1u8Z5hOEpnQaL78QAvkAr2NqD8 mHkzBdCsTGVdjDlZpHmpGej57B1C6EnH2+eH9PPp/w3GtwH99IShQ7l9vuR/3FUXC69h DEMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=B/kzotHoFNWuvoZ03Sg8OG34D9s6fpEr+W0D+/i+HWI=; b=mhg7tBOv5WxsTtEU6qfs2fVRlMmvjQx0bdYuD6zRKPZjRr1+HhJ/jK3hAElip3Y7rq XiXK1Zoq4xJsZA0TLWIl7KeQ+cx6a5LOiXbt8qNHYFViWvGGkaGeRTtiltr12NfYtW7i YiJqbLpkwdemDM+HQ89VGK/vNEMqRaHGKZH5FdDejx9ZOfWh1m1qJ6kdQoFf+aEUU6GM J9j6pHNKlcfVcUr9c11Q4BaCCI7VkKJE2ZrTo0FxpVKGE0+jpPIt8zD+7SPD6o+m/eOm 5qPBMB5ghQXntAPfOJiQ2lAE1aVYFAZ00EYETTLaEhXkJQJDWXEIGZ0TnD4w1Xk2hGcB a3OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U1H+XufV; spf=pass (google.com: domain of mptcp+bounces-1863-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-1863-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ewr.edge.kernel.org (ewr.edge.kernel.org. [147.75.197.195]) by mx.google.com with ESMTPS id g9si10055802pgj.505.2021.09.06.03.08.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Sep 2021 03:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of mptcp+bounces-1863-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) client-ip=147.75.197.195; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=U1H+XufV; spf=pass (google.com: domain of mptcp+bounces-1863-wpasupplicant.patchew=gmail.com@lists.linux.dev designates 147.75.197.195 as permitted sender) smtp.mailfrom="mptcp+bounces-1863-wpasupplicant.patchew=gmail.com@lists.linux.dev"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ewr.edge.kernel.org (Postfix) with ESMTPS id 564C21C0F20 for ; Mon, 6 Sep 2021 10:08:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2AA72FAF; Mon, 6 Sep 2021 10:08:46 +0000 (UTC) X-Original-To: mptcp@lists.linux.dev Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0DCB3FC1 for ; Mon, 6 Sep 2021 10:08:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1630922924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/kzotHoFNWuvoZ03Sg8OG34D9s6fpEr+W0D+/i+HWI=; b=U1H+XufVE91k0ycrf0snitnojfNUbrqVy0PYhcJWIDrTKnClQ67YBleoiZT/yHBBevmNwQ 1fwk74k3bect0wSBqQIbvP45yBQSHse/EVYPHBqT32gLx7AL45echOb8zrupsBiu+6m1nX ndiXwEq8H1LCWZSuV6I6ajfmSX9PWYw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-324-Jilz5YVVMiukqAK55DciQg-1; Mon, 06 Sep 2021 06:08:41 -0400 X-MC-Unique: Jilz5YVVMiukqAK55DciQg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EA03100A254; Mon, 6 Sep 2021 10:08:40 +0000 (UTC) Received: from gerbillo.redhat.com (unknown [10.39.193.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2332660861; Mon, 6 Sep 2021 10:08:38 +0000 (UTC) From: Paolo Abeni To: mptcp@lists.linux.dev Cc: Matthieu Baerts Subject: [RFC PATCH] selftests: mptcp: tune timeout and delay for simult_flows cases Date: Mon, 6 Sep 2021 12:08:34 +0200 Message-Id: <126a63a07de5709e2702abb5f431f9128146c60a.1630922799.git.pabeni@redhat.com> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pabeni@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" We currently have some instabilities in the simult_flows tests-case. The problem boils down to the unneeded large wait introduced by the tests to allow for the MPJ handshake to complete, which can also introduce a quite relevant variance. Do wait on a single side of the connection, remove the delay at shutdown time and tune the expected test time with the above. Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/137 Signed-off-by: Paolo Abeni --- Side note: the change in mptcp_connect.c may impact negativelly the mp_join self-tests. In my local experiments they are still working reliably, but it would be good have some spins in the slow CI/debug env for more consistency --- .../selftests/net/mptcp/mptcp_connect.c | 1 - .../selftests/net/mptcp/simult_flows.sh | 21 +++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.c b/tools/test= ing/selftests/net/mptcp/mptcp_connect.c index 89c4753c2760..8070e090688d 100644 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.c +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.c @@ -1010,7 +1010,6 @@ static void parse_opts(int argc, char **argv) case 'j': cfg_join =3D true; cfg_mode =3D CFG_MODE_POLL; - cfg_wait =3D 400000; break; case 'r': cfg_remove =3D true; diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/test= ing/selftests/net/mptcp/simult_flows.sh index 910d8126af8f..8af49014a604 100755 --- a/tools/testing/selftests/net/mptcp/simult_flows.sh +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh @@ -51,7 +51,7 @@ setup() sout=3D$(mktemp) cout=3D$(mktemp) capout=3D$(mktemp) - size=3D$((2048 * 4096)) + size=3D$((2048 * 4096 * 4)) dd if=3D/dev/zero of=3D$small bs=3D4096 count=3D20 >/dev/null 2>&1 dd if=3D/dev/zero of=3D$large bs=3D4096 count=3D$((size / 4096)) >/dev/nu= ll 2>&1 =20 @@ -128,7 +128,11 @@ do_transfer() local cin=3D$1 local sin=3D$2 local max_time=3D$3 + local reverse=3D$4 local port + local srv_args=3D"-j" + local cl_args=3D"" + port=3D$((10000+$test_cnt)) test_cnt=3D$((test_cnt+1)) =20 @@ -159,9 +163,14 @@ do_transfer() sleep 1 fi =20 + if [ "$reverse" =3D true ]; then + srv_args=3D"" + cl_args=3D"-j" + fi + timeout ${timeout_test} \ ip netns exec ${ns3} \ - ./mptcp_connect -jt ${timeout_poll} -l -p $port \ + ./mptcp_connect $srv_args -t ${timeout_poll} -l -p $port \ 0.0.0.0 < "$sin" > "$sout" & local spid=3D$! =20 @@ -171,7 +180,7 @@ do_transfer() start=3D$(date +%s%3N) timeout ${timeout_test} \ ip netns exec ${ns1} \ - ./mptcp_connect -jt ${timeout_poll} -p $port \ + ./mptcp_connect $cl_args -t ${timeout_poll} -p $port \ 10.0.3.3 < "$cin" > "$cout" & local cpid=3D$! =20 @@ -244,12 +253,12 @@ run_test() tc -n $ns2 qdisc add dev ns2eth1 root netem rate ${rate1}mbit $delay1 tc -n $ns2 qdisc add dev ns2eth2 root netem rate ${rate2}mbit $delay2 =20 - # time is measure in ms - local time=3D$((size * 8 * 1000 / (( $rate1 + $rate2) * 1024 *1024) )) + # time is measure in ms, account for headers overhead, with DSS+ACK64 pre= sence + local time=3D$((size * 8 * 1000 * 1514 / (( $rate1 + $rate2) * 1024 * 102= 4 * 1424) )) =20 # mptcp_connect will do some sleeps to allow the mp_join handshake # completion - time=3D$((time + 1350)) + time=3D$((time + 350)) =20 printf "%-50s" "$msg" do_transfer $small $large $((time * 11 / 10)) --=20 2.26.3