From patchwork Mon Jul 27 23:47:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Paasch X-Patchwork-Id: 1337426 X-Patchwork-Delegate: matthieu.baerts@tessares.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.01.org (client-ip=198.145.21.10; helo=ml01.01.org; envelope-from=mptcp-bounces@lists.01.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=apple.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=apple.com header.i=@apple.com header.a=rsa-sha256 header.s=20180706 header.b=NWaMswJd; dkim-atps=neutral Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BFxML24jWz9sSn for ; Tue, 28 Jul 2020 09:48:14 +1000 (AEST) Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id AF91C1243C653; Mon, 27 Jul 2020 16:48:11 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=17.171.2.68; helo=ma1-aaemail-dr-lapp02.apple.com; envelope-from=cpaasch@apple.com; receiver= Received: from ma1-aaemail-dr-lapp02.apple.com (ma1-aaemail-dr-lapp02.apple.com [17.171.2.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1CE8F1243A5ED for ; Mon, 27 Jul 2020 16:48:09 -0700 (PDT) Received: from pps.filterd (ma1-aaemail-dr-lapp02.apple.com [127.0.0.1]) by ma1-aaemail-dr-lapp02.apple.com (8.16.0.42/8.16.0.42) with SMTP id 06RNlaHU001636 for ; Mon, 27 Jul 2020 16:48:08 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=apple.com; h=from : to : subject : date : message-id : mime-version : content-transfer-encoding; s=20180706; bh=rmcoG2eO1oJaRAtSUO/ug26t8EU5qO7AU+E6tPUB2IU=; b=NWaMswJdBodrwcvtzGf5j7bvpkax1z9XaoXN8qZmmwaKJkGqh+ejlLUDBREEplHrelhE HdFz6AReS59vpNqxOyHxXt4Yb9dagh/lWlcC4Em5FzQ5DkXU+DZ1lUbxD362CYfHZNZf /BeWnUivldP4pXjrEdGxnXAZgWLp9dGhRFy65OTfN5i3s7M1NO31PyjX7VDCQlXwmNQ8 3htSV0nsXlCjXO44MeKkR6WBt9JXS2vafRJU8MoNm15MyycEsRwbRyzFo2atMD/mGJEz 4YJ9mA4AwsEeDKBxIEHMMT537GFLjV6b+SW46PVurr3fdZ7Wr32tN8qsuo1+gYYP+QbQ wA== Received: from rn-mailsvcp-mta-lapp01.rno.apple.com (rn-mailsvcp-mta-lapp01.rno.apple.com [10.225.203.149]) by ma1-aaemail-dr-lapp02.apple.com with ESMTP id 32ghdrxuy8-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Mon, 27 Jul 2020 16:48:08 -0700 Received: from rn-mailsvcp-mmp-lapp01.rno.apple.com (rn-mailsvcp-mmp-lapp01.rno.apple.com [17.179.253.14]) by rn-mailsvcp-mta-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.5.20200312 64bit (built Mar 12 2020)) with ESMTPS id <0QE50024FJG6XT30@rn-mailsvcp-mta-lapp01.rno.apple.com> for mptcp@lists.01.org; Mon, 27 Jul 2020 16:48:06 -0700 (PDT) Received: from process_milters-daemon.rn-mailsvcp-mmp-lapp01.rno.apple.com by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.5.20200312 64bit (built Mar 12 2020)) id <0QE500900J6P6J00@rn-mailsvcp-mmp-lapp01.rno.apple.com> for mptcp@lists.01.org; Mon, 27 Jul 2020 16:48:06 -0700 (PDT) X-Va-A: X-Va-T-CD: 413c2fa81464e44ffa7e7faeadd0138a X-Va-E-CD: 6f9a2a2960004aa43dc6a6c28465ebf5 X-Va-R-CD: 91508d145851153cf56313892626280b X-Va-CD: 0 X-Va-ID: 690a104b-ea4c-4edc-a788-0820fde2cfaa X-V-A: X-V-T-CD: 413c2fa81464e44ffa7e7faeadd0138a X-V-E-CD: 6f9a2a2960004aa43dc6a6c28465ebf5 X-V-R-CD: 91508d145851153cf56313892626280b X-V-CD: 0 X-V-ID: ee5acb9b-b264-436e-bf4f-6570a92d2024 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-27_15:2020-07-27,2020-07-27 signatures=0 Received: from localhost ([17.234.118.104]) by rn-mailsvcp-mmp-lapp01.rno.apple.com (Oracle Communications Messaging Server 8.1.0.5.20200312 64bit (built Mar 12 2020)) with ESMTPSA id <0QE500C1BJG53H10@rn-mailsvcp-mmp-lapp01.rno.apple.com> for mptcp@lists.01.org; Mon, 27 Jul 2020 16:48:06 -0700 (PDT) From: Christoph Paasch To: mptcp@lists.01.org Date: Mon, 27 Jul 2020 16:47:59 -0700 Message-id: <20200727234759.25705-1-cpaasch@apple.com> X-Mailer: git-send-email 2.23.0 MIME-version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235,18.0.687 definitions=2020-07-27_15:2020-07-27,2020-07-27 signatures=0 Message-ID-Hash: 6GV53XC52XT43FGHMTKTXERXAQ6M44NL X-Message-ID-Hash: 6GV53XC52XT43FGHMTKTXERXAQ6M44NL X-MailFrom: cpaasch@apple.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.1.1 Precedence: list Subject: [MPTCP] [PATCH mptcp-next] selftests/mptcp: Better delay & reordering configuration List-Id: Discussions regarding MPTCP upstreaming Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The delay was intended to be configured to "simulate" a high(er) BDP link. As such, it needs to be set as part of the loss-configuration and not as part of the netem reordering configuration. The reordering-config also requires a delay but that delay is the reordering-extend. So, a good approach is to set the reordering-extend as a function of the configured latency. E.g., 25% of the overall latency. Finally, the intention of tc_reorder was that when it is unset, the test picks a random configuration. However, currently it is always initialized and thus the random config won't be picked up. Github-issue: https://github.com/multipath-tcp/mptcp_net-next/issues/6 Signed-off-by: Christoph Paasch --- Notes: Admittedly, two changes here in this patch (delay-fix and unitializing tc_reorder). If you want, I can split them but I thought that's overkill for a selftest-patch. tools/testing/selftests/net/mptcp/mptcp_connect.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_connect.sh b/tools/testing/selftests/net/mptcp/mptcp_connect.sh index 6260520674d0..d29d189d1ae5 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_connect.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_connect.sh @@ -16,7 +16,6 @@ ipv6=true ethtool_random_on=true tc_delay="$((RANDOM%400))" tc_loss=$((RANDOM%101)) -tc_reorder="" testmode="" sndbuf=0 rcvbuf=0 @@ -631,22 +630,24 @@ for sender in "$ns1" "$ns2" "$ns3" "$ns4";do do_ping "$ns4" $sender dead:beef:3::1 done -[ -n "$tc_loss" ] && tc -net "$ns2" qdisc add dev ns2eth3 root netem loss random $tc_loss +[ -n "$tc_loss" ] && tc -net "$ns2" qdisc add dev ns2eth3 root netem loss random $tc_loss delay ${tc_delay}ms echo -n "INFO: Using loss of $tc_loss " test "$tc_delay" -gt 0 && echo -n "delay $tc_delay ms " +reorder_delay=`expr $tc_delay / 4` + if [ -z "${tc_reorder}" ]; then reorder1=$((RANDOM%10)) reorder1=$((100 - reorder1)) reorder2=$((RANDOM%100)) - if [ $tc_delay -gt 0 ] && [ $reorder1 -lt 100 ] && [ $reorder2 -gt 0 ]; then + if [ $reorder_delay -gt 0 ] && [ $reorder1 -lt 100 ] && [ $reorder2 -gt 0 ]; then tc_reorder="reorder ${reorder1}% ${reorder2}%" echo -n "$tc_reorder " fi elif [ "$tc_reorder" = "0" ];then tc_reorder="" -elif [ "$tc_delay" -gt 0 ];then +elif [ "$reorder_delay" -gt 0 ];then # reordering requires some delay tc_reorder="reorder $tc_reorder" echo -n "$tc_reorder " @@ -654,7 +655,7 @@ fi echo "on ns3eth4" -tc -net "$ns3" qdisc add dev ns3eth4 root netem delay ${tc_delay}ms $tc_reorder +tc -net "$ns3" qdisc add dev ns3eth4 root netem delay ${reorder_delay}ms $tc_reorder for sender in $ns1 $ns2 $ns3 $ns4;do run_tests_lo "$ns1" "$sender" 10.0.1.1 1