From patchwork Mon Mar 4 09:56:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13580328 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2068.outbound.protection.outlook.com [40.107.93.68]) (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 25C13224E8 for ; Mon, 4 Mar 2024 09:57:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546226; cv=fail; b=KvNXHx7x18h4qVoZlQ4Oq45iZKLkwPhgqB0QQNMrsWMtPqQhhedYLOY/eY604+C9TivTzcS/7T8uyY2SSj03KGkxzAPVR76MOXCjlkGWDly3+cexvswvDLU+VjsRWeCbrAuGyULTeIKZ7ejOavWIEbbr2t94FXtcgHQNBIbbdhY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546226; c=relaxed/simple; bh=jg0pz0kyYv2hE1wf2DJfVncZJVjL2aInrBZVi3lN9D0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=huwJPI9aKARt24VugZ/2jO+zMZknW46wUyV+oNRQIthNx4mKPJ6XxJUjG0NiBgMvnrHfR2gWhkC2vRqV4ey2eZeG4ud1zY3vykrcGrFyAAORCgNEo6Ie3MlDUlUeWs6yaUTu4Dd1YNAWtyCxyRb9GRdUaO4VJAzkY0RBZ2ww01s= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=EsfPxXrx; arc=fail smtp.client-ip=40.107.93.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="EsfPxXrx" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xzxsdgdf0gZmO2uAx2ZS4eqef+1M/j+3YKsFKFUmSEriTF8Oexe+BJ58JBvcm/bYdWpaBQqb4H5ICeOkfduVqJunIh3UkKPa457BC/r6dQqH7FySyK4XQgD9nJrMhexdDx0Et3nQbJaZVSjRjVpOCv5oCzBn4NOe8fBgmJAOsWR6yVdAKZs6ETVFV/gUeGnRf1XM8JBY5FrjqhlIQH7SDsLVRRaFKTesPXM4qLRzF4Gh0GI8oSSc/dUuOnW3419mzL2ZBGHFCP96v4XjKQg61P2fRFGkihbWxFo7o6NpkkLcOGppTkdwp+WjmPxA1QE8JDwqFFG/gSrrLM1yFDc3GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=c7scL4UJmnMIs9hbzuXXD4YKrNY3zOYAVSDK2D7IjtQ=; b=GAzxy3aaR4IQMOOijFKkKgdm/MJ8PH3+UmwrysvNg+V4XFzEFZFA4mKqH4bnzrOsThuU0dv9j/CDikgerwu/Pis3KAOYjdKNh/iCVBdTkY16KsJ/opeHA/8VhGEZwp5JODSEfiZMowlvgha/2fqodTgsjiKXx80S3J1/yWzFOnvQZtbL3XF4+HyWupYJSd4fGvaCj0WYtbG28uwTkYXBy1vzixL/kB6cpDQHOtmeo8H1FX+K5adLmBzeHg+98ctFSpKiAciJrd/LZwU0ZL5yII1wuOOFSClOIy6IP4hEGFjmOuDt4pNxnYJbS8QTMBscpIUvIUKI6PGKWN+CXL+Ouw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=c7scL4UJmnMIs9hbzuXXD4YKrNY3zOYAVSDK2D7IjtQ=; b=EsfPxXrxavaHeDPPMO3H7CFS1D1JUx5OWOMjgCr+kr/gLEWPVGvdysPrzN6wk/47YTNiQnHcykbL717WaTqXv+1jf1YigGvyon+tgBGTuvjDkUauZvM3fFmvX2u2BH/MOJOx+S5LZGOuquNw7XNHRoaQljqMWqVdZSmOzFu1kHTYNwVKfK2omylo4/3DZIwwfLFT6N4eeTe1j1jMrjk0eZYD+vfoghr770faHL8bvI+PHYYBMKFzsgO2tjijKysgKf8bWRCY/cm4ddRMhpcs89tuDGSiykV/NgcIQgXFL/+npRqTQDaikMnI4LJB6kdSX1X0HARAFR6IH7ZwC2/NKA== Received: from SJ0PR13CA0182.namprd13.prod.outlook.com (2603:10b6:a03:2c3::7) by DM4PR12MB6304.namprd12.prod.outlook.com (2603:10b6:8:a2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Mon, 4 Mar 2024 09:57:01 +0000 Received: from DS2PEPF0000343A.namprd02.prod.outlook.com (2603:10b6:a03:2c3:cafe::23) by SJ0PR13CA0182.outlook.office365.com (2603:10b6:a03:2c3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.22 via Frontend Transport; Mon, 4 Mar 2024 09:57:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS2PEPF0000343A.mail.protection.outlook.com (10.167.18.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Mon, 4 Mar 2024 09:57:00 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 4 Mar 2024 01:56:46 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 4 Mar 2024 01:56:44 -0800 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 1/6] selftests: forwarding: Remove IPv6 L3 multipath hash tests Date: Mon, 4 Mar 2024 11:56:07 +0200 Message-ID: <20240304095612.462900-2-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304095612.462900-1-idosch@nvidia.com> References: <20240304095612.462900-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF0000343A:EE_|DM4PR12MB6304:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e0e56de-1e45-45e6-1cb8-08dc3c316fca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gj74kgdezcT1RHe3DO6/XtI3fxG1Zh9wNCLPi2lKutFBVQ2DBjSlEUg7GqhJhINE1Z7/Rk3S1LRKztoTc/gQ9TbqfnN33+/uByct5ocOg5EH+ZF0S4XX/PIKls0wYbX6hiWkLzhodFr59BluGEn6FqVxigGdmzBj2jmUBYfebVkVoelkP1W4Ob4G7p5tP/utyhW8Ft7hk+H3fwmRSdjIML0R2eicau9jDcgHd+Ns704g/C5YUe40NFIofNJoTcWyAhHsyeOeJplVOEA+nIdDtg0obb0dQ4WRORtv6yqfYhqANWGrQ/DYl4TE3gRUXuoZIrk44pqHoNaOmyTlZaWEMmF+CeSq0PWpp3TOWKSGt1UGF2lqjpUiLikEcP+1LTIXoYwSNFcBldQFf9b7RqvLBz/ie6VbEkGEsLvObsSEDtAeIZokNPgSjR2TdM/O7AnrLi155LzlsezqVbCwhzYPFUDlp0Z0wwE2igLhFCSbqUD36amCU5OoVjq17yusNsSa4xC+ey/SZUBRgUif/3/NhM2ZDkJODesR6SekveReyjHmC6CJcn+m+kha1SFyZQznE/7o6YWJ2T4txGxFPTzqLxLHzfT8GX5hdG1NPGLeqTaKNLn0mWsfLopjSbPWaep2L9pd9KQJkO7qG61MZivJqy9Qjg1HxA7ls+P6tnLGvlw5b06y+4oC+prCzEbZNCfQNz21I5I1MXaGyTX8xRXrTVT4MGrhazkmukIK5f/z3+agq1qjEtG0ViLWGM1RllNL X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(376005)(82310400014)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 09:57:00.4942 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e0e56de-1e45-45e6-1cb8-08dc3c316fca X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF0000343A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6304 X-Patchwork-Delegate: kuba@kernel.org The multipath tests currently test both the L3 and L4 multipath hash policies for IPv6, but only the L4 policy for IPv4. The reason is mostly historic: When the initial multipath test was added (router_multipath.sh) the IPv6 L4 policy did not exist and was later added to the test. The other multipath tests copied this pattern although there is little value in testing both policies. Align the IPv4 and IPv6 tests and only test the L4 policy. On my system, this reduces the run time of router_multipath.sh by 89% because of the repeated ping6 invocations to randomize the flow label. Signed-off-by: Ido Schimmel --- .../net/forwarding/gre_multipath_nh.sh | 37 ------------------ .../net/forwarding/gre_multipath_nh_res.sh | 38 ------------------ .../net/forwarding/router_mpath_nh.sh | 35 +---------------- .../net/forwarding/router_multipath.sh | 39 +------------------ 4 files changed, 2 insertions(+), 147 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh b/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh index d03aa2cab9fd..62281898e7a4 100755 --- a/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh +++ b/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh @@ -64,7 +64,6 @@ ALL_TESTS=" ping_ipv6 multipath_ipv4 multipath_ipv6 - multipath_ipv6_l4 " NUM_NETIFS=6 @@ -264,34 +263,6 @@ multipath6_test() local weight1=$1; shift local weight2=$1; shift - sysctl_set net.ipv6.fib_multipath_hash_policy 0 - ip nexthop replace id 103 group 101,$weight1/102,$weight2 - - local t0_111=$(tc_rule_stats_get $ul2 111 ingress) - local t0_222=$(tc_rule_stats_get $ul2 222 ingress) - - # Generate 16384 echo requests, each with a random flow label. - for ((i=0; i < 16384; ++i)); do - ip vrf exec v$h1 $PING6 2001:db8:2::2 -F 0 -c 1 -q &> /dev/null - done - - local t1_111=$(tc_rule_stats_get $ul2 111 ingress) - local t1_222=$(tc_rule_stats_get $ul2 222 ingress) - - local d111=$((t1_111 - t0_111)) - local d222=$((t1_222 - t0_222)) - multipath_eval "$what" $weight1 $weight2 $d111 $d222 - - ip nexthop replace id 103 group 101/102 - sysctl_restore net.ipv6.fib_multipath_hash_policy -} - -multipath6_l4_test() -{ - local what=$1; shift - local weight1=$1; shift - local weight2=$1; shift - sysctl_set net.ipv6.fib_multipath_hash_policy 1 ip nexthop replace id 103 group 101,$weight1/102,$weight2 @@ -339,14 +310,6 @@ multipath_ipv6() multipath6_test "Weighted MP 11:45" 11 45 } -multipath_ipv6_l4() -{ - log_info "Running IPv6 L4 hash multipath tests" - multipath6_l4_test "ECMP" 1 1 - multipath6_l4_test "Weighted MP 2:1" 2 1 - multipath6_l4_test "Weighted MP 11:45" 11 45 -} - trap cleanup EXIT setup_prepare diff --git a/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh b/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh index 088b65e64d66..2085111bcd67 100755 --- a/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh +++ b/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh @@ -64,7 +64,6 @@ ALL_TESTS=" ping_ipv6 multipath_ipv4 multipath_ipv6 - multipath_ipv6_l4 " NUM_NETIFS=6 @@ -267,35 +266,6 @@ multipath6_test() local weight1=$1; shift local weight2=$1; shift - sysctl_set net.ipv6.fib_multipath_hash_policy 0 - ip nexthop replace id 103 group 101,$weight1/102,$weight2 \ - type resilient - - local t0_111=$(tc_rule_stats_get $ul2 111 ingress) - local t0_222=$(tc_rule_stats_get $ul2 222 ingress) - - # Generate 16384 echo requests, each with a random flow label. - for ((i=0; i < 16384; ++i)); do - ip vrf exec v$h1 $PING6 2001:db8:2::2 -F 0 -c 1 -q &> /dev/null - done - - local t1_111=$(tc_rule_stats_get $ul2 111 ingress) - local t1_222=$(tc_rule_stats_get $ul2 222 ingress) - - local d111=$((t1_111 - t0_111)) - local d222=$((t1_222 - t0_222)) - multipath_eval "$what" $weight1 $weight2 $d111 $d222 - - ip nexthop replace id 103 group 101/102 type resilient - sysctl_restore net.ipv6.fib_multipath_hash_policy -} - -multipath6_l4_test() -{ - local what=$1; shift - local weight1=$1; shift - local weight2=$1; shift - sysctl_set net.ipv6.fib_multipath_hash_policy 1 ip nexthop replace id 103 group 101,$weight1/102,$weight2 \ type resilient @@ -344,14 +314,6 @@ multipath_ipv6() multipath6_test "Weighted MP 11:45" 11 45 } -multipath_ipv6_l4() -{ - log_info "Running IPv6 L4 hash multipath tests" - multipath6_l4_test "ECMP" 1 1 - multipath6_l4_test "Weighted MP 2:1" 2 1 - multipath6_l4_test "Weighted MP 11:45" 11 45 -} - trap cleanup EXIT setup_prepare diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh index a0d612e04990..2ef469ff3bc4 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh @@ -218,7 +218,7 @@ multipath4_test() sysctl_restore net.ipv4.fib_multipath_hash_policy } -multipath6_l4_test() +multipath6_test() { local desc="$1" local weight_rp12=$2 @@ -251,34 +251,6 @@ multipath6_l4_test() sysctl_restore net.ipv6.fib_multipath_hash_policy } -multipath6_test() -{ - local desc="$1" - local weight_rp12=$2 - local weight_rp13=$3 - local t0_rp12 t0_rp13 t1_rp12 t1_rp13 - local packets_rp12 packets_rp13 - - ip nexthop replace id 106 group 104,$weight_rp12/105,$weight_rp13 - - t0_rp12=$(link_stats_tx_packets_get $rp12) - t0_rp13=$(link_stats_tx_packets_get $rp13) - - # Generate 16384 echo requests, each with a random flow label. - for _ in $(seq 1 16384); do - ip vrf exec vrf-h1 $PING6 2001:db8:2::2 -F 0 -c 1 -q >/dev/null 2>&1 - done - - t1_rp12=$(link_stats_tx_packets_get $rp12) - t1_rp13=$(link_stats_tx_packets_get $rp13) - - let "packets_rp12 = $t1_rp12 - $t0_rp12" - let "packets_rp13 = $t1_rp13 - $t0_rp13" - multipath_eval "$desc" $weight_rp12 $weight_rp13 $packets_rp12 $packets_rp13 - - ip nexthop replace id 106 group 104/105 -} - multipath_test() { log_info "Running IPv4 multipath tests" @@ -301,11 +273,6 @@ multipath_test() multipath6_test "ECMP" 1 1 multipath6_test "Weighted MP 2:1" 2 1 multipath6_test "Weighted MP 11:45" 11 45 - - log_info "Running IPv6 L4 hash multipath tests" - multipath6_l4_test "ECMP" 1 1 - multipath6_l4_test "Weighted MP 2:1" 2 1 - multipath6_l4_test "Weighted MP 11:45" 11 45 } ping_ipv4_blackhole() diff --git a/tools/testing/selftests/net/forwarding/router_multipath.sh b/tools/testing/selftests/net/forwarding/router_multipath.sh index 464821c587a5..a4eceeb5c06e 100755 --- a/tools/testing/selftests/net/forwarding/router_multipath.sh +++ b/tools/testing/selftests/net/forwarding/router_multipath.sh @@ -195,7 +195,7 @@ multipath4_test() sysctl_restore net.ipv4.fib_multipath_hash_policy } -multipath6_l4_test() +multipath6_test() { local desc="$1" local weight_rp12=$2 @@ -232,38 +232,6 @@ multipath6_l4_test() sysctl_restore net.ipv6.fib_multipath_hash_policy } -multipath6_test() -{ - local desc="$1" - local weight_rp12=$2 - local weight_rp13=$3 - local t0_rp12 t0_rp13 t1_rp12 t1_rp13 - local packets_rp12 packets_rp13 - - ip route replace 2001:db8:2::/64 vrf vrf-r1 \ - nexthop via fe80:2::22 dev $rp12 weight $weight_rp12 \ - nexthop via fe80:3::23 dev $rp13 weight $weight_rp13 - - t0_rp12=$(link_stats_tx_packets_get $rp12) - t0_rp13=$(link_stats_tx_packets_get $rp13) - - # Generate 16384 echo requests, each with a random flow label. - for _ in $(seq 1 16384); do - ip vrf exec vrf-h1 $PING6 2001:db8:2::2 -F 0 -c 1 -q &> /dev/null - done - - t1_rp12=$(link_stats_tx_packets_get $rp12) - t1_rp13=$(link_stats_tx_packets_get $rp13) - - let "packets_rp12 = $t1_rp12 - $t0_rp12" - let "packets_rp13 = $t1_rp13 - $t0_rp13" - multipath_eval "$desc" $weight_rp12 $weight_rp13 $packets_rp12 $packets_rp13 - - ip route replace 2001:db8:2::/64 vrf vrf-r1 \ - nexthop via fe80:2::22 dev $rp12 \ - nexthop via fe80:3::23 dev $rp13 -} - multipath_test() { log_info "Running IPv4 multipath tests" @@ -275,11 +243,6 @@ multipath_test() multipath6_test "ECMP" 1 1 multipath6_test "Weighted MP 2:1" 2 1 multipath6_test "Weighted MP 11:45" 11 45 - - log_info "Running IPv6 L4 hash multipath tests" - multipath6_l4_test "ECMP" 1 1 - multipath6_l4_test "Weighted MP 2:1" 2 1 - multipath6_l4_test "Weighted MP 11:45" 11 45 } setup_prepare() From patchwork Mon Mar 4 09:56:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13580330 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2081.outbound.protection.outlook.com [40.107.220.81]) (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 28602225A6 for ; Mon, 4 Mar 2024 09:57:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546230; cv=fail; b=M4EbnIQ9L5bUfzB+7p6qSNq8u0C9RWURnQJnQPyB5okSZS7jTuw7DZNtlLxmxs7mfjDVW2/+xzr5RSHRXOiwOHvh7Ize+/enq7hUfIQGAm7nFRFpYlo2HMkdJccoy7BTx7iadEiv7OGYZCaiC+l4MgVrp561zIQevU/qAHf/ySU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546230; c=relaxed/simple; bh=SA7H098RTxFVhKvjhsdmDwSKyJQjMzWUO3QZuen3ChM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RfLPv3OZJ6kOaKgAwtsXicuD3nBtG6EcHxHZMVGMCWDT0gfBnXX5jMbRrb9RhjzWJstmZeBxGExAQl+I9kAzEIsAzT6zrFyS/mgC55VSH8GlZ1fKiYUDSBwVftJJ6eMaGxDB0UFodp0b279BfN5bnLcyqKQUktGMaPfEL24FeqA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=EjkPJaTS; arc=fail smtp.client-ip=40.107.220.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="EjkPJaTS" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gCMNBlxIZEGKaRNZyuCXVh0Z7FZyUUFpZJDwLWr9wRdEFxAf8gnpTGR0J5BO4AS5Y+fxLE6p0rG3RAsUlgqQ76V3q7x9nvSkQWVUv3LQkwsyeAkXBiAPv4eImdYGpchohPq98mo8dAWcdAyr0bd5AJWULjXVYpBfhqwY2v8bQTM94xiWOjCjoj5Ldk3YfLXUkvnyzY/1A6nehP6UuCoF+Oozfpb6eNTcRlHvKEfMjSZjITpECT1wMwQlZ2aCmr3oAqFSi8NoTQJAgNRcOn8++tDEyMiE8GTWGUPrTiUVr1itG5o14XsQzM/3z/74gxSQCgVhotoXVz5zK9vP9D0vUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iLp4RT1HjJD3MmOpm5EDNQIiZUphAlGmlUpViucm/xI=; b=OeRdwG/jubMRYogn+TPmQXR9YLQF/TPwyqfMRRSBlEbLZzpOCIJpmMyYykOZmW6Q3ddF+HoIar9Sm371IY2kN9FMGavlYNgQ1XPNR2IMKSn8IjbbvDFQVEi29fySkNNR59gefLlAbO/qqMpUIRORKGPl4sGNvjcmlA8cG3vRVbHMQMUY0BGRloiVKj3Yrl6n43skiOUi14ocAEk3HMCrFK75DmKcZGb3fRmIhNNUZMfgggZbFcIbnf4OnrhW+RimrzCssGBvVpB3h29z9sdvKCl1wi1v+2lqt/+5i1xVjAU6Olhn6kgoMifzhrW/D8utIAN/Je6yjnIREhL/OZjWmw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iLp4RT1HjJD3MmOpm5EDNQIiZUphAlGmlUpViucm/xI=; b=EjkPJaTSoXt/Pn/LE749LBtllLO4tNqqtuFlrWKEA4Sr4+piX3560y1k0FqSQgUckeQ2lLUNIRRDDN7qmJkcUNkf3S3dzqw+gGv3cnLnGEaUujrxjzQhhICYGY+Yr1wf7Zcb2dylR8YvuJ27Cv/35Iy6/3mhk2LGidHmuI4Z7+Kd231H1KAS0Lx5HWPv2QKk+zkeigANTQIwFMOcVNQ0lEwZ5/3t8/42k0j9sVGTH4nWSx1GYupNcRCFoXnS33oMOj2OwLU9SjLMbi/fyfhtdzQUndLWYGDW2S+PPLp3UTitxSkNUKTuD9TTv0CTwO7jw3Ku8+5UkNpBdsqxwJDuPw== Received: from CH2PR07CA0042.namprd07.prod.outlook.com (2603:10b6:610:5b::16) by DM6PR12MB4089.namprd12.prod.outlook.com (2603:10b6:5:213::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Mon, 4 Mar 2024 09:57:03 +0000 Received: from DS2PEPF0000343D.namprd02.prod.outlook.com (2603:10b6:610:5b:cafe::e8) by CH2PR07CA0042.outlook.office365.com (2603:10b6:610:5b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38 via Frontend Transport; Mon, 4 Mar 2024 09:57:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS2PEPF0000343D.mail.protection.outlook.com (10.167.18.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Mon, 4 Mar 2024 09:57:03 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 4 Mar 2024 01:56:49 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 4 Mar 2024 01:56:46 -0800 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 2/6] selftests: forwarding: Parametrize mausezahn delay Date: Mon, 4 Mar 2024 11:56:08 +0200 Message-ID: <20240304095612.462900-3-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304095612.462900-1-idosch@nvidia.com> References: <20240304095612.462900-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF0000343D:EE_|DM6PR12MB4089:EE_ X-MS-Office365-Filtering-Correlation-Id: 73d93b14-e647-4968-64d8-08dc3c31719f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w9cySi1axcd1KtpJydMpbHgefI9R82kNNJjTUcFgS/cwMdU4Bj0Z55TCfxuOcgdE0skAS4F9t+Gb3yvNawpsIQZqNW8EdsXegd7yJ7c6QCwOucSSwJTTsKXo9cvrz4BSqjD6bgOAkWQCNs3inzP6ig2Ue+7qwQAoS1A0YwAjNMyE+aj49WfFVK1PzGv/cHZGjKrGGqrKjFHUXmJhTbldAHJDkvnr1br9H7Ami592FMt/RvdxN9HvB48ZJVRocyfjkfU1DtUnm+qM0J+qy5IZ77CMBaEYaa2FOOGU4412joGAimegKoPtkUIYybKuIzZm6V04WNiNhyePu146SPVQG9xcVhSZSM75PmtGeea2bpOY7qiijSWh3JCgKlxlV9UX8OW7h+d5EprQRrolPbkVTi2bjVeOsFQdMMdpEiI8R4n1t0PuYGITASH4ji716R06Cs92XFhjR/DIboBXJ3guRrCzVOpK3js7KvYxGLE2Qb96SG3RuCDE3Q0s9pUUjHpc+mKU2J7CPcNKArse9a7ZLdTF1T/v3JofCrYQTBQa02zmfgFAW+ut45xGmoMLRFP/64CssZKZfo92P+t3vNpJmgfHqNWO0JFYObchw1C8pY6WF2GNOkgZLSy1z9khcKw1b3KW42mI5G9yhGd4//m1ucVl1Uh4/SbkleyW7PcEoK7bFQPFm4JS/u9v9UkQjAZmmfHpKrvyXBNSAaBbg68meNPS0WYTA11fW8kAqjy+S3ZLkuHAOWyPTivJNIgmnlLZ X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(82310400014)(376005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 09:57:03.5697 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 73d93b14-e647-4968-64d8-08dc3c31719f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF0000343D.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4089 X-Patchwork-Delegate: kuba@kernel.org The various multipath tests use mausezahn to generate different flows and check how they are distributed between the available nexthops. The tool is currently invoked with an hard coded transmission delay of 1 ms. This is unnecessary when the tests are run with veth pairs and needlessly prolongs the tests. Parametrize this delay and default it to 0 us. It can be overridden using the forwarding.config file. On my system, this reduces the run time of router_multipath.sh by 93%. Signed-off-by: Ido Schimmel --- .../net/forwarding/custom_multipath_hash.sh | 16 ++++++++-------- .../net/forwarding/forwarding.config.sample | 2 ++ .../net/forwarding/gre_custom_multipath_hash.sh | 16 ++++++++-------- .../net/forwarding/gre_inner_v4_multipath.sh | 2 +- .../net/forwarding/gre_inner_v6_multipath.sh | 2 +- .../selftests/net/forwarding/gre_multipath.sh | 2 +- .../selftests/net/forwarding/gre_multipath_nh.sh | 4 ++-- .../net/forwarding/gre_multipath_nh_res.sh | 4 ++-- .../forwarding/ip6gre_custom_multipath_hash.sh | 16 ++++++++-------- .../net/forwarding/ip6gre_inner_v4_multipath.sh | 2 +- .../net/forwarding/ip6gre_inner_v6_multipath.sh | 2 +- .../selftests/net/forwarding/ip6gre_lib.sh | 4 ++-- tools/testing/selftests/net/forwarding/lib.sh | 1 + .../selftests/net/forwarding/router_mpath_nh.sh | 4 ++-- .../net/forwarding/router_mpath_nh_res.sh | 4 ++-- .../selftests/net/forwarding/router_multipath.sh | 4 ++-- 16 files changed, 44 insertions(+), 41 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh b/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh index 56eb83d1a3bd..1783c10215e5 100755 --- a/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh +++ b/tools/testing/selftests/net/forwarding/custom_multipath_hash.sh @@ -183,42 +183,42 @@ send_src_ipv4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A "198.51.100.2-198.51.100.253" -B 203.0.113.2 \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_dst_ipv4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B "203.0.113.2-203.0.113.253" \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_src_udp4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B 203.0.113.2 \ - -d 1msec -t udp "sp=0-32768,dp=30000" + -d $MZ_DELAY -t udp "sp=0-32768,dp=30000" } send_dst_udp4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B 203.0.113.2 \ - -d 1msec -t udp "sp=20000,dp=0-32768" + -d $MZ_DELAY -t udp "sp=20000,dp=0-32768" } send_src_ipv6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A "2001:db8:1::2-2001:db8:1::fd" -B 2001:db8:4::2 \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_dst_ipv6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B "2001:db8:4::2-2001:db8:4::fd" \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_flowlabel() @@ -234,14 +234,14 @@ send_src_udp6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B 2001:db8:4::2 \ - -d 1msec -t udp "sp=0-32768,dp=30000" + -d $MZ_DELAY -t udp "sp=0-32768,dp=30000" } send_dst_udp6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B 2001:db8:4::2 \ - -d 1msec -t udp "sp=20000,dp=0-32768" + -d $MZ_DELAY -t udp "sp=20000,dp=0-32768" } custom_hash_test() diff --git a/tools/testing/selftests/net/forwarding/forwarding.config.sample b/tools/testing/selftests/net/forwarding/forwarding.config.sample index 4a546509de90..1fc4f0242fc5 100644 --- a/tools/testing/selftests/net/forwarding/forwarding.config.sample +++ b/tools/testing/selftests/net/forwarding/forwarding.config.sample @@ -28,6 +28,8 @@ PING=ping PING6=ping6 # Packet generator. Some distributions use 'mz'. MZ=mausezahn +# mausezahn delay between transmissions in microseconds. +MZ_DELAY=0 # Time to wait after interfaces participating in the test are all UP WAIT_TIME=5 # Whether to pause on failure or not. diff --git a/tools/testing/selftests/net/forwarding/gre_custom_multipath_hash.sh b/tools/testing/selftests/net/forwarding/gre_custom_multipath_hash.sh index 0446db9c6f74..9788bd0f6e8b 100755 --- a/tools/testing/selftests/net/forwarding/gre_custom_multipath_hash.sh +++ b/tools/testing/selftests/net/forwarding/gre_custom_multipath_hash.sh @@ -278,42 +278,42 @@ send_src_ipv4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A "198.51.100.2-198.51.100.253" -B 203.0.113.2 \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_dst_ipv4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B "203.0.113.2-203.0.113.253" \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_src_udp4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B 203.0.113.2 \ - -d 1msec -t udp "sp=0-32768,dp=30000" + -d $MZ_DELAY -t udp "sp=0-32768,dp=30000" } send_dst_udp4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B 203.0.113.2 \ - -d 1msec -t udp "sp=20000,dp=0-32768" + -d $MZ_DELAY -t udp "sp=20000,dp=0-32768" } send_src_ipv6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A "2001:db8:1::2-2001:db8:1::fd" -B 2001:db8:2::2 \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_dst_ipv6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B "2001:db8:2::2-2001:db8:2::fd" \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_flowlabel() @@ -329,14 +329,14 @@ send_src_udp6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=0-32768,dp=30000" + -d $MZ_DELAY -t udp "sp=0-32768,dp=30000" } send_dst_udp6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=20000,dp=0-32768" + -d $MZ_DELAY -t udp "sp=20000,dp=0-32768" } custom_hash_test() diff --git a/tools/testing/selftests/net/forwarding/gre_inner_v4_multipath.sh b/tools/testing/selftests/net/forwarding/gre_inner_v4_multipath.sh index e4009f658003..efca6114a3ce 100755 --- a/tools/testing/selftests/net/forwarding/gre_inner_v4_multipath.sh +++ b/tools/testing/selftests/net/forwarding/gre_inner_v4_multipath.sh @@ -267,7 +267,7 @@ multipath4_test() ip vrf exec v$h1 \ $MZ $h1 -q -p 64 -A "192.0.3.2-192.0.3.62" -B "192.0.4.2-192.0.4.62" \ - -d 1msec -c 50 -t udp "sp=1024,dp=1024" + -d $MZ_DELAY -c 50 -t udp "sp=1024,dp=1024" sleep 1 local t1_111=$(tc_rule_stats_get $ul32 111 ingress) diff --git a/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh b/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh index e449475c4d3e..e5e911ce1562 100755 --- a/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh +++ b/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh @@ -268,7 +268,7 @@ multipath6_test() ip vrf exec v$h1 \ $MZ $h1 -6 -q -p 64 -A "2001:db8:1::2-2001:db8:1::1e" \ -B "2001:db8:2::2-2001:db8:2::1e" \ - -d 1msec -c 50 -t udp "sp=1024,dp=1024" + -d $MZ_DELAY -c 50 -t udp "sp=1024,dp=1024" sleep 1 local t1_111=$(tc_rule_stats_get $ul32 111 ingress) diff --git a/tools/testing/selftests/net/forwarding/gre_multipath.sh b/tools/testing/selftests/net/forwarding/gre_multipath.sh index a8d8e8b3dc81..57531c1d884d 100755 --- a/tools/testing/selftests/net/forwarding/gre_multipath.sh +++ b/tools/testing/selftests/net/forwarding/gre_multipath.sh @@ -220,7 +220,7 @@ multipath4_test() ip vrf exec v$h1 \ $MZ $h1 -q -p 64 -A 192.0.2.1 -B 192.0.2.18 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" local t1_111=$(tc_rule_stats_get $ul2 111 ingress) local t1_222=$(tc_rule_stats_get $ul2 222 ingress) diff --git a/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh b/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh index 62281898e7a4..7d5b2b9cc133 100755 --- a/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh +++ b/tools/testing/selftests/net/forwarding/gre_multipath_nh.sh @@ -244,7 +244,7 @@ multipath4_test() ip vrf exec v$h1 \ $MZ $h1 -q -p 64 -A 192.0.2.1 -B 192.0.2.18 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" local t1_111=$(tc_rule_stats_get $ul2 111 ingress) local t1_222=$(tc_rule_stats_get $ul2 222 ingress) @@ -271,7 +271,7 @@ multipath6_test() ip vrf exec v$h1 \ $MZ $h1 -6 -q -p 64 -A 2001:db8:1::1 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" local t1_111=$(tc_rule_stats_get $ul2 111 ingress) local t1_222=$(tc_rule_stats_get $ul2 222 ingress) diff --git a/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh b/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh index 2085111bcd67..370f9925302d 100755 --- a/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh +++ b/tools/testing/selftests/net/forwarding/gre_multipath_nh_res.sh @@ -247,7 +247,7 @@ multipath4_test() ip vrf exec v$h1 \ $MZ $h1 -q -p 64 -A 192.0.2.1 -B 192.0.2.18 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" local t1_111=$(tc_rule_stats_get $ul2 111 ingress) local t1_222=$(tc_rule_stats_get $ul2 222 ingress) @@ -275,7 +275,7 @@ multipath6_test() ip vrf exec v$h1 \ $MZ $h1 -6 -q -p 64 -A 2001:db8:1::1 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" local t1_111=$(tc_rule_stats_get $ul2 111 ingress) local t1_222=$(tc_rule_stats_get $ul2 222 ingress) diff --git a/tools/testing/selftests/net/forwarding/ip6gre_custom_multipath_hash.sh b/tools/testing/selftests/net/forwarding/ip6gre_custom_multipath_hash.sh index d40183b4eccc..2ab9eaaa5532 100755 --- a/tools/testing/selftests/net/forwarding/ip6gre_custom_multipath_hash.sh +++ b/tools/testing/selftests/net/forwarding/ip6gre_custom_multipath_hash.sh @@ -280,42 +280,42 @@ send_src_ipv4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A "198.51.100.2-198.51.100.253" -B 203.0.113.2 \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_dst_ipv4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B "203.0.113.2-203.0.113.253" \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_src_udp4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B 203.0.113.2 \ - -d 1msec -t udp "sp=0-32768,dp=30000" + -d $MZ_DELAY -t udp "sp=0-32768,dp=30000" } send_dst_udp4() { ip vrf exec v$h1 $MZ $h1 -q -p 64 \ -A 198.51.100.2 -B 203.0.113.2 \ - -d 1msec -t udp "sp=20000,dp=0-32768" + -d $MZ_DELAY -t udp "sp=20000,dp=0-32768" } send_src_ipv6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A "2001:db8:1::2-2001:db8:1::fd" -B 2001:db8:2::2 \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_dst_ipv6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B "2001:db8:2::2-2001:db8:2::fd" \ - -d 1msec -c 50 -t udp "sp=20000,dp=30000" + -d $MZ_DELAY -c 50 -t udp "sp=20000,dp=30000" } send_flowlabel() @@ -331,14 +331,14 @@ send_src_udp6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=0-32768,dp=30000" + -d $MZ_DELAY -t udp "sp=0-32768,dp=30000" } send_dst_udp6() { ip vrf exec v$h1 $MZ -6 $h1 -q -p 64 \ -A 2001:db8:1::2 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=20000,dp=0-32768" + -d $MZ_DELAY -t udp "sp=20000,dp=0-32768" } custom_hash_test() diff --git a/tools/testing/selftests/net/forwarding/ip6gre_inner_v4_multipath.sh b/tools/testing/selftests/net/forwarding/ip6gre_inner_v4_multipath.sh index a257979d3fc5..32d1461f37b7 100755 --- a/tools/testing/selftests/net/forwarding/ip6gre_inner_v4_multipath.sh +++ b/tools/testing/selftests/net/forwarding/ip6gre_inner_v4_multipath.sh @@ -266,7 +266,7 @@ multipath4_test() ip vrf exec v$h1 \ $MZ $h1 -q -p 64 -A "192.0.3.2-192.0.3.62" -B "192.0.4.2-192.0.4.62" \ - -d 1msec -c 50 -t udp "sp=1024,dp=1024" + -d $MZ_DELAY -c 50 -t udp "sp=1024,dp=1024" sleep 1 local t1_111=$(tc_rule_stats_get $ul32 111 ingress) diff --git a/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh b/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh index d208f5243ade..eb4e50df5337 100755 --- a/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh +++ b/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh @@ -267,7 +267,7 @@ multipath6_test() ip vrf exec v$h1 \ $MZ $h1 -6 -q -p 64 -A "2001:db8:1::2-2001:db8:1::1e" \ -B "2001:db8:2::2-2001:db8:2::1e" \ - -d 1msec -c 50 -t udp "sp=1024,dp=1024" + -d $MZ_DELAY -c 50 -t udp "sp=1024,dp=1024" sleep 1 local t1_111=$(tc_rule_stats_get $ul32 111 ingress) diff --git a/tools/testing/selftests/net/forwarding/ip6gre_lib.sh b/tools/testing/selftests/net/forwarding/ip6gre_lib.sh index 58a3597037b1..24f4ab328bd2 100644 --- a/tools/testing/selftests/net/forwarding/ip6gre_lib.sh +++ b/tools/testing/selftests/net/forwarding/ip6gre_lib.sh @@ -356,7 +356,7 @@ test_traffic_ip4ip6() flower $TC_FLAG dst_ip 203.0.113.1 action pass $MZ $h1 -c 1000 -p 64 -a $h1mac -b $ol1mac -A 198.51.100.1 \ - -B 203.0.113.1 -t ip -q -d 1msec + -B 203.0.113.1 -t ip -q -d $MZ_DELAY # Check ports after encap and after decap. tc_check_at_least_x_packets "dev $ul1 egress" 101 1000 @@ -389,7 +389,7 @@ test_traffic_ip6ip6() flower $TC_FLAG dst_ip 2001:db8:2::1 action pass $MZ -6 $h1 -c 1000 -p 64 -a $h1mac -b $ol1mac -A 2001:db8:1::1 \ - -B 2001:db8:2::1 -t ip -q -d 1msec + -B 2001:db8:2::1 -t ip -q -d $MZ_DELAY # Check ports after encap and after decap. tc_check_at_least_x_packets "dev $ul1 egress" 101 1000 diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index db3688f52888..d1bf39eaf2b3 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -8,6 +8,7 @@ PING=${PING:=ping} PING6=${PING6:=ping6} MZ=${MZ:=mausezahn} +MZ_DELAY=${MZ_DELAY:=0} ARPING=${ARPING:=arping} TEAMD=${TEAMD:=teamd} WAIT_TIME=${WAIT_TIME:=5} diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh index 2ef469ff3bc4..982e0d098ea9 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh @@ -204,7 +204,7 @@ multipath4_test() t0_rp13=$(link_stats_tx_packets_get $rp13) ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp13=$(link_stats_tx_packets_get $rp13) @@ -237,7 +237,7 @@ multipath6_test() t0_rp13=$(link_stats_tx_packets_get $rp13) $MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp13=$(link_stats_tx_packets_get $rp13) diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh index cb08ffe2356a..a60ff54723b7 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh @@ -205,7 +205,7 @@ multipath4_test() t0_rp13=$(link_stats_tx_packets_get $rp13) ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp13=$(link_stats_tx_packets_get $rp13) @@ -235,7 +235,7 @@ multipath6_l4_test() t0_rp13=$(link_stats_tx_packets_get $rp13) $MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp13=$(link_stats_tx_packets_get $rp13) diff --git a/tools/testing/selftests/net/forwarding/router_multipath.sh b/tools/testing/selftests/net/forwarding/router_multipath.sh index a4eceeb5c06e..e2be354167a1 100755 --- a/tools/testing/selftests/net/forwarding/router_multipath.sh +++ b/tools/testing/selftests/net/forwarding/router_multipath.sh @@ -179,7 +179,7 @@ multipath4_test() t0_rp13=$(link_stats_tx_packets_get $rp13) ip vrf exec vrf-h1 $MZ $h1 -q -p 64 -A 192.0.2.2 -B 198.51.100.2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp13=$(link_stats_tx_packets_get $rp13) @@ -216,7 +216,7 @@ multipath6_test() t0_rp13=$(link_stats_tx_packets_get $rp13) $MZ $h1 -6 -q -p 64 -A 2001:db8:1::2 -B 2001:db8:2::2 \ - -d 1msec -t udp "sp=1024,dp=0-32768" + -d $MZ_DELAY -t udp "sp=1024,dp=0-32768" t1_rp12=$(link_stats_tx_packets_get $rp12) t1_rp13=$(link_stats_tx_packets_get $rp13) From patchwork Mon Mar 4 09:56:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13580329 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) (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 5B204225AA for ; Mon, 4 Mar 2024 09:57:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.41 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546230; cv=fail; b=I1UG7M8VXOz1wOxxsh+QSMax/XHK3dNQKILnX1DoQeDaFRe0snZuL0P2eZaJA55ke8I/JMfRNifiBCNRP7HTOznMiH/p3UbAbMET862VWYDXmcHFaxcYeZh/EZCMkC2Ld68w/mfDSls7BeiKX2QuGgz8UWo3VugPu6yP7JOralA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546230; c=relaxed/simple; bh=lHRgzlj0LF3R9O/Dne2BSYklSURAecIZhLsJdVJqBcs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=uEZY61Ynre9VmWOUE7DbdOSQfT8N/cZP91ahIyV7xUhSc553qsPOYNaaxu/t6I5iBX0/CRZ4Z8JtlZG18PxIMQ6BUj9UJnQLE10huDDh5YGRKEV7/SzVGsmsosc6rcRuowsjmigfFQbyk1PPi52sQDF4OP8L5M4z2wtXZL+YylU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=A0got25k; arc=fail smtp.client-ip=40.107.236.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="A0got25k" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e3wJYZdQ8gC4ZXXbYHDwDdlbfTdFzNKKpJO3hOKN+UrZEYkzFZy4k/G3Dr0WcwrJp9ubWdTusPYMvBAsknlSCGxTOQ4T/gbvPEsT8nS/2G2fqFdiNzS5zMmPazLdBrBhaKwkxdOQezJ2VPF5CSDUGWbdO0akZfCySeffHY+RHX46J2in1sZVVk2Rw4eBYJ9Sg3jrMqOIyJDuKSTXAK5LnicTbhDwWFAd6ICFjIoZ80hBV+vSP1d2oqGLP9CGciqwX5F74i6rNdMTRcd7nqUOjLxrFvHCb+ipUJpWnWZtYl/R4yCeFKrWmByoiBsoRMQ0NOPQ4zYqKFYfrRbu3qPPug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=q9bLnIQDvAYezug//eIHee4c+tzG004AullBxxsw7WA=; b=M9/oTjS/uGjoYFEobzZiTIHABKpHS0bUR00nync2rPL3M+wVdwBF4GfM/UABFpDy5JrHbCY8lKMSJKDTlTdatuyUJMQM08RvEtvCN6FJ3OltFH0DXN9W9BbI2Wkl5wrUkX6MyLORsRqSOuELvAfCCgYVeUBb6sdAU3E+WXih+VMiOBAGF2MVXAXohYlLsPvKT+RkQwW1FQZ1sSexvB3kySIoCInmTMK21+cNbquzirktz1X5zVICI+Z7+ZpdRBj8IloRasC7H55FTLIlmwD/leLWFBF1wWNDQAvQ8mXoqzrSZi+QT4G8lAyJTirXIdYfWvi06R0W5ljV58yj9K4P0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q9bLnIQDvAYezug//eIHee4c+tzG004AullBxxsw7WA=; b=A0got25kRKmp3QxWtMC5ilIEba4NqLULYP9wL+NPvQjVMWSsa+xZ8p+Wn8uwWcAuceVxkVvADwvX1EUz8z0QdyKTus4MECtxvs2DUPTbV47sSXcGcit3EsTqJNhIFT1pU901mgXIhHSBT7kWTbKwq1xmbGMQkXhtJib4BiMF4y8zzSLw+fxk1b7QnBLrQffEDo866m9hZtB/aU3nP6MX8A5o+HohNPeP8yRE5RWzDwsNeDIEhOaMhXStrg57o2OBCKwurow7OXkpH81C38V8Rg22hzeKk2Aqk0ZAh5WwfxbEzWalAVlPkG83LdrJhJhZrIcDshHrEGVPm4fuirIfaw== Received: from BN9PR03CA0139.namprd03.prod.outlook.com (2603:10b6:408:fe::24) by CH3PR12MB7737.namprd12.prod.outlook.com (2603:10b6:610:14d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Mon, 4 Mar 2024 09:57:05 +0000 Received: from BN1PEPF00004687.namprd05.prod.outlook.com (2603:10b6:408:fe:cafe::e1) by BN9PR03CA0139.outlook.office365.com (2603:10b6:408:fe::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Mon, 4 Mar 2024 09:57:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN1PEPF00004687.mail.protection.outlook.com (10.167.243.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Mon, 4 Mar 2024 09:57:04 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 4 Mar 2024 01:56:52 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 4 Mar 2024 01:56:49 -0800 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 3/6] selftests: forwarding: Make tc-police pass on debug kernels Date: Mon, 4 Mar 2024 11:56:09 +0200 Message-ID: <20240304095612.462900-4-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304095612.462900-1-idosch@nvidia.com> References: <20240304095612.462900-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004687:EE_|CH3PR12MB7737:EE_ X-MS-Office365-Filtering-Correlation-Id: 426f2a42-31b7-42af-d67f-08dc3c31727e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mkiMD29oMprbGQ3GbYG8jCojXFv1IgBsCF8AGy3BBjjTk9W5LV7yd3/Bi83q6ckhaORtzRjVNgI5P4kQ7EtxYqYrZyukIG6BHS45Ldl0puFw/yUqEw/V80MiBNbChzvK3zUWD6e6GuGEVHknQhEpqD3Qy0G+AX2v5iwoWRbpB2HdFE/+0PeMvrx+Pdt82JHSuUQYqMruGqmBhzSL1Y4zU18KmNlBnUdjwGCk28XGBbhpEkKYPvCMAAd4INMkxPPUDTAtQ2sQJawP8lkb0G21POYiPVmGW21FhUtw2s1IF8V5jgmPtSgg3Q9SSK1GlbrToYvdzxFpbTuf/laWOOR/hYpr/Zo3Bg47hcM17Dj8fpiN3ejjIDeX0VMEmwHRqPaFRnzX5pstSilEbuKHTR220kZuADRk0tJKknji8LxB6K1anEiP2QDpc255Go8kYL6WdLkk46iUuc/swmdWMLPfUmYe8dyD3rxsn+TxXGADu66hqhhJNMCa0ARXX7/pFY8jI27j627UIOdFy1Ge7FhO2OI9ca/PzYqfX4NhxRtYeUVLai5TzFqkC8CsZ9aMIJ7oNPwcJBNdAUe6AQQNpRZbNaz3AICurJfXeAX9awVxUxk+jx28mOkNRoSEvgO7frRrqsiGVBdOJ1yAD++egpLXCT8n165OivtMzg7wK3/N+vv1DlAnir3wcIdBHqjZEWjmu6NERvjhs6sCn5poGqADSXzzYDJxVz77rubil6oY3AdcvTIgqrAyBDaL+gT7r8eU X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(376005)(36860700004)(82310400014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 09:57:04.9715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 426f2a42-31b7-42af-d67f-08dc3c31727e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004687.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7737 X-Patchwork-Delegate: kuba@kernel.org The test configures a policer with a rate of 80Mbps and expects to measure a rate close to it. This is a too high rate for debug kernels, causing the test to fail [1]. Fix by reducing the rate to 10Mbps. [1] # ./tc_police.sh TEST: police on rx [FAIL] Expected rate 76.2Mbps, got 29.6Mbps, which is -61% off. Required accuracy is +-10%. TEST: police on tx [FAIL] Expected rate 76.2Mbps, got 30.4Mbps, which is -60% off. Required accuracy is +-10%. Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/tc_police.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/tc_police.sh b/tools/testing/selftests/net/forwarding/tc_police.sh index 0a51eef21b9e..5103f64a71d6 100755 --- a/tools/testing/selftests/net/forwarding/tc_police.sh +++ b/tools/testing/selftests/net/forwarding/tc_police.sh @@ -140,7 +140,7 @@ police_common_test() sleep 10 local t1=$(tc_rule_stats_get $h2 1 ingress .bytes) - local er=$((80 * 1000 * 1000)) + local er=$((10 * 1000 * 1000)) local nr=$(rate $t0 $t1 10) local nr_pct=$((100 * (nr - er) / er)) ((-10 <= nr_pct && nr_pct <= 10)) @@ -157,7 +157,7 @@ police_rx_test() # Rule to police traffic destined to $h2 on ingress of $rp1 tc filter add dev $rp1 ingress protocol ip pref 1 handle 101 flower \ dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ - action police rate 80mbit burst 16k conform-exceed drop/ok + action police rate 10mbit burst 16k conform-exceed drop/ok police_common_test "police on rx" @@ -169,7 +169,7 @@ police_tx_test() # Rule to police traffic destined to $h2 on egress of $rp2 tc filter add dev $rp2 egress protocol ip pref 1 handle 101 flower \ dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ - action police rate 80mbit burst 16k conform-exceed drop/ok + action police rate 10mbit burst 16k conform-exceed drop/ok police_common_test "police on tx" @@ -190,7 +190,7 @@ police_shared_common_test() sleep 10 local t1=$(tc_rule_stats_get $h2 1 ingress .bytes) - local er=$((80 * 1000 * 1000)) + local er=$((10 * 1000 * 1000)) local nr=$(rate $t0 $t1 10) local nr_pct=$((100 * (nr - er) / er)) ((-10 <= nr_pct && nr_pct <= 10)) @@ -211,7 +211,7 @@ police_shared_test() # Rule to police traffic destined to $h2 on ingress of $rp1 tc filter add dev $rp1 ingress protocol ip pref 1 handle 101 flower \ dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ - action police rate 80mbit burst 16k conform-exceed drop/ok \ + action police rate 10mbit burst 16k conform-exceed drop/ok \ index 10 # Rule to police a different flow destined to $h2 on egress of $rp2 @@ -250,7 +250,7 @@ police_mirror_common_test() # Rule to police traffic destined to $h2 and mirror to $h3 tc filter add dev $pol_if $dir protocol ip pref 1 handle 101 flower \ dst_ip 198.51.100.1 ip_proto udp dst_port 54321 \ - action police rate 80mbit burst 16k conform-exceed drop/pipe \ + action police rate 10mbit burst 16k conform-exceed drop/pipe \ action mirred egress mirror dev $rp3 mausezahn $h1 -a own -b $(mac_get $rp1) -A 192.0.2.1 -B 198.51.100.1 \ @@ -260,7 +260,7 @@ police_mirror_common_test() sleep 10 local t1=$(tc_rule_stats_get $h2 1 ingress .bytes) - local er=$((80 * 1000 * 1000)) + local er=$((10 * 1000 * 1000)) local nr=$(rate $t0 $t1 10) local nr_pct=$((100 * (nr - er) / er)) ((-10 <= nr_pct && nr_pct <= 10)) @@ -270,7 +270,7 @@ police_mirror_common_test() sleep 10 local t1=$(tc_rule_stats_get $h3 1 ingress .bytes) - local er=$((80 * 1000 * 1000)) + local er=$((10 * 1000 * 1000)) local nr=$(rate $t0 $t1 10) local nr_pct=$((100 * (nr - er) / er)) ((-10 <= nr_pct && nr_pct <= 10)) From patchwork Mon Mar 4 09:56:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13580331 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2044.outbound.protection.outlook.com [40.107.93.44]) (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 8BD08241E3 for ; Mon, 4 Mar 2024 09:57:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546236; cv=fail; b=Fs+PjBNuqSa4SjvYtSw2QT+uuvNK4dt+3vqvFUlusSI5cJkli57/Vd05zJ4zyaeJeNQ0Pq8SoS5UElFniHHOlyG2tNZwPI/Pgw00j7qlcRB1LeGabUd2A2ghqGbwwSCb9Q+bbnO0/XTwxaGeZQ0y3kuUbbYhgfGvxdA/BLXBkkI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546236; c=relaxed/simple; bh=tVm/2ZNtftrRvGvCOgsu0fhaD3aNYW+JrnH7gLCLna0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XmtAtCQAgGn62R+eEwOWYqOAnrosGz7fm/dMphPC8ZoysbP0k6+9SmQlv9Aa6yHaiRD+yNHdGjxIcnYth+2aFiMWi1umPPBhug+NK8vXngUUlk6I0gJ5f3ZdxePf6L536UI/NyQ8V7fTlaSHFjmllXfp3KvBnC5foyEuIXjSaIM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=gORiLPAm; arc=fail smtp.client-ip=40.107.93.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="gORiLPAm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f6X56cuh8wQ87gJxuknFaGdIxVLEqa9dv/xzDW2YNL3RXG0KNiDsVyrzUOgTYQBhHh80BdQ/qCvjUrZFLLi2ABZeukcAgO9v4cNeyzX7jxRlrK7To89Y9HHr1AaZN2Ri6Qw08yl2gsdpucUFMhzNNtPULTWTkoQwRDl/ToX28VSencO7dQtFJCoMLSEwcqGWL72NLEQ70P6WLG2uQkZiLdVooBFJnDnVzzgBLqM/c3hAG6l8OijmkMamcGx3zzcpuQNDcSZKKbC2n4b6JgsYGvomzVn5V+eJJuVBdpno9VArEzqjMoHznf3r24zNH4yxs/F+wg5L7KTzgj1tFfuszw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CrOto6UWLkvqUYmGweY3EAzUe1HWWEfIi+/Ntd9ynDc=; b=hdKZg4b/Q314rfQjfume7VszlvoPX+ylBLIK8QkRL3f32aU0m5h/Oo7mKjExPHn1ODB1CGxAV1q7D9dm9PY8YlmgqcYlNYSw/2LX7Co4lZKE/ULveyawx8LfqG9QfRpBd8Bcgno5Ye6H4GHEjtyaM/ZfkLyiyhB/WJ+1EPiHEupvOdEOfDebr66jJN3xINulvOlQ0I67GxFnOXeWB6HY4P/w0x0831nRoEps1t8RjEDLcJPf0hHJu6PcaspDUZ3AGNhr86j9CzkcmBygdiAqqRJvzIJqyG7HVllTLSj5tFcxTfBNfs1CxHvtlelKT7dn93e/pTnonPafhCKBeAHr4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CrOto6UWLkvqUYmGweY3EAzUe1HWWEfIi+/Ntd9ynDc=; b=gORiLPAmRu/lHIsD3YTFwLNn1vR8/lVZnIGuyoAEupAgchGLVTyraMJTHOzpytZ0mqU4nwUQFhmpQzN54iSCM9B6MHy9WGVltJYF0wwcZtH0iw/SUT2QcYl27OrffhbBLuBxEaAXaJ9G++Uf7YHw4b6q6yc+5KRF/VuIEOF8jR4m7qW9Pw9XoY8ESuPgeXBguJLy0qx9EwpRumCHiZMrR20ZsdPJnJjD+CnRhUPuzXGHvsy6p05uM8mOXVXHcT7FSlLvRla+JCIJ0cfosiwqxVicZBkA6302lGsbW/btCXkAt2v00H0/Tcbm7AWzHxWkxn1cj8kpxvIL/122XiQzfg== Received: from CH0P221CA0031.NAMP221.PROD.OUTLOOK.COM (2603:10b6:610:11d::13) by CH3PR12MB9281.namprd12.prod.outlook.com (2603:10b6:610:1c8::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Mon, 4 Mar 2024 09:57:09 +0000 Received: from DS2PEPF00003439.namprd02.prod.outlook.com (2603:10b6:610:11d:cafe::3a) by CH0P221CA0031.outlook.office365.com (2603:10b6:610:11d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Mon, 4 Mar 2024 09:57:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by DS2PEPF00003439.mail.protection.outlook.com (10.167.18.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Mon, 4 Mar 2024 09:57:09 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 4 Mar 2024 01:56:55 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 4 Mar 2024 01:56:52 -0800 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 4/6] selftests: forwarding: Make vxlan-bridge-1q pass on debug kernels Date: Mon, 4 Mar 2024 11:56:10 +0200 Message-ID: <20240304095612.462900-5-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304095612.462900-1-idosch@nvidia.com> References: <20240304095612.462900-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS2PEPF00003439:EE_|CH3PR12MB9281:EE_ X-MS-Office365-Filtering-Correlation-Id: c1104468-db8d-42c7-d6f3-08dc3c317529 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SCivlI8bg4xsZ2jtpzGRxHKo9HJkr0c+KTkGixgvl+pXvxb0zy2FB9hNn2D7A5+6IMQQ99gNjAv6MDdJbb/092YtTAXtdqF8su/1aShNsBSD/VLXWwYjoVH8TNpvnCfmjtVpCIfzsRWwM/S8wFVyaxpp6r0RIFYzStE6ynJCG264I46y3QINK3CTb726BI+LjDjMJ/s77k6sPQmNVrxZJgyGrzxcdnBmHxtD9i49MMCtr+On1ExMPnreSh+r6neb0XO2zOEc8SFf832/XXqJzUJtuYZFn3try83GEFZsSqzedzH5oKu9uVK7zlvI0daav5K6Qq0BsVKB3Bs2uWV96mPI6qlgpLhN/eAkf2lW6l75B0aIwC13Vc30fx3symrB9tuaSGSW8L3fj0N+ttgvyADf38tnfXLAC9aHQ20wGjb6e39Oq1cn9BkHqrkJqmpTPmQuTCW0hcEhcr+rlOoFh7IAH05u3CS9UTncTIJnnsdO8iLpxmsxnbpDSui64T2kyRlKyQ+SESi5nfVJwz4SALVRFx5HwBKOX5ueGTvPR2wFB3FU27R1lPEi5USaEAqnjdQkg3G7zbw/UIJbeRPhxzQlsXmP5ANXMfNkJA73rm9NSgG0PJi7jUbL7usOpBLWE1Df4/vlEXxOCSiFxsKM65wkCEKyo6L59dTkTDoDvhVH2KouA1i3nNDrWzoD5v+waGy2z+ySEx0hn/HnUrGD1vXbsifF4LLULNltP6I78914oRinFvOVjSstGMyiz3/Q X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(82310400014)(376005)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 09:57:09.4945 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1104468-db8d-42c7-d6f3-08dc3c317529 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.161];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS2PEPF00003439.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9281 X-Patchwork-Delegate: kuba@kernel.org The ageing time used by the test is too short for debug kernels and results in entries being aged out prematurely [1]. Fix by increasing the ageing time. [1] # ./vxlan_bridge_1q.sh [...] INFO: learning vlan 10 TEST: VXLAN: flood before learning [ OK ] TEST: VXLAN: show learned FDB entry [ OK ] TEST: VXLAN: learned FDB entry [FAIL] swp4: Expected to capture 0 packets, got 10. RTNETLINK answers: No such file or directory TEST: VXLAN: deletion of learned FDB entry [ OK ] TEST: VXLAN: Ageing of learned FDB entry [FAIL] swp4: Expected to capture 0 packets, got 10. TEST: VXLAN: learning toggling on bridge port [ OK ] [...] Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/vxlan_bridge_1q.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1q.sh index a596bbf3ed6a..fb9a34cb50c6 100755 --- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1q.sh @@ -750,7 +750,7 @@ __test_learning() expects[0]=0; expects[$idx1]=10; expects[$idx2]=0 vxlan_flood_test $mac $dst $vid "${expects[@]}" - sleep 20 + sleep 60 bridge fdb show brport $vx | grep $mac | grep -q self check_fail $? @@ -796,11 +796,11 @@ test_learning() local dst=192.0.2.100 local vid=10 - # Enable learning on the VxLAN devices and set ageing time to 10 seconds - ip link set dev br1 type bridge ageing_time 1000 - ip link set dev vx10 type vxlan ageing 10 + # Enable learning on the VxLAN devices and set ageing time to 30 seconds + ip link set dev br1 type bridge ageing_time 3000 + ip link set dev vx10 type vxlan ageing 30 ip link set dev vx10 type vxlan learning - ip link set dev vx20 type vxlan ageing 10 + ip link set dev vx20 type vxlan ageing 30 ip link set dev vx20 type vxlan learning reapply_config From patchwork Mon Mar 4 09:56:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13580332 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2062.outbound.protection.outlook.com [40.107.92.62]) (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 D47D3225A6 for ; Mon, 4 Mar 2024 09:57:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546237; cv=fail; b=K0UD1Q+iGX8+JeFQR+KXglbd0m6aPjaVQp66pYzNUDQ8nih4Y9gctmUSS9zIPWO3e0OV6Ssp3v7J9lrM5pfMXw/2yLCXqjIY309KBNl2fiDZtIFwOoJkhFJpAXdA7Ik1LOXFYXPzLJu3SlkG3V0idk9OOenUljKZNuFaHecxPpA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546237; c=relaxed/simple; bh=KYA2Em21jamBfTuxFJmia7dnAVc2hr8wioh54mEtJrw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=obtGS2ppa+tkk22BuVKbVPT5CC1+SgYNZmDMYX+v4Xf4hqGyQjoiHCs9FzUio9H8u7+djntqCL/xKlH/2MDWUpVWtRLMnasKe/IwkFzEusO9srpg/gOhfx8Se9DvUvQyHoNssJKf4SRnbSjMzAdm5YLNILoXTRrtbmzZbKFjdOY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=BBH7Ev3k; arc=fail smtp.client-ip=40.107.92.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="BBH7Ev3k" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dy87PH1j9kQgUkzMYzOTaBEO+FYxpnvtbnBS0nvVvzq8ujl4QlAlfkxChFu8l9trbsIBJUJZQ9Ar/NkhCgqQRj8wYRN7mrh36MwevJIvOAgxyEqhyxH6egdohcofuvm2TpstCvpM7C8utmmByJGV/zth4cK9PYF0uKM9ylkbVkNARA3aald8Aj5MlapGQHstcxhnZVO9qUHkskZPSqVb2YLXSYRZLSVd7/IU+j2etGBVHSqu/5g5zWPtWu2X4kMl7qkgDcRR2t3aPk+OpC5vcuBRyfJDcBdaXiqifelu2WJ13I/9HwT1yXdgHzwmBBKCRiw3mm7+wQM2fvAbpqIdPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Z1ZKHthDUl3sESiNVTLINnWXQK/Nletqc90KcTUfO34=; b=bJi5l7qi4AvIQDZNCTiTKOXfxslUVjPhiLmMyyVyjfRlqGkbq6HhYux8I2oX2RA2JxoXdJn/vMYj1r1infus+3bVKmbHvU41zKj5sonaFgYRoD/FE4Cf0hpJvnyteyRPDlDtuiQkyPeOTySL7ITyD02n9G1sOoOmM8kAsAE5ES02VY713g5gqPJdGvjs2HcdrtpGgBqQNvcPICFXZpYmv3AVEYLcwHYTO23wSTV7FPJg875DyH7vb3jgwVappoK7NPvgIL2YWhtrXEVEvMXdECNtylU6cQf7IdBx5DMucxSDxW1XMfSIvMu2p/8qPz5qTJQSYkL7CoSDgFherKNBbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Z1ZKHthDUl3sESiNVTLINnWXQK/Nletqc90KcTUfO34=; b=BBH7Ev3ksAXOWdkeVAtqoKRqnCEufRVbXc8mxB6JZ2WQ+LWp2K6SuyzPDK+W9tKj0SRr8Xr9IY8LLwgwheDe+g3vQitJXCBiBlcrq6UNhD5cSYWTrFl0wlnG9F4ALWxnko2icq6hP1twjXWaMBtRIppIKLJRdBLZFHvU4mKKTTYwfy4AqpeyQW03E5cEk6IbjaDuyS2+Y72s5QTHl88qIb+RGnUwVUOty8NR6elKAKkYHd76WB2dKDZpZcy75Buz/1OaGFsGi5UGvCEc4r3w3NgV+DPOJMKvHPBwxt15Ruus174FHJco7jOwxy1VWiLqL6mbtwWwyFvwC3vHfAZOTQ== Received: from BN9P222CA0028.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::33) by PH7PR12MB8594.namprd12.prod.outlook.com (2603:10b6:510:1b3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Mon, 4 Mar 2024 09:57:10 +0000 Received: from BN1PEPF00004688.namprd05.prod.outlook.com (2603:10b6:408:10c:cafe::16) by BN9P222CA0028.outlook.office365.com (2603:10b6:408:10c::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38 via Frontend Transport; Mon, 4 Mar 2024 09:57:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN1PEPF00004688.mail.protection.outlook.com (10.167.243.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Mon, 4 Mar 2024 09:57:09 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 4 Mar 2024 01:56:57 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 4 Mar 2024 01:56:55 -0800 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 5/6] selftests: forwarding: Make VXLAN ECN encap tests more robust Date: Mon, 4 Mar 2024 11:56:11 +0200 Message-ID: <20240304095612.462900-6-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304095612.462900-1-idosch@nvidia.com> References: <20240304095612.462900-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004688:EE_|PH7PR12MB8594:EE_ X-MS-Office365-Filtering-Correlation-Id: 28b856db-4c17-46a0-70e9-08dc3c31753d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EdkcDE7HRaDsgOgzTahX4Xk2be56Wfe996axQGUjfJIDi14SAXqh9qAzhBQdDlz5dPyiBDe9sPnq6cWWWz0dTRowLBnJM0FwaV+qgV4SmtLRuFK3I+qZFTXSFT6DTlo6eBtAeK6eoUFlzJXL8ZPbcN8lVQGlQbB/tD7GDB43oc3i00qlow/epdrrWr0tA5SfkWK3sUDy695j2hhgNMFMxmwBli5YgbxOlgtOmhrliYrjMKCQzdZ7m+qCucY2xGhOBF17FDYps1YOcZ5FmFu9iBxzOv+rBPENFlTVOhTmXhbCvDwBORSiqnJmLUl6dNoh5rrodLGX32Q/Vrv6/aDOV4LTJJFQ1FWCcpjlohs0Cg5vZR3iHOvlTdb7hXFKy1mAn436c/xxnNjEUV+MZSi7k45NTHIXWdjvtZnGpx7Mm9z38VEJ8Y3YoXMeByTKyYoedKxMjeDlk9qIz4ilDNS7Y4lmfHh0E0QWf8Uoy93iXwHjQCZZpguj31vQ2xT04HnVIS6ots9N+I1H4BKXDhlG1hvw5/kKJGAIsHYt2l+tmhU6h/RXcONB14RKID68Cfl33TQu382Pm5hwcsUpjUfr+dXs5CYfTj41I1pOnwmg8fk666/337o2/XFKP3J4K3DtHJ0Vub4HE5UTtEpsGx/rSGMx7L3jEiZxrroRcdRJ7NE5AMcKaLHZ6qASGZR3uH9u4tW0koq4C/+vvwO+B307dIXh/v6mZQeH/y9+RzQq7UtF8nfVvhfBQgl3nyPvFMc6 X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(82310400014)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 09:57:09.5761 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 28b856db-4c17-46a0-70e9-08dc3c31753d X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004688.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8594 X-Patchwork-Delegate: kuba@kernel.org These tests sometimes fail on the netdev CI because the expected number of packets is larger than expected [1]. Make the tests more robust by specifically matching on VXLAN encapsulated packets and allowing up to five stray packets instead of just two. [1] [...] # TEST: VXLAN: ECN encap: 0x00->0x00 [FAIL] # v1: Expected to capture 10 packets, got 13. # TEST: VXLAN: ECN encap: 0x01->0x01 [ OK ] # TEST: VXLAN: ECN encap: 0x02->0x02 [ OK ] # TEST: VXLAN: ECN encap: 0x03->0x02 [ OK ] [...] Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh | 4 ++-- .../testing/selftests/net/forwarding/vxlan_bridge_1d_ipv6.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh index eb307ca37bfa..6f0a2e452ba1 100755 --- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d.sh @@ -495,7 +495,7 @@ vxlan_ping_test() local delta=$((t1 - t0)) # Tolerate a couple stray extra packets. - ((expect <= delta && delta <= expect + 2)) + ((expect <= delta && delta <= expect + 5)) check_err $? "$capture_dev: Expected to capture $expect packets, got $delta." } @@ -532,7 +532,7 @@ __test_ecn_encap() RET=0 tc filter add dev v1 egress pref 77 prot ip \ - flower ip_tos $tos action pass + flower ip_tos $tos ip_proto udp dst_port $VXPORT action pass sleep 1 vxlan_ping_test $h1 192.0.2.3 "-Q $q" v1 egress 77 10 tc filter del dev v1 egress pref 77 prot ip diff --git a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d_ipv6.sh b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d_ipv6.sh index ac97f07e5ce8..a0bb4524e1e9 100755 --- a/tools/testing/selftests/net/forwarding/vxlan_bridge_1d_ipv6.sh +++ b/tools/testing/selftests/net/forwarding/vxlan_bridge_1d_ipv6.sh @@ -616,7 +616,7 @@ vxlan_ping_test() local delta=$((t1 - t0)) # Tolerate a couple stray extra packets. - ((expect <= delta && delta <= expect + 2)) + ((expect <= delta && delta <= expect + 5)) check_err $? "$capture_dev: Expected to capture $expect packets, got $delta." } @@ -653,7 +653,7 @@ __test_ecn_encap() RET=0 tc filter add dev v1 egress pref 77 protocol ipv6 \ - flower ip_tos $tos action pass + flower ip_tos $tos ip_proto udp dst_port $VXPORT action pass sleep 1 vxlan_ping_test $h1 2001:db8:1::3 "-Q $q" v1 egress 77 10 tc filter del dev v1 egress pref 77 protocol ipv6 From patchwork Mon Mar 4 09:56:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13580333 X-Patchwork-Delegate: kuba@kernel.org Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2077.outbound.protection.outlook.com [40.107.93.77]) (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 C443623754 for ; Mon, 4 Mar 2024 09:57:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546238; cv=fail; b=c1Pr+f0fAeEgrHlVvJAJPcfTRaohJAcEkHtSWea58J1lRYQqFu/5+8jKlWTB38C9TXB4ggEx/1U1l4loCMtBINf9zB3ncxgBjCQHBzm/MkpuPxuMrOEUVt2h/BiU7kBkV7NQ/5kdtxG0my5sHl3dB40vVTEzj8GLTayEab5yhyA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709546238; c=relaxed/simple; bh=3iNnPdHTnHEct85SkB1EKKSPDnTe4So7OKD6vpdFbk8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JrO2PlL+w6G5/VbiL2Mr5fLtGeNqBuVeulZB5qdWwSlA27rQ9uogvWyinuovlZfphZ9hayxQ5wWZpVC0GbK+LcOvHiGCYSEKLhBdvAv5C2s/14Jr5cf0BI6Xqra0OISxEHTgfC82RNtDxTksqwvJU57392pyKGkgFZMHnnXplwY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=Cq6ejebC; arc=fail smtp.client-ip=40.107.93.77 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="Cq6ejebC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hDZuaAhJoXEjxjPsmrUK//MbYuqwMP7YVBzZfv4QA+58x+Z9+qwfbTDzO+fQAPRPxEw5S3Et6e0i/9BabXEIO/tokhsbkSOq2Igeqc6nj6BThg0ExUWxicjAwNhySMvVKHErqawUM4AnPJ0+HT/XiH276xkN6TID+oGA8uFvbC+jszwAbZSiT9KFfbPrkHym8ZUAqGkKOW4zLTSMmRcTQS66cDFFv4+KDU5ZUlEaEtffi0rfOlQILXPLej2oSgQjVwJbldQhOlqbilOwp4ljyuIckursSCzH7nYTF6Ei5zUlXAHWAw6Cc0Ta+jaGA9R/HgK/4Ms1VtHjGFQ5FdeO7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ynuWtYF6ZxJUyPuJDuLmFYuCHx5Ft4Lo3YUFFcK/QXM=; b=RVR4r5VHEMCtifhC7uws6olOIYzpwt0whMyvIPXD40qF1M+czuYYtcb5GSrYIwSblyE2SGo8GsNXOhq6xezHUBlXyStkCwzC+Bb1q5tlKUHuFAkhAqzn3d85zWrgcr93Nf+chWfs83JuINQ4lx8fNT51f3+1bCoAtssHAS9JDgLKOsSV4ntCZip74SAnI8N6iLLTkgxcpG2PDhpUs1KQJ/PhjOCJFBc8t3mTITFTecypUvXibIwp8JL54gCx2/TGQQvbsF0/E4jnafRTdfGmSQbBbuhbHdsCjUPsYYhQ1jCG5QpwygBSnHomhfj1ADHC6eFg5PyxdpUICPPy9iEOOQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ynuWtYF6ZxJUyPuJDuLmFYuCHx5Ft4Lo3YUFFcK/QXM=; b=Cq6ejebCP2YOHi4Q2/Q2PVy+azwh0xDozBJMTZxQolFcoEHNWRIoaP2K/ctWb7Rux9wJmrmWpdK5zfBaRhpbZT+GT+xECpA5gpi0VojSeWCXLfXZP0AaQWpanrWx22HXHy6muIHVamhP7hBC+BrUMOd5ZArJwHCD++KLZv86fCL63+4BKjd89+2/GNtnYOEQ3uwVr4FCDmiYCyzl3h/TFwGNjZ/XoB710QDiz1qhfpa3aKbH8nD45WV/x5gxrITyKXKmfCjVWNJu+OsejVDSzCvv2WAR07GJl3+rZfPSpsrGI13+YyTs7WF04XJFPZKe4EJPXVdi+GkTMvK8LGkQNg== Received: from BN9P222CA0022.NAMP222.PROD.OUTLOOK.COM (2603:10b6:408:10c::27) by PH7PR12MB7020.namprd12.prod.outlook.com (2603:10b6:510:1ba::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Mon, 4 Mar 2024 09:57:13 +0000 Received: from BN1PEPF00004688.namprd05.prod.outlook.com (2603:10b6:408:10c:cafe::fd) by BN9P222CA0022.outlook.office365.com (2603:10b6:408:10c::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Mon, 4 Mar 2024 09:57:12 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BN1PEPF00004688.mail.protection.outlook.com (10.167.243.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Mon, 4 Mar 2024 09:57:12 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Mon, 4 Mar 2024 01:57:00 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Mon, 4 Mar 2024 01:56:58 -0800 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net-next 6/6] selftests: forwarding: Make {, ip6}gre-inner-v6-multipath tests more robust Date: Mon, 4 Mar 2024 11:56:12 +0200 Message-ID: <20240304095612.462900-7-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240304095612.462900-1-idosch@nvidia.com> References: <20240304095612.462900-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004688:EE_|PH7PR12MB7020:EE_ X-MS-Office365-Filtering-Correlation-Id: f27ae159-fdc5-49ff-e4dd-08dc3c317717 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: j9kbqONs0sBaqOqXXpVMxgcrgm6RQ51T0qAgs4Eew5+z6Jk3OGaAG49ro4QAzLw5m/kjx+Pwu8gkujpA2QGFm+HINtRQUmdcYY1l816XgiBnpk68wolijMosmv3MHMhzwnCO2QfMU5WdcSyBsPy0BypKKYAztU8dQIMPyNZlDgvof/vLIW46VVnujNIBrxBqss2LLJJmGybtdUvDLfm8Vjrpq1iLwwJ1zByO7mNcoFnv29VegNpObPteGroqCaZ86nvsCyEHRhRNs5oSEkvJwKcZBlYXV/1UxpZ88VZZhniPpRIZMjWg6h+tBewFUwt5Nevb2go6OKhJUU9XSBPj5782g38FI2zbh3ygdh+7V83pPSYWuZbtCwNNHOisfwGfv/QonTtTpiA9f8VaCT0hjhbaRQVIwYJoFRdfwtHbXDKii0ozDn+PJxtpq+nwHKipqV1z5nLlMLEilXVooslcMVS9/U3MsA7jX8V6jPtYBCHcNplfVwSyQM1OT+94lsT1FxtM88u1EaWoanqCzuKuIYuearJbiNhlSPrKK8/D2l8LRUlKYvANfOajewg1i4n3ynwqHZO7Rxle14ndaLlL59c3r0bnYxdIFUyooGaJs9lWYVpqhVfEjkitlkiG/G7S5+G/c29g/7OkBTj6rMsoB7lS/lYLgbd4YIG3l1mZwtTYa0jn7rVUBJ+06kd8cBkBy4wt9lnYNdg/dJUQjlWwZn7hoHvE6HH3nAL8j8tl3biMXAGn6gZqGOpO7ivc4gHv X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(376005)(82310400014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Mar 2024 09:57:12.6855 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f27ae159-fdc5-49ff-e4dd-08dc3c317717 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN1PEPF00004688.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7020 X-Patchwork-Delegate: kuba@kernel.org These tests generate various IPv6 flows, encapsulate them in GRE packets and check that the encapsulated packets are distributed between the available nexthops according to the configured weights. Unlike the corresponding IPv4 tests, these tests sometimes fail in the netdev CI because of large discrepancies between the expected and measured ratios [1]. This can be explained by the fact that the IPv4 tests generate about 3,600 different flows whereas the IPv6 tests only generate about 784 different flows (potentially by mistake). Fix by aligning the IPv6 tests to the IPv4 ones and increase the number of generated flows. [1] [...] # TEST: ping [ OK ] # INFO: Running IPv6 over GRE over IPv4 multipath tests # TEST: ECMP [FAIL] # Too large discrepancy between expected and measured ratios # INFO: Expected ratio 1.00 Measured ratio 1.18 [...] Signed-off-by: Ido Schimmel --- .../selftests/net/forwarding/gre_inner_v6_multipath.sh | 4 ++-- .../selftests/net/forwarding/ip6gre_inner_v6_multipath.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh b/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh index e5e911ce1562..a71ad39fc0c3 100755 --- a/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh +++ b/tools/testing/selftests/net/forwarding/gre_inner_v6_multipath.sh @@ -266,8 +266,8 @@ multipath6_test() local t0_222=$(tc_rule_stats_get $ul32 222 ingress) ip vrf exec v$h1 \ - $MZ $h1 -6 -q -p 64 -A "2001:db8:1::2-2001:db8:1::1e" \ - -B "2001:db8:2::2-2001:db8:2::1e" \ + $MZ $h1 -6 -q -p 64 -A "2001:db8:1::2-2001:db8:1::3e" \ + -B "2001:db8:2::2-2001:db8:2::3e" \ -d $MZ_DELAY -c 50 -t udp "sp=1024,dp=1024" sleep 1 diff --git a/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh b/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh index eb4e50df5337..e1a4b50505f5 100755 --- a/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh +++ b/tools/testing/selftests/net/forwarding/ip6gre_inner_v6_multipath.sh @@ -265,8 +265,8 @@ multipath6_test() local t0_222=$(tc_rule_stats_get $ul32 222 ingress) ip vrf exec v$h1 \ - $MZ $h1 -6 -q -p 64 -A "2001:db8:1::2-2001:db8:1::1e" \ - -B "2001:db8:2::2-2001:db8:2::1e" \ + $MZ $h1 -6 -q -p 64 -A "2001:db8:1::2-2001:db8:1::3e" \ + -B "2001:db8:2::2-2001:db8:2::3e" \ -d $MZ_DELAY -c 50 -t udp "sp=1024,dp=1024" sleep 1