From patchwork Thu Jun 27 14:48:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 808018 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2082.outbound.protection.outlook.com [40.107.94.82]) (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 C47C5819; Thu, 27 Jun 2024 14:49:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.82 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499793; cv=fail; b=p+hHHUUc5CJMEh+8MA+SPYsEadX3O4dOSKRjfL28O3MbfRJmXqpKWFI+fQ1OtSEHz8gv+x1gunBb3KTltCDBQp5KIUoJdGBPicWTDW7eDW1Cwox8JREIvXP2t6WfznuQetyS3+hB+Q3dXUCM8QtTixP22zxpeo+y6a8NL51GAug= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499793; c=relaxed/simple; bh=HttYceEmGB0RHPsT/MOScZEBJs8TMMmL19YUUXGXqYw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OHq3Sjzo/VtgJzVBgMUWeoSiquKmwICVk1pF9SHrSsgYtqcCoWjZrL/EsnHByEEN5rBq2mBNDLovJbHDtYqfDC7+SiKbsRpRhgN8KFfSsro9DNxxlDvIrNbSWqo4rUQsIQ0zkoNHCFVLjFmkv4AWgM4ql+ku82z0hmRbK23lWxE= 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=mM+V40o6; arc=fail smtp.client-ip=40.107.94.82 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="mM+V40o6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jzGlehJV7ezBwJDnfsQt46o+mt4E5L1OdSbkHF4NZGIJfIjLRxtboLXDEV9Y4MdASr1/HBe3FYqPG2LifWckTJp2iJfNNcC1rAjlQ79oZzeUnw3eWO+IDJGh4M05sMvtAOqF8FyWI1ocjoNE8Oh8mVcsqkhik5tEq0YGTMHoNnMWKxsbHvnFycCm9AiJ0tzak+B1vC4AtnAXyq2Ag02c3h3hNxsIB3eKON0gA8sOcyUCy/k8K3q3bVNohJNnql9QUTjb+GGoefeHd9g57VL6fZeKs2MBKPz8a514w3C6Pu7EMGQwt3gMix4zPOYcVdojoQdrY0XXptvlIIeVFAV2bA== 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=p1sliNlEGVsslmGaGwS9pzD6PsTx9kUstHmpLC41xRk=; b=ivrdzsrBTlcUgrBFKyY31h8whqhlJmFEP2ceX83PKXf9HBfuiijwh5zvLbHcEesWwRIFHOwNlPp6oabca+zvLim04yP48JQKMp380wGa0BIpdlyq32vsdP2e/lLNStV1HDE1fhP6vIMV5HvvckSCNwsIkjEa1wD+qreXu2PFGJt2zUk8IHrFRUAWOh6DKk7RLfllv3LoByuTjvDyrivz5SXVYhNwFfxMvgUWgkIdVA2nVtOXJ8289X73wHMcZKoO9xqDgURyouXXXTr52ebukM3df+Ktac7pYRlgg/AOeJsGDWs/cDEp4B+971UBd5I1NCrXcvbijslNtbuhD0fP3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net 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=p1sliNlEGVsslmGaGwS9pzD6PsTx9kUstHmpLC41xRk=; b=mM+V40o6Wfv4drAkJLZNY4HSPKmCp35R9yG1db+RiAVogO1N+pS9gANqEKKfbAUwvTdOSnak+4NvARgFyIzmi+GBZNJ8g0CW0PiuBxfJVLvXT65oBSfTnMUjH/30A/+jVf+Z38HzrG3f+uij/fBWua4pIPbecvZzcPQfIZZwwF9d+ZiQiaKffkxyYOy1HiZTWSuIWxEWgFK1HGikJ1NUydNFKCTtYOHeLiSqeAihKYOxrZlPlP5iTmGDx1IGoOKMnKPKBEFMGtVZ3WwMy42kq53nTiHQMC7E+hL1j/S4qlda+FRzwcFMCdgAGO8wWZ9hmO3S/8mnLYydOoueCvDW0Q== Received: from CH0PR04CA0057.namprd04.prod.outlook.com (2603:10b6:610:77::32) by SA1PR12MB6917.namprd12.prod.outlook.com (2603:10b6:806:24c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.32; Thu, 27 Jun 2024 14:49:48 +0000 Received: from DS3PEPF000099DC.namprd04.prod.outlook.com (2603:10b6:610:77:cafe::b1) by CH0PR04CA0057.outlook.office365.com (2603:10b6:610:77::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.26 via Frontend Transport; Thu, 27 Jun 2024 14:49:47 +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 DS3PEPF000099DC.mail.protection.outlook.com (10.167.17.198) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 27 Jun 2024 14:49:47 +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.1544.4; Thu, 27 Jun 2024 07:49:30 -0700 Received: from yaviefel.mtl.com (10.126.231.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.1544.4; Thu, 27 Jun 2024 07:49:24 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Danielle Ratson , Petr Machata , Ido Schimmel , Hangbin Liu , Benjamin Poirier , Shuah Khan , , Simon Horman , Subject: [PATCH net-next 01/12] selftests: libs: Expand "$@" where possible Date: Thu, 27 Jun 2024 16:48:38 +0200 Message-ID: <0072d6f7b0c128f9f12b3770a0a5ed3c20b0f17f.1719497773.git.petrm@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF000099DC:EE_|SA1PR12MB6917:EE_ X-MS-Office365-Filtering-Correlation-Id: bea1ebc6-13af-4014-8bfd-08dc96b863c1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: Ir3mHGsF7khEZNxG9dt+6oBvRZW132txjx0q8Aypbwaz+0hzB8+ZH3lHt3ZmryimaitSpG/qSaKoNBIj0mx4srTF7waP19JDmWabHE9/akfUoVlzK2WDnh6pIlTSr8f6IUsfFwqpQoj1PW9Pq/XEOes9+065a+AqwpDFFDRoWVNiJjEx/5QBQnI6YqqNFVzFR8ot5qMC2pH3Xb4UD6VLeBqBeCPxfBWVw3WesSO+a7xgok1fH68MO8xFu8naqsRAYqHlTdEO9lEbjarA0v3wnDa/932VWdsooX0Tc+DI4VB/WCAB76XOQLLJDx2BCvibQNDGI5suUgfGrN2r1Vh1r5E5JUnY3ychnqgIOGsR83VqFi+ajbq5MLEX0XzplnOf7xZHNikiWLLemwUq5wVNBN67w3UrOqGig0lTlMyrU77YlfA477ixPs6MX/b4g3V67LZLZI4TP0HbqaCzQxt7Gxjhw6OKANFSpzl2dHnWcX0bgAnod7+SfAwW8lcEaA4tfj2Kpuq9NnqtVvKdrM1oIz37prcS2pRuu2KNT9A0+C1E8280PC2bK+mtmv/JrxC+58EeuARF5XPtS33+LRJbyGs7Sms7SNM7jyj3pLAX0xNgf25TMAg76d3rVrVQH3weuiaMrqT+6bLOMqTyZnWObUaaqHDcgWY7ZlV3IIyVnoKh2ibv5/imSUL0MMYgwTfyJ2MBjTuLsg9GA7/qKalHeJyGCJ2GFSePoAE+IbauxgyLbgxe7LVo/DoawwaH1xl29aaCIqbfncno4rEYvpv5ckMHunOqX5Nal3tK4NxcgXjmYXjinWwlqqtP40w90uxBLazEdWx4N1counVYN4wKMLbteXwlyhu/5TipAlhxF+aLu3UK9an0dO2MhOTSU0QjRsMq+MxUivvAPxaIboZWiteQMQwNZDelsQsrWejOXH93DFeb2fpBp51jQZ9At+ulAFJ+6elA4Vx4aSkt/e42mI0xYN97mDTHAsp2wJgilHnjR0A7c1GilBWunxoglk0ZMmvg4clbBh28hX4eIfL1rLYHi2DvbVfujQV6ZQzBLU5QgWPagNmXsuhfNwF8FYTUVU9FHStndPtwXi6m2Zzwgo4nLueo7/jD+tXS6fUCUNaG5ueaxyjaxvUOg0EEDNfNlzx2wnH4UzwpKh/piG8XhdORx2uOxBkWTh3qmk8aMUf9iADf30iIsiOTeRIxtAjXh2Lgnn078fqv4T7s25mQ/EzZuOIiJAKZWDa3czV7iKdtZjp34zNhB8PlEmdFj3B75evHkOwE9X8p2sayH/vYYT1C97BFKp1OAaervCJnmXDB8ALjlKg4tqEUSG4pOYdP8A5HTGCRvJFSzVLpRT/a4fmtyQZoWe9Zo8KHUCePLb1YfCtU4lcz7hLxFqMUyEkPKIdJ1xZCbOBr9SBabbXDb6lyY1Z0RSWK8tHhnv8Nh+m4Svl5K7flgkl0F5HZuNjU 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:(13230040)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 14:49:47.0295 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bea1ebc6-13af-4014-8bfd-08dc96b863c1 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: DS3PEPF000099DC.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6917 In some functions, argument-forwarding through "$@" without listing the individual arguments explicitly is fundamental to the operation of a function. E.g. xfail_on_veth() should be able to run various tests in the fail-to-xfail regime, and usage of "$@" is appropriate as an abstraction mechanism. For functions such as simple_if_init(), $@ is a handy way to pass an array. In other functions, it's merely a mechanism to save some typing, which however ends up obscuring the real arguments and makes life hard for those that end up reading the code. This patch adds some of the implicit function arguments and correspondingly expands $@'s. In several cases this will come in handy as following patches adjust the parameter lists. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson --- tools/testing/selftests/net/forwarding/lib.sh | 67 ++++++++++++++++--- .../net/forwarding/mirror_gre_flower.sh | 13 +++- .../net/forwarding/mirror_gre_lib.sh | 63 ++++++++++++++--- .../selftests/net/forwarding/mirror_lib.sh | 63 ++++++++++++++--- 4 files changed, 176 insertions(+), 30 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 9086d2015296..df7cacb29160 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1257,22 +1257,34 @@ __icmp_capture_add_del() icmp_capture_install() { - __icmp_capture_add_del add 100 "" "$@" + local tundev=$1; shift + local filter=$1; shift + + __icmp_capture_add_del add 100 "" "$tundev" "$filter" } icmp_capture_uninstall() { - __icmp_capture_add_del del 100 "" "$@" + local tundev=$1; shift + local filter=$1; shift + + __icmp_capture_add_del del 100 "" "$tundev" "$filter" } icmp6_capture_install() { - __icmp_capture_add_del add 100 v6 "$@" + local tundev=$1; shift + local filter=$1; shift + + __icmp_capture_add_del add 100 v6 "$tundev" "$filter" } icmp6_capture_uninstall() { - __icmp_capture_add_del del 100 v6 "$@" + local tundev=$1; shift + local filter=$1; shift + + __icmp_capture_add_del del 100 v6 "$tundev" "$filter" } __vlan_capture_add_del() @@ -1290,12 +1302,18 @@ __vlan_capture_add_del() vlan_capture_install() { - __vlan_capture_add_del add 100 "$@" + local dev=$1; shift + local filter=$1; shift + + __vlan_capture_add_del add 100 "$dev" "$filter" } vlan_capture_uninstall() { - __vlan_capture_add_del del 100 "$@" + local dev=$1; shift + local filter=$1; shift + + __vlan_capture_add_del del 100 "$dev" "$filter" } __dscp_capture_add_del() @@ -1655,34 +1673,61 @@ __start_traffic() local sip=$1; shift local dip=$1; shift local dmac=$1; shift + local -a mz_args=("$@") $MZ $h_in -p $pktsize -A $sip -B $dip -c 0 \ - -a own -b $dmac -t "$proto" -q "$@" & + -a own -b $dmac -t "$proto" -q "${mz_args[@]}" & sleep 1 } start_traffic_pktsize() { local pktsize=$1; shift + local h_in=$1; shift + local sip=$1; shift + local dip=$1; shift + local dmac=$1; shift + local -a mz_args=("$@") - __start_traffic $pktsize udp "$@" + __start_traffic $pktsize udp "$h_in" "$sip" "$dip" "$dmac" \ + "${mz_args[@]}" } start_tcp_traffic_pktsize() { local pktsize=$1; shift + local h_in=$1; shift + local sip=$1; shift + local dip=$1; shift + local dmac=$1; shift + local -a mz_args=("$@") - __start_traffic $pktsize tcp "$@" + __start_traffic $pktsize tcp "$h_in" "$sip" "$dip" "$dmac" \ + "${mz_args[@]}" } start_traffic() { - start_traffic_pktsize 8000 "$@" + local h_in=$1; shift + local sip=$1; shift + local dip=$1; shift + local dmac=$1; shift + local -a mz_args=("$@") + + start_traffic_pktsize 8000 "$h_in" "$sip" "$dip" "$dmac" \ + "${mz_args[@]}" } start_tcp_traffic() { - start_tcp_traffic_pktsize 8000 "$@" + local h_in=$1; shift + local sip=$1; shift + local dip=$1; shift + local dmac=$1; shift + local -a mz_args=("$@") + + start_tcp_traffic_pktsize 8000 "$h_in" "$sip" "$dip" "$dmac" \ + "${mz_args[@]}" } stop_traffic() diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh b/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh index 09389f3b9369..6efdd944f59f 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh @@ -64,12 +64,21 @@ cleanup() test_span_gre_dir_acl() { - test_span_gre_dir_ips "$@" 192.0.2.3 192.0.2.4 + local tundev=$1; shift + local direction=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift + + test_span_gre_dir_ips "$tundev" "$direction" "$forward_type" \ + "$backward_type" 192.0.2.3 192.0.2.4 } fail_test_span_gre_dir_acl() { - fail_test_span_gre_dir_ips "$@" 192.0.2.3 192.0.2.4 + local tundev=$1; shift + local direction=$1; shift + + fail_test_span_gre_dir_ips "$tundev" "$direction" 192.0.2.3 192.0.2.4 } full_test_span_gre_dir_acl() diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh index 0c36546e131e..da2fd028e2e3 100644 --- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh @@ -5,22 +5,34 @@ source "$net_forwarding_dir/mirror_lib.sh" quick_test_span_gre_dir_ips() { local tundev=$1; shift + local direction=$1; shift + local ip1=$1; shift + local ip2=$1; shift - do_test_span_dir_ips 10 h3-$tundev "$@" + do_test_span_dir_ips 10 h3-$tundev "$direction" "$ip1" "$ip2" } fail_test_span_gre_dir_ips() { local tundev=$1; shift + local direction=$1; shift + local ip1=$1; shift + local ip2=$1; shift - do_test_span_dir_ips 0 h3-$tundev "$@" + do_test_span_dir_ips 0 h3-$tundev "$direction" "$ip1" "$ip2" } test_span_gre_dir_ips() { local tundev=$1; shift + local direction=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift + local ip1=$1; shift + local ip2=$1; shift - test_span_dir_ips h3-$tundev "$@" + test_span_dir_ips h3-$tundev "$direction" "$forward_type" \ + "$backward_type" "$ip1" "$ip2" } full_test_span_gre_dir_ips() @@ -74,27 +86,55 @@ full_test_span_gre_dir_vlan_ips() quick_test_span_gre_dir() { - quick_test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 + local tundev=$1; shift + local direction=$1; shift + + quick_test_span_gre_dir_ips "$tundev" "$direction" 192.0.2.1 192.0.2.2 } fail_test_span_gre_dir() { - fail_test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 + local tundev=$1; shift + local direction=$1; shift + + fail_test_span_gre_dir_ips "$tundev" "$direction" 192.0.2.1 192.0.2.2 } test_span_gre_dir() { - test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 + local tundev=$1; shift + local direction=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift + + test_span_gre_dir_ips "$tundev" "$direction" "$forward_type" \ + "$backward_type" 192.0.2.1 192.0.2.2 } full_test_span_gre_dir() { - full_test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 + local tundev=$1; shift + local direction=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift + local what=$1; shift + + full_test_span_gre_dir_ips "$tundev" "$direction" "$forward_type" \ + "$backward_type" "$what" 192.0.2.1 192.0.2.2 } full_test_span_gre_dir_vlan() { - full_test_span_gre_dir_vlan_ips "$@" 192.0.2.1 192.0.2.2 + local tundev=$1; shift + local direction=$1; shift + local vlan_match=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift + local what=$1; shift + + full_test_span_gre_dir_vlan_ips "$tundev" "$direction" "$vlan_match" \ + "$forward_type" "$backward_type" \ + "$what" 192.0.2.1 192.0.2.2 } full_test_span_gre_stp_ips() @@ -126,5 +166,10 @@ full_test_span_gre_stp_ips() full_test_span_gre_stp() { - full_test_span_gre_stp_ips "$@" 192.0.2.1 192.0.2.2 + local tundev=$1; shift + local nbpdev=$1; shift + local what=$1; shift + + full_test_span_gre_stp_ips "$tundev" "$nbpdev" "$what" \ + 192.0.2.1 192.0.2.2 } diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh index 3e8ebeff3019..b5b0a6545d75 100644 --- a/tools/testing/selftests/net/forwarding/mirror_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh @@ -71,12 +71,22 @@ do_test_span_dir_ips() quick_test_span_dir_ips() { - do_test_span_dir_ips 10 "$@" + local dev=$1; shift + local direction=$1; shift + local ip1=$1; shift + local ip2=$1; shift + + do_test_span_dir_ips 10 "$dev" "$direction" "$ip1" "$ip2" } fail_test_span_dir_ips() { - do_test_span_dir_ips 0 "$@" + local dev=$1; shift + local direction=$1; shift + local ip1=$1; shift + local ip2=$1; shift + + do_test_span_dir_ips 0 "$dev" "$direction" "$ip1" "$ip2" } test_span_dir_ips() @@ -101,12 +111,21 @@ test_span_dir_ips() fail_test_span_dir() { - fail_test_span_dir_ips "$@" 192.0.2.1 192.0.2.2 + local dev=$1; shift + local direction=$1; shift + + fail_test_span_dir_ips "$dev" "$direction" 192.0.2.1 192.0.2.2 } test_span_dir() { - test_span_dir_ips "$@" 192.0.2.1 192.0.2.2 + local dev=$1; shift + local direction=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift + + test_span_dir_ips "$dev" "$direction" "$forward_type" "$backward_type" \ + 192.0.2.1 192.0.2.2 } do_test_span_vlan_dir_ips() @@ -130,20 +149,48 @@ do_test_span_vlan_dir_ips() quick_test_span_vlan_dir_ips() { - do_test_span_vlan_dir_ips 10 "$@" + local dev=$1; shift + local vid=$1; shift + local direction=$1; shift + local ul_proto=$1; shift + local ip1=$1; shift + local ip2=$1; shift + + do_test_span_vlan_dir_ips 10 "$dev" "$vid" "$direction" "$ul_proto" \ + "$ip1" "$ip2" } fail_test_span_vlan_dir_ips() { - do_test_span_vlan_dir_ips 0 "$@" + local dev=$1; shift + local vid=$1; shift + local direction=$1; shift + local ul_proto=$1; shift + local ip1=$1; shift + local ip2=$1; shift + + do_test_span_vlan_dir_ips 0 "$dev" "$vid" "$direction" "$ul_proto" \ + "$ip1" "$ip2" } quick_test_span_vlan_dir() { - quick_test_span_vlan_dir_ips "$@" 192.0.2.1 192.0.2.2 + local dev=$1; shift + local vid=$1; shift + local direction=$1; shift + local ul_proto=$1; shift + + quick_test_span_vlan_dir_ips "$dev" "$vid" "$direction" "$ul_proto" \ + 192.0.2.1 192.0.2.2 } fail_test_span_vlan_dir() { - fail_test_span_vlan_dir_ips "$@" 192.0.2.1 192.0.2.2 + local dev=$1; shift + local vid=$1; shift + local direction=$1; shift + local ul_proto=$1; shift + + fail_test_span_vlan_dir_ips "$dev" "$vid" "$direction" "$ul_proto" \ + 192.0.2.1 192.0.2.2 } From patchwork Thu Jun 27 14:48:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 808017 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2045.outbound.protection.outlook.com [40.107.94.45]) (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 C9A8D198828; Thu, 27 Jun 2024 14:50:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499807; cv=fail; b=r5D87bA7FafxI8lUMfc2I/xbXj7VIfzdjp6zRfDlQakhxuIYuBjgoXneOzAfEXgWD/E8+m4rSWp8P2GcPTRKLOQcT8SsrfMJlf2lFjfWWtJKpXjipW22SMlIOBwhHvUc9aMtvKXaNO3h8rqfX2Y4gJQjvRUqLxZkaFLec25/OVo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499807; c=relaxed/simple; bh=1BjHwPmL8fvoM1tpzSt8+Bto1/LmiGAQK3d8DndtU48=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DV+eF2VotIK9NC62STFIlhtyDziqJU/R30B9KQU/17OjDD/QUpfdPPrhOkub5435ClBHytUuTxA8m3V22TznLTbOBGgdq0HAWt5EEIauRL8KDrcg9f9BlfVUeK4SdpQlbw0RcVYkRrcWZqVvh9qU2Q64fQ9inx9OuAJ7fqInV64= 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=AwEpss1a; arc=fail smtp.client-ip=40.107.94.45 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="AwEpss1a" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sv5WlgiJoMoO5DWrum/FgbL2/awOWZCtkbgYcN8Rm3un1HnfmKumz6WkyWbNs0xKRloc0/uVfW2CGlAaz/xhohvQiZPNGex/ZPfLq/CVYlYHKlLU0MhE89L90RuvEEYL+hB0K/HlpN1/+/4dEyhyTw3CvQv46xmvFjNL/QeGVctFLEk5whNQKs1E3EdTTUiIjkp4Iuerg/RcoMho6pUY2MANMtcBgg+GmUNYWrus4Zkcx3fTszfDVgcod43t2KRA3hM0ZR6QHSmFBcTtdgdrx5rhXyOH55LLrOuhuH3eph4i3cSxvfNkcas+d7/qLf76iieNSoaG7+qZHkpHo3FyuA== 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=GZsLAkPU+gS/0LN29X3WN+YZg0pJDDg+8IDmqYdaPUk=; b=MTzutjGGceiIFIJNoNptKbudLUmae2E7WKFi+TOy9150BfJwN68vmq6CKqdc55WIaFVbJJkKLGQ4PzmU4t/BNXFj2as97QEQ/PhLAaPM+2+HRzfuHRitYJHaeG2sUJlORDnZ0CCGAuuqCg9i70EC1fIvkPn3skEyWxh7mtoH7+XacW5JevccCJOHCLJ7rilRIlS38+dDqkmyP2VNW18fkEvu4p8ptPzMyv+SUW5/WrVQgHJ8jlRK9GFRJMKiR53zv0BD52CI92CclK3cxFx/FPJKGs80qw+ni6nwobYR9xUUpWwNtp8FPzmwqiIIJLfHbNCwN/CeHrSKicKDxARXBQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=GZsLAkPU+gS/0LN29X3WN+YZg0pJDDg+8IDmqYdaPUk=; b=AwEpss1aedvq1UzQDZWIGFtfD5dHd1P3eEOC+r6Eaw5VGlXp6j7X0tlenqr66T6WqEkP4U//aGDeI39qJ9tr/84ajXfwCqtqZNgZ7ViVTZmOcF8hCt2iL5o13Xt0aJMhH+Cqbisg0fZDuyai94LBR3WKQBhqfk44G1nL8UpuQxt7lzvoCZ6BRLzaLIvr9bU3/Z6jW3ph7hg44Y9pGaq7zCa/22tSDbU3YvpVxUiICkwYsCdF6iE8sUFA1dQ5QxETXB5+IP+x+wqw7NX8f8jsAhc5BciqJoiD0rXrvhaKjXK5nXwF1ibM6aNuKQmd3Kw7h0RQ7zFVcRilVqxFMaRZTw== Received: from BY5PR16CA0029.namprd16.prod.outlook.com (2603:10b6:a03:1a0::42) by BL1PR12MB5946.namprd12.prod.outlook.com (2603:10b6:208:399::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.32; Thu, 27 Jun 2024 14:50:02 +0000 Received: from SJ1PEPF00002310.namprd03.prod.outlook.com (2603:10b6:a03:1a0:cafe::5b) by BY5PR16CA0029.outlook.office365.com (2603:10b6:a03:1a0::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.26 via Frontend Transport; Thu, 27 Jun 2024 14:50:01 +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 SJ1PEPF00002310.mail.protection.outlook.com (10.167.242.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 27 Jun 2024 14:50:01 +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.1544.4; Thu, 27 Jun 2024 07:49:48 -0700 Received: from yaviefel.mtl.com (10.126.231.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.1544.4; Thu, 27 Jun 2024 07:49:42 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Danielle Ratson , Petr Machata , Ido Schimmel , Hangbin Liu , Benjamin Poirier , Shuah Khan , , Simon Horman , Subject: [PATCH net-next 04/12] selftests: mirror_gre_lag_lacp: Check counters at tunnel Date: Thu, 27 Jun 2024 16:48:41 +0200 Message-ID: <06fbe94a8526cc770fa19bb30ade85c9534f1e8d.1719497773.git.petrm@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002310:EE_|BL1PR12MB5946:EE_ X-MS-Office365-Filtering-Correlation-Id: c1a84bc5-bdfc-4ff3-ba3b-08dc96b86c7b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: VrEcUz4Nbgcl//fUvnjrWy3hd8ZEAcG2/g+kfmZJ1SL/Ew/b9YPmbyuf2ta6QDPSYB/z6pY2/e5ib0PIBrzlllt+AyBQgFsnDkFmhm46yHpNO+AK+FFq7kieMgW9YVXfKK5EnTOCj9Zf/KBiaT3sZTnMOVrm96rfeeqKi9OaWcEHLCdB+LTmo+k2R7Iu65FrfA4fMTZoIm3YHpjVjcY87Cf87G4/J26HR5beUK1Lz5uMUemJsxuQVAz2PEISLi6yRjSzVUh3P2qeNiukMAjtzbgRN2n5QoS4L4kj+Cm2j7f714VK3dEBPd3CaFgGMvOe4IOD2kuzGHXxrk7nsj5uSfDu9u2Tg/OHmep02zsYgEJyAb05fPZTz0LdCLaa3jnyJ0eUYxASIm9VfWsxE2bpDdN4nHb3ckFzJ5TlzTCUu2cT6m23GqP0Bgn3mEgP+8bjW/B6Ir69IbHD7JGh1QNw440I9ZIBBWqT3EMOMI0ZlcsznO48WDQhsjnbcGWZVnvkqmZGFkJpnX239lFqLqSvqG+vjGgPSEMigXSIb+YNDDvuDWXPV7bMmNJ9ovcn/Ua9/f5yskVyt/yXezcp7v5K+xayMn3sAaSR/117MrFS6aT7nR8HuTbN8tCzIv9mgVh5wUFmBAv945O5sCdDSvcAF/3lpAX5cgrdVRdhrx4s/5Q4Zo7A8VIbWWaQPs8OFSGDn3yXy0dNZ1lCYqm34Dt4slTP3z0BkSIzd5obGPRjsFPUCW1Ucc778BcFifwgMoExqOQwZ1wKFKuI4RyEcFnV4PQOt3gUK8GkaUl4HXLGrLqofIUSF6kF+PAILtedBSEH11C8BO/iJIoszaAQCKF0O7xPkwU7qys78DKxq8WUZ4cEdugwDdSGwbjlbTQR/exOwS+MadVKEuJ9pfj2gsJThDa6DRzynNKG0yB5/uLQAxuJHqTgPzROoZu6HNag8Gewy62vG43c5B1jn1SRWYsiK7SGDE/83RtOO3yldRF/qFml82TYjCLAq6nCOSaS1ds0GHzked2Xnjmz14ekXxL5ncw4fWv/d42jALW6MHCtXrFkKPAweqvxJXiczE2ocXlwXenqjHjLjL7m+LBc00ckwIHXLHD+VA8EjrPvbEEaO/Q48TmWCf1jlmq81nqXDd3YMNlErwB5BB4FUpyPGDMfbVB6adczSGcR5i1zi/avBs3MvbpcjF/m3ahSBxYVxDeIuotzsXJ0RG7jsBqNRk1XhgslJ+cYFSjE6gEpKc5tl/1Bgwm9Ixksc29rGd4srLdmZBfBr0YN0wmfiX6jXgadpmJtqzP9GlM59jMRV1Q6mfNTTGRMQfEzNY4gajLKrfZy/WnajkPY6qxQcYzsXOzeQ2ict79DSyWIQU8QkRBS2/Qt8SDkLSdZzKg8DMXKzzWz4bLbqC6IusgwJiXty9mDmlMFWEtjVvNin7DoG2XxIjTgvg643kljrNUvUEnY6Gi8 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:(13230040)(1800799024)(82310400026)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 14:50:01.7808 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1a84bc5-bdfc-4ff3-ba3b-08dc96b86c7b 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: SJ1PEPF00002310.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5946 The test works by sending packets through a tunnel, whence they are forwarded to a LAG. One of the LAG children is removed from the LAG prior to the exercise, and the test then counts how many packets pass through the other one. The issue with this is that it counts all packets, not just the encapsulated ones. So instead add a second gretap endpoint to receive the sent packets, and check reception counters there. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson --- .../net/forwarding/mirror_gre_lag_lacp.sh | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh index 9edf4cb104a8..f521648682bf 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh @@ -37,8 +37,14 @@ # | \ / | # | \____________________________________________/ | # | | | -# | + lag2 (team) | -# | 192.0.2.130/28 | +# | + lag2 (team) ------> + gt4-dst (gretap) | +# | 192.0.2.130/28 loc=192.0.2.130 | +# | rem=192.0.2.129 | +# | ttl=100 | +# | tos=inherit | +# | | +# | | +# | | # | | # +---------------------------------------------------------------------------+ @@ -122,16 +128,21 @@ h3_create() { vrf_create vrf-h3 ip link set dev vrf-h3 up - tc qdisc add dev $h3 clsact - tc qdisc add dev $h4 clsact h3_create_team + + tunnel_create gt4-dst gretap 192.0.2.130 192.0.2.129 \ + ttl 100 tos inherit + ip link set dev gt4-dst master vrf-h3 + tc qdisc add dev gt4-dst clsact } h3_destroy() { + tc qdisc del dev gt4-dst clsact + ip link set dev gt4-dst nomaster + tunnel_destroy gt4-dst + h3_destroy_team - tc qdisc del dev $h4 clsact - tc qdisc del dev $h3 clsact ip link set dev vrf-h3 down vrf_destroy vrf-h3 } @@ -188,18 +199,12 @@ setup_prepare() h2_create h3_create switch_create - - trap_install $h3 ingress - trap_install $h4 ingress } cleanup() { pre_cleanup - trap_uninstall $h4 ingress - trap_uninstall $h3 ingress - switch_destroy h3_destroy h2_destroy @@ -219,6 +224,7 @@ test_lag_slave() mirror_install $swp1 ingress gt4 \ "proto 802.1q flower vlan_id 333 $tcflags" + vlan_capture_install gt4-dst "vlan_ethtype ipv4 ip_proto icmp type 8" # Move $down_dev away from the team. That will prompt change in # txability of the connected device, without changing its upness. The @@ -226,13 +232,14 @@ test_lag_slave() # other slave. ip link set dev $down_dev nomaster sleep 2 - mirror_test vrf-h1 192.0.2.1 192.0.2.18 $up_dev 1 10 + mirror_test vrf-h1 192.0.2.1 192.0.2.18 gt4-dst 100 10 # Test lack of connectivity when neither slave is txable. ip link set dev $up_dev nomaster sleep 2 - mirror_test vrf-h1 192.0.2.1 192.0.2.18 $h3 1 0 - mirror_test vrf-h1 192.0.2.1 192.0.2.18 $h4 1 0 + mirror_test vrf-h1 192.0.2.1 192.0.2.18 gt4-dst 100 0 + + vlan_capture_uninstall gt4-dst mirror_uninstall $swp1 ingress # Recreate H3's team device, because mlxsw, which this test is From patchwork Thu Jun 27 14:48:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 808016 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2045.outbound.protection.outlook.com [40.107.220.45]) (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 314D91514EE; Thu, 27 Jun 2024 14:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499817; cv=fail; b=V7KZN9ou5LIAjLPg/c4POaTM+E9uA0Xt7Jo6ReN3BCjUH+Z7TXtnx3C2w9DLAQU07g0FvGwaP0s9GJkwis+xefD+5TBzTlHEB4alFK3FJs+VELWPsUYm68f1F2oGXekVmRRKiL8J2NP7G1AYp2bnRRaCWHUZqp9Cfip+4kk1UDY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499817; c=relaxed/simple; bh=1ER9F8Nc6O25JXIqbiwPmmMnw5hG2w9Xbs+Pn9AbN1A=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Q/EojjRNnfO9sV01ujvoHwG221MKXd9YUA++xraSQxRSVYp7l+P5FuO55jQRVWuznvT3arUrwGZzAqoIuuWstLmzpDxCGMMFlqehhiBTwuxTkzbMa7onAwNPI20AwcOU9eefFrHO6jIFxvQ7icy0grMunagYxk6EAJwJGB1aN8g= 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=B1DbU8VJ; arc=fail smtp.client-ip=40.107.220.45 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="B1DbU8VJ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DtNze17arHjcSXD4yCyCH1BYqZy0f+WXPsf+LcEQSpAUOgw0k9GWxSElOqM1jH7LyHfmFt+WSt9fU0hAS79yNtJnh4Iar76Iq/pwVtvtBXa07KcVfZmUgCAWpQvVXLt/xTvr3naxlMrsxC+8hIs1yabUrBY/3Ey3WbQblVscIX9uuJCEaUwcVVN3tJAUSF7O4kOetKDCQAapj4pCcKuOENTnng2qs+iOs9xjddtripbRCuTrQHYBdfptjb830ePTzHlCpcVfz2dC25udtkb/CWKH91RSMA6P74YeBJRWLOqo9sMEM2XkRO5JKnrXKQCnN3wwFWtcGwa0EV2cpLfcgg== 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=0hDTKGw+NIaZglVPeNcnnWDO83EzK1dFhVkge87ZpHQ=; b=WeZrlHELMUNrfaVERcQMWBUpGk6GDZzoVGa5x2pgMcvfZ3KmJTyZo7auGiWEzGP+a3T8kPo3sJ/PnqGeMNMSs0EdnL4tMneHvr897Z5IV87LYKp4E4E6pbLKRJwGoPTsyBvtyf33kRE0rBAYW5SeDjh8GZfQ9Cd87BLuoUNXGxRCfKCxxsNHeyYLWwmFqbZqM/nDeuMXQdXprWuLKH7yeBHrARn82WYhvFf/MJfrx/VkhXxCP1SD3K74ZjqdnA/q6nqH/q6zal4rrXevVqKasBOUvFro6k4RipK0/xruUqwkgPwVc+4OPMoCmL2zn2RwucjC2Z3iK23JH/E8xOcD/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=0hDTKGw+NIaZglVPeNcnnWDO83EzK1dFhVkge87ZpHQ=; b=B1DbU8VJbHoiDyLN2CZ/nUuXL4NvTuhhP2XVKWpRF0ON8LUAiy1EOMFQC26lDMRPzHEEL/iV+Pvfjrlhfb9Sn+yNx86GiKgPGd4V3lK3wK07NYuYPzw4kiAni4F8vWfoRljGnBKzC9rKOhljGoCt7CZZYIGUc3hCkMpkH/UUOntBNrbOu08hVeBWudp+V1dnEdBLeZtFDyPL9TFg3IVwhnrdGklJ+XXK2YfkAXKJXwTe/EeijHJ7fis49UE+Tf3uCPQ8WODC3+MWZkglDwHZstuVjjDNaRHmpEiOT861yEKAUJNSSS8rOwziHYZWEmxGAinWJoSwMxMID3h6yEl3oA== Received: from BYAPR21CA0016.namprd21.prod.outlook.com (2603:10b6:a03:114::26) by LV2PR12MB5991.namprd12.prod.outlook.com (2603:10b6:408:14f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.26; Thu, 27 Jun 2024 14:50:05 +0000 Received: from SJ1PEPF00002311.namprd03.prod.outlook.com (2603:10b6:a03:114:cafe::eb) by BYAPR21CA0016.outlook.office365.com (2603:10b6:a03:114::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.8 via Frontend Transport; Thu, 27 Jun 2024 14:50: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 SJ1PEPF00002311.mail.protection.outlook.com (10.167.242.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 27 Jun 2024 14:50: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.1544.4; Thu, 27 Jun 2024 07:49:54 -0700 Received: from yaviefel.mtl.com (10.126.231.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.1544.4; Thu, 27 Jun 2024 07:49:48 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Danielle Ratson , Petr Machata , Ido Schimmel , Hangbin Liu , Benjamin Poirier , Shuah Khan , , Simon Horman , Subject: [PATCH net-next 05/12] selftests: mirror: do_test_span_dir_ips(): Install accurate taps Date: Thu, 27 Jun 2024 16:48:42 +0200 Message-ID: X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002311:EE_|LV2PR12MB5991:EE_ X-MS-Office365-Filtering-Correlation-Id: fa7c1fec-cfb0-4576-7bce-08dc96b86e30 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|82310400026|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: 6+rYVa5x8YtUx+z3VQtyb2A2CQV62SirzKPkUW8mExts/Nuo8iYTbpQuY+nkLeVDNRm9ecqwaWmiHF/wQY3UK/adkTbjtdnlkps71ClbMqrwB21NV9DVSg8GVHwEa6xPB+mLvpxi/vmTuhmAyB6FIhAH1p5V97bXyvQcfv888oOUb3f87xa0zibf1PbRcLc/50f+uIP/FegvuE1utqepsbpfjtirXu0K7gNYMDF8GTzd6PfyIvJ4rL3B1tMiCoXTTMIxGH0/yyG5kq5Mk+rmVleHfNfxkqrstize3lB1+3iljJD+uGhLW4fBBOUOrlNDe3ohO97JyXSFuxFYRdivXBt/nFfivv2p2ZEwXf8eeY/Bq8su44kIEVABWBTpUfFc901YyIP5C7dIy4cEmvew3c/zzW8i0K6T40qribmMDAixZZT/hG5XDJSN444hcyT/1bUhX7vhc9mH4kK4mVWfa50OGW0xG03PgFparceNut4HE6YlcvqUEKea/bhIoN6n0FomG6iswPAau141aW9f6lZS46tJCs3vRopE2wTIf6aNCMfn+7q2y0Y7yOagS5Zom3miz9/6YNJ8f40/mKrMGXiOWXXR3gR88Nm0sXx9aU0iNUfZdr3A+EUj3YuYvvqIRwImSnrJfMCm5mW/3cDWxPYSXv1OkYAlcDVIiiBz6kLuE6THbkzgYgsBqoqikCUXtT/wyIdG/b7xp3KyNYGc1ly9gveitmIQGWyFw2jR6idTJiEAOeOG8YiEXnyqoOioUpKLFjeLkJtRCMO4gb3v5CrBtYlZ7HKLD/4HvGuknnDf9iCjYF8VANDg0siEhcz5a+KY0fm3wGKQns6JZAmDzZ34LHSUBL+t1UHv41PgyNP9fMVhgl/QdRVlSmQi6kzcS/0r76Ghg8iHLZ8BG+pmS2SzvE+H4gSNVRFyJin4I4lLxOCoEfIqP3JVAGl+Ocr9GT38dF4LDNZVfZwzplfpB06LHqDfjZ/cFAFY1KvgRvYh7Jc/RKdHzRxUQmzDatm+kOkDFDAOpZrNGvLZWkru45mDpDTdMga3sRjgxVjphkyhunH5UB32l633LJWWVZlrmo7cqlIX5j3REoDidXhSgcRfBRZ9R9QXqlPv8hz1KOAECp/rVYNl9ttrclv3zmWUjkSdPy7VkEe99cAIPE268DtRX8j6cYhDD2Xzx+4tQ4Mn5nfGtIBfLiWns+WabDUd0aPXfEt95gvoCZNl9cM5OgSm22IE1dnS5lqAnoG0Em8Xv2xbgF/BI9CzIp74FEob7BfNfbaWIMzL0iSVdizJ6o5GSI6u1lB29hCuSCbUBKkC5qVJCLWwBVq1JfCazUAlpcp5TE790g2oR519ZcRiKE7TX7C77oV8Psrwe5K90xEoPP1/yojzsFxBb8oz5nLkPH0f+4PvpCF7/l28LLBqUEw31lsj4+8hKy4kqNCIrKYrRCuxZv+VzJ9qOJMR7bJA 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:(13230040)(376014)(82310400026)(36860700013)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 14:50:04.6431 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa7c1fec-cfb0-4576-7bce-08dc96b86e30 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: SJ1PEPF00002311.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5991 The mirroring selftests work by sending ICMP traffic between two hosts. Along the way, this traffic is mirrored to a gretap netdevice, and counter taps are then installed strategically along the path of the mirrored traffic to verify the mirroring took place. The problem with this is that besides mirroring the primary traffic, any other service traffic is mirrored as well. At the same time, because the tests need to work in HW-offloaded scenarios, the ability of the device to do arbitrary packet inspection should not be taken for granted. Most tests therefore simply use matchall, one uses flower to match on IP address. As a result, the selftests are noisy, because besides the primary ICMP traffic, any amount of other service traffic is mirrored as well. However, often the counter tap is installed at the remote end of the gretap tunnel. Since this is a SW-datapath scenario anyway, we can make the filter arbitrarily accurate. Thus in this patch, add parameters forward_type and backward_type to several mirroring test helpers, as some other helpers already have. Then change do_test_span_dir_ips() to instead of installing one generic tap and using it for test in both directions, install the tap for each direction separately, matching on the ICMP type given by these parameters. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson --- .../selftests/net/forwarding/mirror_gre.sh | 12 +++++----- .../net/forwarding/mirror_gre_lib.sh | 23 +++++++++++++++---- .../net/forwarding/mirror_gre_neigh.sh | 14 ++++++----- .../selftests/net/forwarding/mirror_lib.sh | 15 +++++++++--- 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre.sh b/tools/testing/selftests/net/forwarding/mirror_gre.sh index 00def4b04145..b645cb8d696a 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre.sh @@ -91,17 +91,17 @@ test_two_spans() mirror_install $swp1 ingress gt4 "matchall $tcflags" mirror_install $swp1 egress gt6 "matchall $tcflags" - quick_test_span_gre_dir gt4 - quick_test_span_gre_dir gt6 + quick_test_span_gre_dir gt4 8 0 + quick_test_span_gre_dir gt6 0 8 mirror_uninstall $swp1 ingress - fail_test_span_gre_dir gt4 - quick_test_span_gre_dir gt6 + fail_test_span_gre_dir gt4 8 0 + quick_test_span_gre_dir gt6 0 8 mirror_install $swp1 ingress gt4 "matchall $tcflags" mirror_uninstall $swp1 egress - quick_test_span_gre_dir gt4 - fail_test_span_gre_dir gt6 + quick_test_span_gre_dir gt4 8 0 + fail_test_span_gre_dir gt6 0 8 mirror_uninstall $swp1 ingress log_test "two simultaneously configured mirrors ($tcflags)" diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh index 2bed2a4013aa..e49535ce1cdd 100644 --- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh @@ -7,8 +7,11 @@ quick_test_span_gre_dir_ips() local tundev=$1; shift local ip1=$1; shift local ip2=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift - do_test_span_dir_ips 10 h3-$tundev "$ip1" "$ip2" + do_test_span_dir_ips 10 h3-$tundev "$ip1" "$ip2" \ + "$forward_type" "$backward_type" } fail_test_span_gre_dir_ips() @@ -84,8 +87,11 @@ full_test_span_gre_dir_vlan_ips() quick_test_span_gre_dir() { local tundev=$1; shift + local forward_type=${1-8}; shift + local backward_type=${1-0}; shift - quick_test_span_gre_dir_ips "$tundev" 192.0.2.1 192.0.2.2 + quick_test_span_gre_dir_ips "$tundev" 192.0.2.1 192.0.2.2 \ + "$forward_type" "$backward_type" } fail_test_span_gre_dir() @@ -139,12 +145,15 @@ full_test_span_gre_stp_ips() local what=$1; shift local ip1=$1; shift local ip2=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift local h3mac=$(mac_get $h3) RET=0 mirror_install $swp1 ingress $tundev "matchall $tcflags" - quick_test_span_gre_dir_ips $tundev $ip1 $ip2 + quick_test_span_gre_dir_ips $tundev $ip1 $ip2 \ + "$forward_type" "$backward_type" bridge link set dev $nbpdev state disabled sleep 1 @@ -152,7 +161,8 @@ full_test_span_gre_stp_ips() bridge link set dev $nbpdev state forwarding sleep 1 - quick_test_span_gre_dir_ips $tundev $ip1 $ip2 + quick_test_span_gre_dir_ips $tundev $ip1 $ip2 \ + "$forward_type" "$backward_type" mirror_uninstall $swp1 ingress @@ -164,7 +174,10 @@ full_test_span_gre_stp() local tundev=$1; shift local nbpdev=$1; shift local what=$1; shift + local forward_type=${1-8}; shift + local backward_type=${1-0}; shift full_test_span_gre_stp_ips "$tundev" "$nbpdev" "$what" \ - 192.0.2.1 192.0.2.2 + 192.0.2.1 192.0.2.2 \ + "$forward_type" "$backward_type" } diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh index 0f2c38eca2a3..0615f9244406 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh @@ -60,15 +60,17 @@ test_span_gre_neigh() local addr=$1; shift local tundev=$1; shift local direction=$1; shift + local forward_type=$1; shift + local backward_type=$1; shift local what=$1; shift RET=0 ip neigh replace dev $swp3 $addr lladdr 00:11:22:33:44:55 mirror_install $swp1 $direction $tundev "matchall $tcflags" - fail_test_span_gre_dir $tundev + fail_test_span_gre_dir $tundev "$forward_type" "$backward_type" ip neigh del dev $swp3 $addr - quick_test_span_gre_dir $tundev + quick_test_span_gre_dir $tundev "$forward_type" "$backward_type" mirror_uninstall $swp1 $direction log_test "$direction $what: neighbor change ($tcflags)" @@ -76,14 +78,14 @@ test_span_gre_neigh() test_gretap() { - test_span_gre_neigh 192.0.2.130 gt4 ingress "mirror to gretap" - test_span_gre_neigh 192.0.2.130 gt4 egress "mirror to gretap" + test_span_gre_neigh 192.0.2.130 gt4 ingress 8 0 "mirror to gretap" + test_span_gre_neigh 192.0.2.130 gt4 egress 0 8 "mirror to gretap" } test_ip6gretap() { - test_span_gre_neigh 2001:db8:2::2 gt6 ingress "mirror to ip6gretap" - test_span_gre_neigh 2001:db8:2::2 gt6 egress "mirror to ip6gretap" + test_span_gre_neigh 2001:db8:2::2 gt6 ingress 8 0 "mirror to ip6gretap" + test_span_gre_neigh 2001:db8:2::2 gt6 egress 0 8 "mirror to ip6gretap" } test_all() diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh index ee0fd71ad2fd..6a0c66d7ba7f 100644 --- a/tools/testing/selftests/net/forwarding/mirror_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh @@ -61,9 +61,14 @@ do_test_span_dir_ips() local dev=$1; shift local ip1=$1; shift local ip2=$1; shift + local forward_type=${1-8}; shift + local backward_type=${1-0}; shift - icmp_capture_install $dev + icmp_capture_install $dev "type $forward_type" mirror_test v$h1 $ip1 $ip2 $dev 100 $expect + icmp_capture_uninstall $dev + + icmp_capture_install $dev "type $backward_type" mirror_test v$h2 $ip2 $ip1 $dev 100 $expect icmp_capture_uninstall $dev } @@ -73,8 +78,11 @@ quick_test_span_dir_ips() local dev=$1; shift local ip1=$1; shift local ip2=$1; shift + local forward_type=${1-8}; shift + local backward_type=${1-0}; shift - do_test_span_dir_ips 10 "$dev" "$ip1" "$ip2" + do_test_span_dir_ips 10 "$dev" "$ip1" "$ip2" \ + "$forward_type" "$backward_type" } fail_test_span_dir_ips() @@ -95,7 +103,8 @@ test_span_dir_ips() local ip1=$1; shift local ip2=$1; shift - quick_test_span_dir_ips "$dev" "$ip1" "$ip2" + quick_test_span_dir_ips "$dev" "$ip1" "$ip2" \ + "$forward_type" "$backward_type" icmp_capture_install $dev "type $forward_type" mirror_test v$h1 $ip1 $ip2 $dev 100 10 From patchwork Thu Jun 27 14:48:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 808015 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2062.outbound.protection.outlook.com [40.107.220.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 C0A83198A04; Thu, 27 Jun 2024 14:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499833; cv=fail; b=oB6eenV1UbZP0FAZU4Is8R4NSkScshWr7Lq4pe5mKFaLCiDH/9pL9ENpg0tzN3lhc8EkjxMCtxfcXd4OtWKAXqiUYF7XT8BscLCqRDnN4K7RY7fexzsyHxjWP+Z/Tbrin+UPBCIXP2n+zkIe016Ni8cGdvZRa5sR+Nx7p+ZuvWo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499833; c=relaxed/simple; bh=iDxezbEXrNU38vvjLYqT6/ktYQDkunY2UTPN8gKompA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=VUJ4KQzCb0vGjJXgQT+CCf9hf3DU8h58uJtbEPlgI4eADkjbE7THsyn7ARUvSBj4gxCW5bhNiyZr8Nr666FLp/7qMRugxeFyPAtZ4/iYpcSldRMHihiBow1VkRdL33TdT6vySo9c0gn2Zti+YRLmwo3riA41YQXWkV87QQ4SWgU= 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=oFJMBYXy; arc=fail smtp.client-ip=40.107.220.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="oFJMBYXy" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j944HSGGZyxK3kUA0VADatNwh4d4MRh7DCGDMxItlOonfq3NQ1RAaWjberaKIr+3woB21AAQiKr4jepCrpEbU3zCpMPXjO1K1De6GEd9iqttzQQl6uWYvwNcWPhtinfC3EEdOQ+AoLMFmmCwenZArs9IQYSfMNbM45Qyw8jDIk+oPJpKT/g1gh5GAi1qPRysJRnf1c28a6eolfRtKqZbbSVjIdm9O+QPTTCGdiT6elTJjq9ZTyn+1Zn1t4Ev2/J3r/GDyqnnudh/DuNTcj0WXZAwSDRvjcqapBIQk2xlXGWonxDzZRB5mCmWX3vBSNcw+v/OEGjgXJxPy/POI/BadA== 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=g4dy/ePcL/Oih6dbpuz6kKJZBKotNDZwC+rQ0IorWrg=; b=TRzZ/b6lWjjbAMtXK8yufBAgVF3q0AKKYx0TqQHNrdQTbwd8hrdv2cduRaP3eV8jATIcxSkQB1/3Mm7poWn3Bzo4YmuOf3K2gy08VeTwmm00Bgo0gg9leanSZ6Tc8sP/1iZo5H+qYLat9+tOUsMyNYNvwogWRSuutlxVUSILwdWfoIVW9PeBElyVRZ+w5VOeCmlA4T04u676OiR1MM3FN43tWzq4QJae+Tfngok2vPdRXmrp3YB37wNG7jpzVjkXJ+WLDvUR6J12URfiPJ/L1GT3ON3K+E8Frjn65njDYV2h7vNSSzzXTJPLl9BqJEcoPn6H7wb5JRrqhes6/J21dA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=temperror (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net smtp.mailfrom=nvidia.com; dmarc=temperror 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=g4dy/ePcL/Oih6dbpuz6kKJZBKotNDZwC+rQ0IorWrg=; b=oFJMBYXyOXKAOg+bKaRaQCu3ZdW9+ZUklvHlExJF7ml4ZZAvkoyXQHirzFh74wlNlB+YhJBNfCFEmyY2B4aylmjZN9b4qanr06QeY7CAjcWPpTOKwpboxeQx3ZLX7G74rEMVbWkj/XbTBnouaDka9cS6jFlUNO1IolQTXZwAKZtL9G28Jh9XH15dkPzlHFC40Sc72co6AvDbEkh4xhs8aYD3rsbcX3yizrUHQ6kC/UcJgv3gtg73bue1InZHeLVH9PpSKt/WV/a61Zz+IcCTtG9FWIDlpx1DhNnA3Te4CF61Qo8Ek/5AKmWAHlnIRUob11LBBl/P9q7ZESIH7l83Hg== Received: from MW4PR04CA0227.namprd04.prod.outlook.com (2603:10b6:303:87::22) by LV8PR12MB9407.namprd12.prod.outlook.com (2603:10b6:408:1f9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.32; Thu, 27 Jun 2024 14:50:18 +0000 Received: from SJ1PEPF00002315.namprd03.prod.outlook.com (2603:10b6:303:87:cafe::1a) by MW4PR04CA0227.outlook.office365.com (2603:10b6:303:87::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.26 via Frontend Transport; Thu, 27 Jun 2024 14:50:18 +0000 X-MS-Exchange-Authentication-Results: spf=temperror (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=temperror action=none header.from=nvidia.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of nvidia.com: DNS Timeout) Received: from mail.nvidia.com (216.228.117.160) by SJ1PEPF00002315.mail.protection.outlook.com (10.167.242.169) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 27 Jun 2024 14:50:17 +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.1544.4; Thu, 27 Jun 2024 07:50:06 -0700 Received: from yaviefel.mtl.com (10.126.231.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.1544.4; Thu, 27 Jun 2024 07:50:00 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Danielle Ratson , Petr Machata , Ido Schimmel , Hangbin Liu , Benjamin Poirier , Shuah Khan , , Simon Horman , Subject: [PATCH net-next 07/12] selftests: mirror: Drop dual SW/HW testing Date: Thu, 27 Jun 2024 16:48:44 +0200 Message-ID: X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002315:EE_|LV8PR12MB9407:EE_ X-MS-Office365-Filtering-Correlation-Id: 8d9fceb3-b482-4575-5004-08dc96b875cc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: R19IeaAsoCeHCOktUDIwBMMkFx9cibu6QZeXT3btkQlnQkVQv4jCmJK716S9A/51KcErIh4R7kuBZzsOhfZA6UEMyGEO2LQHOFpPZCppYlcPBaPNFQD0TnVz7FtTA0pgMz1egbBxK/yDH/NhQsD5/7JLYNe7d5fnm5/NZ/Ekp7AQmgdKp5L2CdtYIBldpf1AuEkus3bweBErGu41dRZqVO3zn0GTWCqljB7sr7xgifZvn0CI4h0Zbs4YevOoHgRVy08OHEtBjIA0CR33kF8DXuie+SqNegptClj5phhIgJ6OT1CJSoS9lFKUCXp8eUyk6gdi7hQ0fp72qj1U9+HS95JBMb/UOhdOo9LAsUnVDf5Yu1ZWJ5eGyyw4jjgFkPWQn6xljKiwNNHn/tHx5LOmbg6zGtlrGfE2PE+LNPZ6xvrKT/kYT95qWdxry41kFZmxHlk7BoAuE6BR6cZHXab7XqQNDPvf9/QcWL5f5tP3zQj+ycMqi9NghgGYoKWlRf+UKSNNVK0iA2+Inw+RRR4FxLMutfU8/uO1ypEC7ebAKakGPwMaoU37r/RfoNobtAS5r4g3eejlUXsZoGh5ZjmtN+R/XD7DAYKPZiYeuwfcP4OWy8J4xfbl1rRl7XsyLa9vB3KSdXOT1fJ/H5G9zhanGis8h52ziBo1+hMsuLSSspJ0I38f7oHl8jN/n43TDflNxL5nLr9jpsEgQD5DQqYCJWDAsHUmmFI+Xz0jxjS1y3vG4vvrGjtuFscGtXrqb32wTJCMxNoq3ON+AA23QpGyvZnYJ1QjoQbKf5oGXiiCc29hed1dDai/O1IIG/ekRYHP5mSO6NA6YJIBBm63YWI2BBy9kdtRTrTPlT0LQFgTrBUGv9D4/gxuw0JostetTlcIHnRioh6qv5uwgzBBcOKhmc2KU9VA2pUMBEYoI0BlHlMb8Om9pkA6pjfs91Lto/hijgyLN6GSz7RndCOo9VzlznsboA6jr7+sEYQ7KFtNZ/qSVZIjsGQpAaYqlN6OSt7NnpdgXR7d/g+0VUvV2aiOtKBXtgOYEXQi+HH91W2gEYIKfuu6YfOEWTzcGz3mN7HbSx11WfUAEW8l4B4MbhoMMGtrildrJtO5Trp0UNK9lnrjw2KfusyjeDIGlmuG9JLyX5gDuIArK6seiXUWZVyJD0Nd41pXPj2P6c9QyJKLKMS7JXyPFHqbfU+Fv7wlTy1Z8tnInGjHjXiE+XpGcn0u8kSMr0sWOdObJMDk0BVfxaccERHW9FIgaqkQ9HkEb53YokWsq5n77ubtDPv7UKoxoVxKBd+trl7B17CVMRo7LxxWK+PYYvdRB+V9uHgloPfUoih13PLJlG8fNQ/nnebOrkI0wy7dqEmpvJyyhxX8S27BDx6gnXLkEA2RHMe0qcf3/cqdv27Drz2s3BrxN/5nYbViww6srLOuLF5AW3gpb/z2lgZN0T80QyltNURKYNcV 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:(13230040)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 14:50:17.4084 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8d9fceb3-b482-4575-5004-08dc96b875cc 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: SJ1PEPF00002315.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9407 The mirroring tests are currently run in a skip_hw and optionally a skip_sw mode. The former tests the SW datapath, the latter the HW datapath, if available. In order to be able to test SW datapath on HW loopbacks, traps are installed on ingress to get traffic from the HW datapath to the SW one. This adds an unnecessary complexity when it would be much simpler to just use a veth-based topology to test the SW datapath. Thus drop all the code that supports this dual testing. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson --- .../selftests/drivers/net/mlxsw/mirror_gre.sh | 33 +++---------- .../drivers/net/mlxsw/mirror_gre_scale.sh | 18 +------ .../selftests/net/forwarding/mirror_gre.sh | 33 +++---------- .../net/forwarding/mirror_gre_bound.sh | 23 +-------- .../net/forwarding/mirror_gre_bridge_1d.sh | 21 +-------- .../forwarding/mirror_gre_bridge_1d_vlan.sh | 21 +-------- .../net/forwarding/mirror_gre_bridge_1q.sh | 21 +-------- .../forwarding/mirror_gre_bridge_1q_lag.sh | 27 ++--------- .../net/forwarding/mirror_gre_changes.sh | 47 ++++++------------- .../net/forwarding/mirror_gre_flower.sh | 25 ++-------- .../net/forwarding/mirror_gre_lag_lacp.sh | 25 ++-------- .../net/forwarding/mirror_gre_lib.sh | 12 ++--- .../net/forwarding/mirror_gre_neigh.sh | 25 ++-------- .../selftests/net/forwarding/mirror_gre_nh.sh | 29 ++---------- .../net/forwarding/mirror_gre_vlan.sh | 21 +-------- .../forwarding/mirror_gre_vlan_bridge_1q.sh | 39 ++++----------- .../selftests/net/forwarding/mirror_vlan.sh | 35 ++++---------- 17 files changed, 77 insertions(+), 378 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/mirror_gre.sh b/tools/testing/selftests/drivers/net/mlxsw/mirror_gre.sh index 47be3b269088..8cf06fcd724c 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/mirror_gre.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/mirror_gre.sh @@ -118,7 +118,7 @@ test_span_gre_ttl_inherit() RET=0 ip link set dev $tundev type $type ttl inherit - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" fail_test_span_gre_dir $tundev ip link set dev $tundev type $type ttl 100 @@ -126,7 +126,7 @@ test_span_gre_ttl_inherit() quick_test_span_gre_dir $tundev mirror_uninstall $swp1 ingress - log_test "$what: no offload on TTL of inherit ($tcflags)" + log_test "$what: no offload on TTL of inherit" } test_span_gre_tos_fixed() @@ -138,14 +138,14 @@ test_span_gre_tos_fixed() RET=0 ip link set dev $tundev type $type tos 0x10 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" fail_test_span_gre_dir $tundev ip link set dev $tundev type $type tos inherit quick_test_span_gre_dir $tundev mirror_uninstall $swp1 ingress - log_test "$what: no offload on a fixed TOS ($tcflags)" + log_test "$what: no offload on a fixed TOS" } test_span_failable() @@ -156,7 +156,7 @@ test_span_failable() RET=0 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" if ((should_fail)); then fail_test_span_gre_dir $tundev else @@ -164,7 +164,7 @@ test_span_failable() fi mirror_uninstall $swp1 ingress - log_test "$what: should_fail=$should_fail ($tcflags)" + log_test "$what: should_fail=$should_fail" } test_failable() @@ -175,17 +175,6 @@ test_failable() test_span_failable $should_fail gt6-soft "mirror to gretap w/ soft underlay" } -test_sw() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - test_failable 0 - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - test_hw() { test_failable 1 @@ -202,16 +191,6 @@ trap cleanup EXIT setup_prepare setup_wait -if ! tc_offload_check; then - check_err 1 "Could not test offloaded functionality" - log_test "mlxsw-specific tests for mirror to gretap" - exit -fi - -tcflags="skip_hw" -test_sw - -tcflags="skip_sw" test_hw exit $EXIT_STATUS diff --git a/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh index e5589e2fca85..d43093310e23 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh @@ -79,7 +79,7 @@ mirror_gre_tunnels_create() cat >> $MIRROR_GRE_BATCH_FILE <<-EOF filter add dev $swp1 ingress pref 1000 \ protocol ipv6 \ - flower $tcflags dst_ip $match_dip \ + flower skip_sw dst_ip $match_dip \ action mirred egress mirror dev $tun EOF done @@ -107,7 +107,7 @@ mirror_gre_tunnels_destroy() done } -__mirror_gre_test() +mirror_gre_test() { local count=$1; shift local should_fail=$1; shift @@ -131,20 +131,6 @@ __mirror_gre_test() done } -mirror_gre_test() -{ - local count=$1; shift - local should_fail=$1; shift - - if ! tc_offload_check $TC_FLOWER_NUM_NETIFS; then - check_err 1 "Could not test offloaded functionality" - return - fi - - tcflags="skip_sw" - __mirror_gre_test $count $should_fail -} - mirror_gre_setup_prepare() { h1=${NETIFS[p1]} diff --git a/tools/testing/selftests/net/forwarding/mirror_gre.sh b/tools/testing/selftests/net/forwarding/mirror_gre.sh index b645cb8d696a..921c733ee04f 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre.sh @@ -74,7 +74,7 @@ test_span_gre_mac() RET=0 - mirror_install $swp1 $direction $tundev "matchall $tcflags" + mirror_install $swp1 $direction $tundev "matchall" icmp_capture_install h3-${tundev} "src_mac $src_mac dst_mac $dst_mac" mirror_test v$h1 192.0.2.1 192.0.2.2 h3-${tundev} 100 10 @@ -82,15 +82,15 @@ test_span_gre_mac() icmp_capture_uninstall h3-${tundev} mirror_uninstall $swp1 $direction - log_test "$direction $what: envelope MAC ($tcflags)" + log_test "$direction $what: envelope MAC" } test_two_spans() { RET=0 - mirror_install $swp1 ingress gt4 "matchall $tcflags" - mirror_install $swp1 egress gt6 "matchall $tcflags" + mirror_install $swp1 ingress gt4 "matchall" + mirror_install $swp1 egress gt6 "matchall" quick_test_span_gre_dir gt4 8 0 quick_test_span_gre_dir gt6 0 8 @@ -98,13 +98,13 @@ test_two_spans() fail_test_span_gre_dir gt4 8 0 quick_test_span_gre_dir gt6 0 8 - mirror_install $swp1 ingress gt4 "matchall $tcflags" + mirror_install $swp1 ingress gt4 "matchall" mirror_uninstall $swp1 egress quick_test_span_gre_dir gt4 8 0 fail_test_span_gre_dir gt6 0 8 mirror_uninstall $swp1 ingress - log_test "two simultaneously configured mirrors ($tcflags)" + log_test "two simultaneously configured mirrors" } test_gretap() @@ -131,30 +131,11 @@ test_ip6gretap_mac() test_span_gre_mac gt6 egress "mirror to ip6gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh index 6c257ec03756..e3cd48e18eeb 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bound.sh @@ -196,32 +196,11 @@ test_ip6gretap() full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap w/ UL" } -test_all() -{ - RET=0 - - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d.sh index 04fd14b0a9b7..6c7bd33332c2 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d.sh @@ -108,30 +108,11 @@ test_ip6gretap() full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh index f35313c76fac..909ec956a5e5 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1d_vlan.sh @@ -104,30 +104,11 @@ test_ip6gretap_stp() full_test_span_gre_stp gt6 $swp3.555 "mirror to ip6gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh index 0cf4c47a46f9..40ac9dd3aff1 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q.sh @@ -104,30 +104,11 @@ test_ip6gretap() full_test_span_gre_dir gt6 egress 0 8 "mirror to ip6gretap" } -tests() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -tests - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - tests -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh index b719d24a4ae5..fe4d7c906a70 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_bridge_1q_lag.sh @@ -227,10 +227,10 @@ test_lag_slave() RET=0 tc filter add dev $swp1 ingress pref 999 \ - proto 802.1q flower vlan_ethtype arp $tcflags \ + proto 802.1q flower vlan_ethtype arp \ action pass mirror_install $swp1 ingress gt4 \ - "proto 802.1q flower vlan_id 333 $tcflags" + "proto 802.1q flower vlan_id 333" # Test connectivity through $up_dev when $down_dev is set down. ip link set dev $down_dev down @@ -252,7 +252,7 @@ test_lag_slave() mirror_uninstall $swp1 ingress tc filter del dev $swp1 ingress pref 999 - log_test "$what ($tcflags)" + log_test "$what" } test_mirror_gretap_first() @@ -265,30 +265,11 @@ test_mirror_gretap_second() test_lag_slave $h4 $swp4 $swp3 "mirror to gretap: LAG second slave" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh index b57fb9f069f4..65ae9d960c18 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_changes.sh @@ -73,7 +73,7 @@ test_span_gre_ttl() RET=0 mirror_install $swp1 ingress $tundev \ - "prot ip flower $tcflags ip_prot icmp" + "prot ip flower ip_prot icmp" tc filter add dev $h3 ingress pref 77 prot $prot \ flower skip_hw ip_ttl 50 action pass @@ -87,7 +87,7 @@ test_span_gre_ttl() tc filter del dev $h3 ingress pref 77 mirror_uninstall $swp1 ingress - log_test "$what: TTL change ($tcflags)" + log_test "$what: TTL change" } test_span_gre_tun_up() @@ -98,7 +98,7 @@ test_span_gre_tun_up() RET=0 ip link set dev $tundev down - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" fail_test_span_gre_dir $tundev ip link set dev $tundev up @@ -106,7 +106,7 @@ test_span_gre_tun_up() quick_test_span_gre_dir $tundev mirror_uninstall $swp1 ingress - log_test "$what: tunnel down/up ($tcflags)" + log_test "$what: tunnel down/up" } test_span_gre_egress_up() @@ -118,7 +118,7 @@ test_span_gre_egress_up() RET=0 ip link set dev $swp3 down - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" fail_test_span_gre_dir $tundev # After setting the device up, wait for neighbor to get resolved so that @@ -130,7 +130,7 @@ test_span_gre_egress_up() quick_test_span_gre_dir $tundev mirror_uninstall $swp1 ingress - log_test "$what: egress down/up ($tcflags)" + log_test "$what: egress down/up" } test_span_gre_remote_ip() @@ -144,14 +144,14 @@ test_span_gre_remote_ip() RET=0 ip link set dev $tundev type $type remote $wrong_ip - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" fail_test_span_gre_dir $tundev ip link set dev $tundev type $type remote $correct_ip quick_test_span_gre_dir $tundev mirror_uninstall $swp1 ingress - log_test "$what: remote address change ($tcflags)" + log_test "$what: remote address change" } test_span_gre_tun_del() @@ -165,7 +165,7 @@ test_span_gre_tun_del() RET=0 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir $tundev ip link del dev $tundev fail_test_span_gre_dir $tundev @@ -176,11 +176,11 @@ test_span_gre_tun_del() # Recreating the tunnel doesn't reestablish mirroring, so reinstall it # and verify it works for the follow-up tests. mirror_uninstall $swp1 ingress - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir $tundev mirror_uninstall $swp1 ingress - log_test "$what: tunnel deleted ($tcflags)" + log_test "$what: tunnel deleted" } test_span_gre_route_del() @@ -192,7 +192,7 @@ test_span_gre_route_del() RET=0 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir $tundev ip route del $route dev $edev @@ -203,7 +203,7 @@ test_span_gre_route_del() mirror_uninstall $swp1 ingress - log_test "$what: underlay route removal ($tcflags)" + log_test "$what: underlay route removal" } test_ttl() @@ -244,30 +244,11 @@ test_route_del() test_span_gre_route_del gt6 $swp3 2001:db8:2::/64 "mirror to ip6gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh b/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh index c7d532e6f31e..3a84f3ab5856 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_flower.sh @@ -91,7 +91,7 @@ full_test_span_gre_dir_acl() RET=0 mirror_install $swp1 $direction $tundev \ - "protocol ip flower $tcflags dst_ip $match_dip" + "protocol ip flower dst_ip $match_dip" fail_test_span_gre_dir $tundev test_span_gre_dir_acl "$tundev" "$forward_type" "$backward_type" mirror_uninstall $swp1 $direction @@ -99,7 +99,7 @@ full_test_span_gre_dir_acl() # Test lack of mirroring after ACL mirror is uninstalled. fail_test_span_gre_dir_acl "$tundev" - log_test "$direction $what ($tcflags)" + log_test "$direction $what" } test_gretap() @@ -114,30 +114,11 @@ test_ip6gretap() full_test_span_gre_dir_acl gt6 egress 0 8 192.0.2.3 "ACL mirror to ip6gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh index f521648682bf..1e4f0887724d 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lag_lacp.sh @@ -223,7 +223,7 @@ test_lag_slave() RET=0 mirror_install $swp1 ingress gt4 \ - "proto 802.1q flower vlan_id 333 $tcflags" + "proto 802.1q flower vlan_id 333" vlan_capture_install gt4-dst "vlan_ethtype ipv4 ip_proto icmp type 8" # Move $down_dev away from the team. That will prompt change in @@ -250,7 +250,7 @@ test_lag_slave() # Wait for ${h,swp}{3,4}. setup_wait - log_test "$what ($tcflags)" + log_test "$what" } test_mirror_gretap_first() @@ -263,30 +263,11 @@ test_mirror_gretap_second() test_lag_slave $h4 $h3 "mirror to gretap: LAG second slave" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh index cc3a0a3f83ba..aa96644e3866 100644 --- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh @@ -47,12 +47,12 @@ full_test_span_gre_dir_ips() RET=0 - mirror_install $swp1 $direction $tundev "matchall $tcflags" + mirror_install $swp1 $direction $tundev "matchall" test_span_dir_ips "h3-$tundev" "$forward_type" \ "$backward_type" "$ip1" "$ip2" mirror_uninstall $swp1 $direction - log_test "$direction $what ($tcflags)" + log_test "$direction $what" } full_test_span_gre_dir_vlan_ips() @@ -68,7 +68,7 @@ full_test_span_gre_dir_vlan_ips() RET=0 - mirror_install $swp1 $direction $tundev "matchall $tcflags" + mirror_install $swp1 $direction $tundev "matchall" test_span_dir_ips "h3-$tundev" "$forward_type" \ "$backward_type" "$ip1" "$ip2" @@ -81,7 +81,7 @@ full_test_span_gre_dir_vlan_ips() mirror_uninstall $swp1 $direction - log_test "$direction $what ($tcflags)" + log_test "$direction $what" } quick_test_span_gre_dir() @@ -151,7 +151,7 @@ full_test_span_gre_stp_ips() RET=0 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir_ips $tundev $ip1 $ip2 \ "$forward_type" "$backward_type" @@ -166,7 +166,7 @@ full_test_span_gre_stp_ips() mirror_uninstall $swp1 ingress - log_test "$what: STP state ($tcflags)" + log_test "$what: STP state" } full_test_span_gre_stp() diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh index 0615f9244406..2cbfbecf25c8 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_neigh.sh @@ -67,13 +67,13 @@ test_span_gre_neigh() RET=0 ip neigh replace dev $swp3 $addr lladdr 00:11:22:33:44:55 - mirror_install $swp1 $direction $tundev "matchall $tcflags" + mirror_install $swp1 $direction $tundev "matchall" fail_test_span_gre_dir $tundev "$forward_type" "$backward_type" ip neigh del dev $swp3 $addr quick_test_span_gre_dir $tundev "$forward_type" "$backward_type" mirror_uninstall $swp1 $direction - log_test "$direction $what: neighbor change ($tcflags)" + log_test "$direction $what: neighbor change" } test_gretap() @@ -88,30 +88,11 @@ test_ip6gretap() test_span_gre_neigh 2001:db8:2::2 gt6 egress 0 8 "mirror to ip6gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh index 2011dad06cf4..34bc646938e3 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_nh.sh @@ -75,7 +75,7 @@ cleanup() test_gretap() { RET=0 - mirror_install $swp1 ingress gt4 "matchall $tcflags" + mirror_install $swp1 ingress gt4 "matchall" # For IPv4, test that there's no mirroring without the route directing # the traffic to tunnel remote address. Then add it and test that @@ -88,29 +88,18 @@ test_gretap() ip route del 192.0.2.130/32 via 192.0.2.162 mirror_uninstall $swp1 ingress - log_test "mirror to gre with next-hop remote ($tcflags)" + log_test "mirror to gre with next-hop remote" } test_ip6gretap() { RET=0 - mirror_install $swp1 ingress gt6 "matchall $tcflags" + mirror_install $swp1 ingress gt6 "matchall" quick_test_span_gre_dir gt6 mirror_uninstall $swp1 ingress - log_test "mirror to ip6gre with next-hop remote ($tcflags)" -} - -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress + log_test "mirror to ip6gre with next-hop remote" } trap cleanup EXIT @@ -118,14 +107,6 @@ trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan.sh index 88cecdb9a861..63689928cb51 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan.sh @@ -63,30 +63,11 @@ test_gretap() full_test_span_gre_dir gt4 egress 0 8 "mirror to gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh index b49b70416e32..1b902cc579f6 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh @@ -153,7 +153,7 @@ test_span_gre_forbidden_cpu() RET=0 # Run the pass-test first, to prime neighbor table. - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir $tundev # Now forbid the VLAN at the bridge and see it fail. @@ -167,7 +167,7 @@ test_span_gre_forbidden_cpu() mirror_uninstall $swp1 ingress - log_test "$what: vlan forbidden at a bridge ($tcflags)" + log_test "$what: vlan forbidden at a bridge" } test_gretap_forbidden_cpu() @@ -187,7 +187,7 @@ test_span_gre_forbidden_egress() RET=0 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir $tundev bridge vlan del dev $swp3 vid 555 @@ -202,7 +202,7 @@ test_span_gre_forbidden_egress() mirror_uninstall $swp1 ingress - log_test "$what: vlan forbidden at a bridge egress ($tcflags)" + log_test "$what: vlan forbidden at a bridge egress" } test_gretap_forbidden_egress() @@ -223,7 +223,7 @@ test_span_gre_untagged_egress() RET=0 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir $tundev quick_test_span_vlan_dir $h3 555 "$ul_proto" @@ -246,7 +246,7 @@ test_span_gre_untagged_egress() mirror_uninstall $swp1 ingress - log_test "$what: vlan untagged at a bridge egress ($tcflags)" + log_test "$what: vlan untagged at a bridge egress" } test_gretap_untagged_egress() @@ -267,7 +267,7 @@ test_span_gre_fdb_roaming() RET=0 - mirror_install $swp1 ingress $tundev "matchall $tcflags" + mirror_install $swp1 ingress $tundev "matchall" quick_test_span_gre_dir $tundev while ((RET == 0)); do @@ -279,7 +279,7 @@ test_span_gre_fdb_roaming() if ! bridge fdb sh dev $swp2 vlan 555 master \ | grep -q $h3mac; then printf "TEST: %-60s [RETRY]\n" \ - "$what: MAC roaming ($tcflags)" + "$what: MAC roaming" # ARP or ND probably reprimed the FDB while the test # was running. We would get a spurious failure. RET=0 @@ -296,7 +296,7 @@ test_span_gre_fdb_roaming() mirror_uninstall $swp1 ingress - log_test "$what: MAC roaming ($tcflags)" + log_test "$what: MAC roaming" } test_gretap_fdb_roaming() @@ -319,30 +319,11 @@ test_ip6gretap_stp() full_test_span_gre_stp gt6 $swp3 "mirror to ip6gretap" } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - - tests_run - - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS diff --git a/tools/testing/selftests/net/forwarding/mirror_vlan.sh b/tools/testing/selftests/net/forwarding/mirror_vlan.sh index bc3297846511..2f150a414d38 100755 --- a/tools/testing/selftests/net/forwarding/mirror_vlan.sh +++ b/tools/testing/selftests/net/forwarding/mirror_vlan.sh @@ -40,12 +40,16 @@ setup_prepare() vlan_create $h2 111 v$h2 192.0.2.18/28 bridge vlan add dev $swp2 vid 111 + + trap_install $h3 ingress } cleanup() { pre_cleanup + trap_uninstall $h3 ingress + vlan_destroy $h2 111 vlan_destroy $h1 111 vlan_destroy $h3 555 @@ -63,11 +67,11 @@ test_vlan_dir() RET=0 - mirror_install $swp1 $direction $swp3.555 "matchall $tcflags" + mirror_install $swp1 $direction $swp3.555 "matchall" test_span_dir "$h3.555" "$forward_type" "$backward_type" mirror_uninstall $swp1 $direction - log_test "$direction mirror to vlan ($tcflags)" + log_test "$direction mirror to vlan" } test_vlan() @@ -84,12 +88,12 @@ test_tagged_vlan_dir() RET=0 - mirror_install $swp1 $direction $swp3.555 "matchall $tcflags" + mirror_install $swp1 $direction $swp3.555 "matchall" do_test_span_vlan_dir_ips '>= 10' "$h3.555" 111 ip 192.0.2.17 192.0.2.18 do_test_span_vlan_dir_ips 0 "$h3.555" 555 ip 192.0.2.17 192.0.2.18 mirror_uninstall $swp1 $direction - log_test "$direction mirror tagged to vlan ($tcflags)" + log_test "$direction mirror tagged to vlan" } test_tagged_vlan() @@ -98,32 +102,11 @@ test_tagged_vlan() test_tagged_vlan_dir egress 0 8 } -test_all() -{ - slow_path_trap_install $swp1 ingress - slow_path_trap_install $swp1 egress - trap_install $h3 ingress - - tests_run - - trap_uninstall $h3 ingress - slow_path_trap_uninstall $swp1 egress - slow_path_trap_uninstall $swp1 ingress -} - trap cleanup EXIT setup_prepare setup_wait -tcflags="skip_hw" -test_all - -if ! tc_offload_check; then - echo "WARN: Could not test offloaded functionality" -else - tcflags="skip_sw" - test_all -fi +tests_run exit $EXIT_STATUS From patchwork Thu Jun 27 14:48:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 808014 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2083.outbound.protection.outlook.com [40.107.244.83]) (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 4D50B198A1A; Thu, 27 Jun 2024 14:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.83 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499843; cv=fail; b=qvBGNCxzrG28ZMDfTjoBu5D+7gFXgMTRu9szWw7H7EyZKemauWkoC8m+vwsWmfqbh2upqOrmX3LL0ham9pAqN+AIrDf7P/zh8WwwIyvYW1lKNOXrFO3BqGtpkvkVythNSPc9IxgdKDxA4piSZ/aD1I6H039MN6bg4sg9OL+nH0o= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499843; c=relaxed/simple; bh=XdSwYFx6Zj63miu+x2NoH5DKXPAPvSTUoiRk+Qg4Tqc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cu4Tr2ZaCyCiF3gVjOCe/97PbQ6qi0BLBTCj9/aCLMEFRQWHtNXRIXNDqWW4P5nixtiIIuON4XVh9adXZf4drJOQTx08y8Oxpf2ftDzOIA9Zt2khfIBwsOQpzyTFdU1inrnCBpsA7H2etZcH/txRGF7foL70aCWB8quUMCdsgNQ= 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=pPIvX5hg; arc=fail smtp.client-ip=40.107.244.83 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="pPIvX5hg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JpGZoagByPiKLXvurhiijyfPSpeVy9OV9okBO8cUMVYmIgtYfPCv9WOUrXhFbpD5Lwwmja6dOU+EinG4AeJ8ofKW5oT444xCfaFOkqjMLX1ZIfGv9goJqVPIYT8nkZkhXgmqVm0ktx5Xl+jw9quCUmU7GilePdCOrHuAYbzzPAf9H7fWCvbZdk1EDGePj3mhyECCeOSjUkNd8tbHNYoyj2RSWwLve9u6tU8fPk8mdvKi/T15AmasmWtj3I7qVB8VaaSxhJAClwW3Jj8fg5PPLWgi+9/chLAJtnO8XDE0+4vC6qN9Nmw6Ji81XLkJ2IzUGczvs7G8jcujg/BMPmZ8Cw== 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=5sCvBz6sOlEF3baMVIn++BDjoVMVRxM1yAIlgQ8lGLk=; b=ArSwGcZ7LLxJw+mU934VRf3XUlshaUgyON8omhff5T/TN8sDk/qYQcRgM5d1+D9mTF6N2+0HD06nfRxkgOdirgBF50y1ADUEY4kyMRpLCBJuxp3ezej1598r4zoRtJ1aRF2vWzNBYvOzSEUR8kJXtgTHwcBBtlL0wdNKNLVdn8qXAA5xe1yS/A5CUo2VBid+asVikCebXG25tjeIQhQXzegLhSwOFa+BWUftzvTHLCzvuFDLm7OrLHIyHy95OTaE1kbPlkI4Z6kyDAr0XprcW8Az+t4rnPZQEsNPdPcFTrI10c2+jjqMrW/IMDZPhpqnsb2yJYWvopPI6zu/BHqNwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=5sCvBz6sOlEF3baMVIn++BDjoVMVRxM1yAIlgQ8lGLk=; b=pPIvX5hgmgYvn4QlFMSRVBI6TH+vhPzZoVRH1D1wpSd1H4Rem+Zjt0GMWAykHc0CENT3brbD9afLCPnZWw3j3aUjBmzGRMniWcOX++1iVrXm+zTQj6t7WGqusLSc05NBDpZcBpHR2/HhETFxNyMbWDTg4mVMdl92hbKZMUdIYsOBZnMOOsvMVAIyOOfir4oG7gugrsN+52KVxXsBIjTPlPYABeHUpqUaob8dVHoDmIwcQuVAaSZan5kQRkj5vYxcBYfOT6G9q/5kcyLNAGAYyK021lVMnOEDDVlHebhIFlXXDRy9uxZvbM4ElwxfYb/SMKP/1U0Bg9i90TLpPKR3QQ== Received: from BYAPR02CA0071.namprd02.prod.outlook.com (2603:10b6:a03:54::48) by BL1PR12MB5708.namprd12.prod.outlook.com (2603:10b6:208:387::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.28; Thu, 27 Jun 2024 14:50:38 +0000 Received: from SJ1PEPF00002314.namprd03.prod.outlook.com (2603:10b6:a03:54:cafe::95) by BYAPR02CA0071.outlook.office365.com (2603:10b6:a03:54::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.25 via Frontend Transport; Thu, 27 Jun 2024 14:50:38 +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 SJ1PEPF00002314.mail.protection.outlook.com (10.167.242.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 27 Jun 2024 14:50:38 +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.1544.4; Thu, 27 Jun 2024 07:50:23 -0700 Received: from yaviefel.mtl.com (10.126.231.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.1544.4; Thu, 27 Jun 2024 07:50:17 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Danielle Ratson , Petr Machata , Ido Schimmel , Hangbin Liu , Benjamin Poirier , Shuah Khan , , Simon Horman , Subject: [PATCH net-next 10/12] selftests: libs: Drop slow_path_trap_install()/_uninstall() Date: Thu, 27 Jun 2024 16:48:47 +0200 Message-ID: <914df583a21daadc04ba8fc9dccc45de3435bcf9.1719497773.git.petrm@nvidia.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002314:EE_|BL1PR12MB5708:EE_ X-MS-Office365-Filtering-Correlation-Id: 84d0ab74-ecaa-4ab4-ab8c-08dc96b8821d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: 3JUm/RAr6LBFgPQmfaKZRVABRMpEG451kf0kFsr2zbm4NRGs+f2aZ6rcB+NpicuR5pMLMp9+Uh/74+LOOQ9sdIWBRQm9r+louaIZ/zIngFjnbx6B3MXnZHOngG5M6QUFEDUa5k3cyZQJNuLLZMa5kOqU/v4rIS2NWc2T4nbqR8mc0BqLB08kD269IyoqhErXqvL2WRcjq3uIjRHxah5kzXVJn1ntVjGI86e5kFLXFc5c/M3Y0MHvW1l409ENSXn/0F5Cs03rA/kt79WE941WLB6bWPbX4Bu4sBwO8vc/hxj30hihP6AKVgxqo8mvse/YUVmJ8Dfhj3ft0ejV7baKYrBRQ6YWWy15aoKDohg1d48dhr0/EgiVBtkRT0zQOghRIf4ebZMwW0IV7AaL6tIlcLzMxMv1RAA0Qz9CffsA3MXygOl/Kxnooc6CnTrmoBELmliX257cVjIys/EPeXZvkuvhyFJKu0ZuBMVJ9g9HVPGm4CUIElq2EtHYovZmhDl4JCKpTfGCs/QN0WucMTh3jrwACHiK/DJsdw+0E78i0eSdFDoh49jXqxe42vwl3gWfyAsVoyZn21GvuQ2Pk4gT5Q7TfY/N4vLr9+M6CMTrKEiuTz58xLQ9atXXAKOkbS7+slisd2rcVUcEJ1KF/1HwmBA13yXutG3lfnti728j6nT4giSIevaQT9WSU1yI76PKiA4tT/Z3iNAnC/CtuGi43cd0YZPy+LriVVak36MwrJDSrCzpMsnW5e5yjVxsRq3sxcVPH+V1o0X823kgaLTG6ee2b4KlWQC4PaymEjh9BLXDXwqdf+eg4Gn28PIs4w3OcdcMAQqOPNyYhF4RPysHQkj2cihptShxsptt5hzKrcwAOyFTZqCbyrNUhsucQ5XUJ50fjqplxrxOhd7inyePMZy4SQPxiyX1+k8GZQFaiWUGFyRlPn97TgkS9ovE69YUXVfN9pVWDSygtDhqZw4JlHqqZ2iskKHZnM234bnfnAxyIaeqdbu6/LfbUFZXxUN/9toHxyN18jY5/O5uhkHJpd9trXPC7S66n8s5jyosMnLLlvg13mLwoV2/KkwkKffcn/ko7fK90I6F5k9TWhh4CTLkMFDs7SkglukkLiGf86YoqQlstoNOGgNy4BsBE5rpKmyYWdybl8nbppVOa8yDtqT7eOxsuP/VX4TeK1rb8JHBRMVGOxrEn85cJPxCAfE4DBqaNKsw6R4zoaTrWunoLZWybz+oT2OBEPS701S9/fNaUWqAoRCBQj9m/M8KJwJDcY5jrM5LY2GGTDe6MgrpWY6IsJUNM6EBO2x8gSwU8NOkugNsIOKNcieCYgCRQN2lb8TNS42Kq1VYDLG0jRgIwA4H2W3K4/5zaVg4us+ihHJOA43v+x6urbFiyjVrcHekhy/Nl6ya5sSxa09f740bbumsP56B69QgO3H3iQC+Vb9HtpvQAxPzn/rnkJvpaSBH 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:(13230040)(1800799024)(82310400026)(376014)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 14:50:38.0742 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 84d0ab74-ecaa-4ab4-ab8c-08dc96b8821d 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: SJ1PEPF00002314.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5708 These functions are not used anymore. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson --- tools/testing/selftests/net/forwarding/lib.sh | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index df7cacb29160..ff96bb7535ff 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -1225,22 +1225,6 @@ trap_uninstall() tc filter del dev $dev $direction pref 1 flower } -slow_path_trap_install() -{ - # For slow-path testing, we need to install a trap to get to - # slow path the packets that would otherwise be switched in HW. - if [ "${tcflags/skip_hw}" != "$tcflags" ]; then - trap_install "$@" - fi -} - -slow_path_trap_uninstall() -{ - if [ "${tcflags/skip_hw}" != "$tcflags" ]; then - trap_uninstall "$@" - fi -} - __icmp_capture_add_del() { local add_del=$1; shift From patchwork Thu Jun 27 14:48:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 808013 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2086.outbound.protection.outlook.com [40.107.220.86]) (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 C7D8A198E79; Thu, 27 Jun 2024 14:50:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499851; cv=fail; b=nEax1coVggUGgzwpHRc31EqcYjWQh15BuyXKiOrfvFH8mHw1jhbdPj4I3yfUI25LTxrjqHFAymO8AlTMuxCpGMZuQGTQeTeFPxQWP2/9L7DH7IIi+PXCet+r4yJaNop5W1mub7REA6Bn8jy//oE+uTCvfrEUVi4+fW+ZKLxBonA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719499851; c=relaxed/simple; bh=2L3xI1/Gu8A6m4KIPrTfZVISpxMkYWfbihh60wwVf78=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=CsWSplu5l7qYxaREnbWGncWro1hMHKr05G9TTutxVuvJYmA0hZtTOSuG+hC1clU1rK3yKGjf6dgigY63pdw+W0rgsssPtO7pimY9kUC4+lhvApUoQA/SRZ/4wdaVMIw4GaAb8BuuN6+rDVIsWoWvtpurGzzvmrI+bRl7FuGp2aQ= 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=ctVMS7ic; arc=fail smtp.client-ip=40.107.220.86 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="ctVMS7ic" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X6/i+weRDRYm+wB5jNkH3PIqo6S/+8EsUMqNmeautV59EWYIPDRDYTcOWWq8j4JVL8CrfxmqdZqzxNZ4dXxLqG49uqqHYbC60TPpQC1gpI+cCc9K0wIDMPiZfzZe1NBtYuvk/ID+BW1AQJNxVPWBernZhKYMQ73ZxfOjzbqnXLbVKkWphpciyLmssDnYXXNjiV3Ck6dC0Ukr+V+dbWQYMRbNn7LHAzxwgsfxxJ30GIGsjFi34razZyLRoNr0vQYVeAom6lWYQZT4hWNibFUnUg/zsa4iT7eRFLhErWnyNjl75MGgISy2vGD6JBU8+/PG2w2QnptbHhy6ceHw9Vl6Og== 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=KYl1+mCsJjcZehIbzlkMWmZmxE958q7n/tYNYtPRSL8=; b=aJ/cBInraZAfJa1xToyKoXdQQTr9cUe1H1faAVe0o8Tw5viZW1zNxTAqXAPmQwjzIVFFELYCgPHsO2oj3ZtmB7zmRp5g6XIqQKmXn8+oVG2Jm9bbTayw71piXNcA5e/R+VzSWiUdQdX9jN7ft1tQR6iEfa6cZKJssZ0s/pXpLDJZvG4L8QFTwfGz3Vy6FiTPzixpZDdMIyQAaUx37gcj00X4Kg6Avt2eiKIM4XFzLP3kEqbk4V2tminDJsNjlbQg4IQztyTDtoiWVBaipETtruvTX2NFscbKD95mjN+e5UZ2OXbR2R6bIk8RB5+iCGKkcTzBvExL/TUtBkXchxesug== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=KYl1+mCsJjcZehIbzlkMWmZmxE958q7n/tYNYtPRSL8=; b=ctVMS7icMMvW4jUWiK2hzYwut0zeSCk/Np4yTeqfY8Ga1c6ZeZ0KxKhUAeSEKOTE39MvGK2OdPuw2yJTVf5K/mTwmSJL7MCC3qSJkkp8bUqqQ4t/YNxPHk2rtfqbua6pgJlylNdGFM5mToONBsX+lq7z3v7E22DV4qgk8u8nn4aajqAYgappkJPgJIX1ooiTsuQNokDOZyc21YmdUaMmibyoaxCpUGTS4sZ5J6TPVyDwU6R2BDaFxFotDZGjor9NePcnlDEePyn7PDtcTbNWxVL2tSXqPZ6xq2rcgu26o8Qz2OW3EQjtWsNlbUI9C3ElxgRptwQVuayMhh6gglPGqQ== Received: from BYAPR02CA0050.namprd02.prod.outlook.com (2603:10b6:a03:54::27) by CH2PR12MB4119.namprd12.prod.outlook.com (2603:10b6:610:aa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.32; Thu, 27 Jun 2024 14:50:46 +0000 Received: from SJ1PEPF00002314.namprd03.prod.outlook.com (2603:10b6:a03:54:cafe::26) by BYAPR02CA0050.outlook.office365.com (2603:10b6:a03:54::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7719.26 via Frontend Transport; Thu, 27 Jun 2024 14:50:46 +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 SJ1PEPF00002314.mail.protection.outlook.com (10.167.242.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.15 via Frontend Transport; Thu, 27 Jun 2024 14:50:46 +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.1544.4; Thu, 27 Jun 2024 07:50:29 -0700 Received: from yaviefel.mtl.com (10.126.231.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.1544.4; Thu, 27 Jun 2024 07:50:23 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Danielle Ratson , Petr Machata , Ido Schimmel , Hangbin Liu , Benjamin Poirier , Shuah Khan , , Simon Horman , Subject: [PATCH net-next 11/12] selftests: libs: Drop unused functions Date: Thu, 27 Jun 2024 16:48:48 +0200 Message-ID: X-Mailer: git-send-email 2.45.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kselftest@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002314:EE_|CH2PR12MB4119:EE_ X-MS-Office365-Filtering-Correlation-Id: 88a8e1ee-9faf-4270-ecb7-08dc96b88729 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|1800799024|82310400026; X-Microsoft-Antispam-Message-Info: xLtqLsSsFEwtzddWBJ+DVov4yro9dj20rSY67UhbMW7c76hoqtpYE5oMFnqOB/CtufRZNu+iFhnDMczGnRcU9a9tUbmAIs4CkmoiAbUQ+ygkMX6MznyS1toHOz8X1fH5hX9T8W0VgMTBp3q5NQ7ZMBYL80eIqU1pac71RddRN4EOSE5Qi1QAYDdEAl4BU/NOkMRZNkZ0GlYxutva7Qcg0z0Vn95h0DcLw2/Oc9TjsxOXaX9VPQdCZrotKdWDYkQe5gd3BwqHNXTKNSMcsR45O6ewo8Fi36NFuss2Chj0OM6IWbzMb2+rGoL0b71ScLH21ncGu4oagF7i6MRCGALaBhJfkRkd6eJt6yc0Aflf5g7i3JvQbDi9BxKfUeHBftRGkikuTZDBDw7IqAG2+65hFQF+Ho2eT1242xb5wxk6dSIY16qn9176QPjB8IOIf7arFkO+a+kr2f7gE+0ZZ0bVzhlImLnQ/z4VUOZwbk0M/7an4CnCXaBQmS2QgV0UlRXa9Xt30KgwBkK3srNZiG0dQq1y+C0y8cF2/peMju8zrFPXEYjZCKskOLm3PCEN17cDVKcuxm9wVPO2az/s5YVy1EFuO0vU87yf2+ylqiNQz3JS1ZUeOfD1sUiMO14lPOHSlWToCDn7qkL5Kp2tNZSvguc+SJslFLOqIoRykQRc7ncUFdnKcAfsAIR19I8cyEAclf6jSeMdi10yy3vbWrf2MRXX6vVLFqsWd5mhRsZqviYvWa0GylsWA6fPc9fUcazkVl1/uisDTyee0m/UenY0x8BFO4Bk3L6llP6y6i+XNLLUevryO5XoyJPcTrhYBgfKZSClYJw9AAKRtxwEl7RUtBGRRf29ZsxpBOr1wFkRsMXysJ9MR2RZpukHDoOr2z+wk3ufBW+WassgFp/bgbTsMf8fm9A7RT/GYHp1b4g9sPvSyMNoPvGmZOc4fKyBjowXD+QmyO/hknBb9VmFfgl24WR9z0GGoV+qPVomqSx+jjLCsnzw1idpl75EQYJh/rvIMAO/GP4pxzv9p/SsEgHizqRUgmGM9rOetYKjXKj9EcVgBCZ1ufnLQkTHtxyGs7gQEJid7qRO1ILRqfzUjKYB7EAYDedbz97yCZGktdoCOI1hjgD8bL16MZ1ptNOWGKWDIC0apevWf2rd6PdnJYsiXxdJx/s6oO83cMXf55VRUvVJwQRYehJFi00Cz9DReyq7gAQQEEqyUJMwTLvkAtPA0mDEhiK7JJ5zbtlBjv4kHp8IjUDlaR+RpkYamdMi+ZA91mCyK36bwGcyTplvaXfFOg/KtbUsXIwIG6LU7GY/GWQ3BnYiBOyaux4nXlfTsSrZlISImqafeOe3KsX32IaQBDv3pYtaYkIczULSpveTECsoqmxyz/wZojvsIMCMlggZNzULyqVUrL/PpwR5BxqNk9mVC0/36b3fF44l2j5ZZI9BbuCGsRbssXH3gP21DA4h 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:(13230040)(36860700013)(376014)(1800799024)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2024 14:50:46.5432 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88a8e1ee-9faf-4270-ecb7-08dc96b88729 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: SJ1PEPF00002314.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4119 Nothing calls these. Signed-off-by: Petr Machata Reviewed-by: Danielle Ratson --- .../selftests/net/forwarding/mirror_gre_lib.sh | 11 ----------- .../selftests/net/forwarding/mirror_lib.sh | 18 ------------------ 2 files changed, 29 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh index aa96644e3866..20078cc55f24 100644 --- a/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_lib.sh @@ -101,17 +101,6 @@ fail_test_span_gre_dir() fail_test_span_gre_dir_ips "$tundev" 192.0.2.1 192.0.2.2 } -test_span_gre_dir() -{ - local tundev=$1; shift - local direction=$1; shift - local forward_type=$1; shift - local backward_type=$1; shift - - test_span_gre_dir_ips "$tundev" "$direction" "$forward_type" \ - "$backward_type" 192.0.2.1 192.0.2.2 -} - full_test_span_gre_dir() { local tundev=$1; shift diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh index 1fc8545da6e0..6bf9d5ae933c 100644 --- a/tools/testing/selftests/net/forwarding/mirror_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh @@ -88,16 +88,6 @@ quick_test_span_dir_ips() "$forward_type" "$backward_type" } -fail_test_span_dir_ips() -{ - local dev=$1; shift - local direction=$1; shift - local ip1=$1; shift - local ip2=$1; shift - - do_test_span_dir_ips 0 "$dev" "$direction" "$ip1" "$ip2" -} - test_span_dir_ips() { local dev=$1; shift @@ -118,14 +108,6 @@ test_span_dir_ips() icmp_capture_uninstall $dev } -fail_test_span_dir() -{ - local dev=$1; shift - local direction=$1; shift - - fail_test_span_dir_ips "$dev" "$direction" 192.0.2.1 192.0.2.2 -} - test_span_dir() { local dev=$1; shift