From patchwork Fri Apr 12 17:03:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628160 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2089.outbound.protection.outlook.com [40.107.223.89]) (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 6BB0214D29B; Fri, 12 Apr 2024 17:06:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941573; cv=fail; b=Dd5MAzf+TLEZHSfKPDOnKC/Nz5EAVZLa5rNpcvlP163xkVUahM2aYcF4qF07KTHcGlKn82gKP8tpfL30MR9Eih+fK5f0p0GjPgfCGGTPW0MQod2f3FjhrY1iMSCG6yQ1rZGl+Ylv/KG878usfHW2t8iqnRJ2+7FrycLkdjKIglk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941573; c=relaxed/simple; bh=8noxrdO3dZgEDc8nwQylBwHRzWz1t1GIEqsjg/VK2sI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i8EMusBCHeguY4QuhGidr2NtzIEfPY33Y9mZ6sj3tQ6a424TIFgsnGlcJBdtiiASJJbj4HY9HjiSh3p0qUXXpJCKTc+t197G8XRX5pADhCPgstTyX6m2U4nU+B3k13oA3VftjRy9LWHRTW0Kh48G6gAw8egXKehj2RfaPYjjX3g= 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=X1HSNeH3; arc=fail smtp.client-ip=40.107.223.89 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="X1HSNeH3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dZfQRnFxtqB/ZijjljwWMtfV/YewEsYEzIhvva+bJWUhHh3gOSOws3b0c4ZbuV8NfftjYDSTGKrjeRy4+l4abA2ptQXGjPsrKmbY6oXYgfiWILdCH8jSkSGJqRdZJEyF/Sv4H13rsxFRnxbMduAiqfNzA8w4Ww9M60uD8g1cWDAd/oaSNpCeQvODufoN2jR9LEwP5P0fEbMb6DeyL+YuIBXBbd+AQFbRUOuZrp/V5Jceekg3LfsQc8FTF3XlsC1UHjtF616wI0JdlPWTPgPc+u/Ct3dG8j0wBxphNCoZLU4vym4ZfEhcxHoTlKBV0chre8onGxTdMYVmQnTqztTz9w== 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=YT1SM2kxVq74dq4TOCc/zcAFTStTs0y0dF0oPxjr1QI=; b=SabFwGQ5aBbfBGrV+eCCpJ1jTxoE1+p1BuFONJzHxnaatR7QGr51Yezpy2fYFZPjYZaUPx6mLVu9L+ilDnkUBxo9AxRkP2WhnBn29KhDfc37BBR9KPe+GI2B4hbrjJXFuHZxAflfVWg2nshgoLwNG4aPQeabW5gHiRST1yfKX+Hz32Tz0x2PsuTcJ8BeKIdT4ZA5QU3dfR+edgL4V8EEtIi0tPsfRci1lcMI2e2MBUYMBway7O2XaSm/MgRNkn7vgSfYBP0XElQ4gfiQzlI6ZdeLlijPLQ//E9d0nUXTKVM2aq0bhKQJLj3aOD9/pXsDe2NZadgR3qEG0lzFJDsgyg== 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=YT1SM2kxVq74dq4TOCc/zcAFTStTs0y0dF0oPxjr1QI=; b=X1HSNeH3lb+HevWvXK38Yu1Um9dHIZuPENFX60U85Qn0Aw485TGdtQHw0rSpeOqWl0zpYWkoeADG/7Hi0D0E5tkPEb+rCRMf4gBiK9/d6Y6NF3B+ZvLbei3y9r3CdSju9BeXKc/2g7AcQhPgPzNl6uVqyfSZqeBJIr++7ltquvX8qOw7CFQ3l7ulSaLAgCx4YTBE3e3z5PkuOCLb9pdq5nTt70nXoUUPwWQdaE18JYaSE1OmLXVHjxnrnzB/B1ELHlKA7m53V2hYgYeoAmt8LCAQGygtPPrnTVzRQITziODtip/neXPhkLbrEu8MtPyhF4rpSR3iG6GIXYTLjBi/9g== Received: from MW4PR04CA0102.namprd04.prod.outlook.com (2603:10b6:303:83::17) by MN0PR12MB6342.namprd12.prod.outlook.com (2603:10b6:208:3c1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 17:06:07 +0000 Received: from CO1PEPF000044F6.namprd21.prod.outlook.com (2603:10b6:303:83:cafe::35) by MW4PR04CA0102.outlook.office365.com (2603:10b6:303:83::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.19 via Frontend Transport; Fri, 12 Apr 2024 17:06:07 +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 CO1PEPF000044F6.mail.protection.outlook.com (10.167.241.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:06 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:38 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:05:33 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Hangbin Liu , Benjamin Poirier Subject: [PATCH net-next 01/10] selftests: net: Unify code of busywait() and slowwait() Date: Fri, 12 Apr 2024 19:03:04 +0200 Message-ID: X-Mailer: git-send-email 2.44.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: CO1PEPF000044F6:EE_|MN0PR12MB6342:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f5c886c-6422-4e96-a4b7-08dc5b12d7f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +bwK+jM1rn0PLhYFokGKGaJ1ry/z0kBw/6nqKNTVfevsL1V70Rkb9BgKUMzW6p2uCHx8YzD6PwHqfvJlk3fthWrVRM/PXm9BJY9E6mfI7acg/7ihFVRhDqCHidkVAWMlbjjcjcpBr3qYoNbbSJcKxuvBOkVqnLMyadmI0WZp04RzsfMv0rTVWodFQ9fPcADNl5tA8/cS7HSnPj6SocbC8fWzp+n2nzD29+3n+693HVqkIJ0zCf6OMpoK4nd5Xp+ePw9b0ZcSdcshVV8Wnckj43kThXABQ49RAvmg2jGCjjCbsQxHLDP4NDpLG99IQHjLKL/FfeNCZn2dVc6a9oggqrVgA0fQHtm1KM4+KktcvdEprHl1YZ9+7VLBkOiNBNJ62yZLq8w4rXU7bUW4XPg3axqXcqOQXy5ykOxBS4Vms+sqQCIdKkpqFrKaK6iABxKkgjbc0MqBrUMF49tRxwX6GlKHghLTzpqAoLmQQNEqNPUVAbYQnvt+IEWRZt+WIyr9FwdoCI/PFG6eIkN4GpZeLLijdTW25k6veq7O9nyQdHD8/zhhwpEMSMuCyp4gRKee1uG5ifLRr2DL+U4DUaJYz7kMZ5ZaBIYHrC59F+shfIuR+W+t9pmkODfBv8cET7Z8BkJzvo74rxdBMJ98xPAYP8cvCAPjIBr9W0H85bVUfyax7SLxmDZ2r0XRCan1zTtUpJ05QsNTwtc9Uc0jQc39rz9ba/hDA0GJPAVshFU96EOqUOQ2RFLO4kEhuQP9inf1 X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(82310400014)(1800799015)(36860700004)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:06.9075 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f5c886c-6422-4e96-a4b7-08dc5b12d7f7 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: CO1PEPF000044F6.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6342 Bodies of busywait() and slowwait() functions are almost identical. Extract the common code into a helper, loopy_wait, and convert busywait() and slowwait() into trivial wrappers. Moreover, the fact that slowwait() uses seconds for units is really not intuitive, and the comment does not help much. Instead make the unit part of the name of the argument to further clarify what units are expected. Cc: Hangbin Liu Signed-off-by: Petr Machata Reviewed-by: Benjamin Poirier Reviewed-by: Hangbin Liu --- tools/testing/selftests/net/forwarding/lib.sh | 22 ++----------------- tools/testing/selftests/net/lib.sh | 16 +++++++++++--- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 4103ed7afcde..658e4e7bf4b9 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -95,27 +95,9 @@ source "$net_forwarding_dir/../lib.sh" # timeout in seconds slowwait() { - local timeout=$1; shift + local timeout_sec=$1; shift - local start_time="$(date -u +%s)" - while true - do - local out - out=$("$@") - local ret=$? - if ((!ret)); then - echo -n "$out" - return 0 - fi - - local current_time="$(date -u +%s)" - if ((current_time - start_time > timeout)); then - echo -n "$out" - return 1 - fi - - sleep 0.1 - done + loopy_wait "sleep 0.1" "$((timeout_sec * 1000))" "$@" } ############################################################################## diff --git a/tools/testing/selftests/net/lib.sh b/tools/testing/selftests/net/lib.sh index b7f7b8695165..c868c0aec121 100644 --- a/tools/testing/selftests/net/lib.sh +++ b/tools/testing/selftests/net/lib.sh @@ -58,9 +58,10 @@ ksft_exit_status_merge() $ksft_xfail $ksft_pass $ksft_skip $ksft_fail } -busywait() +loopy_wait() { - local timeout=$1; shift + local sleep_cmd=$1; shift + local timeout_ms=$1; shift local start_time="$(date -u +%s%3N)" while true @@ -74,13 +75,22 @@ busywait() fi local current_time="$(date -u +%s%3N)" - if ((current_time - start_time > timeout)); then + if ((current_time - start_time > timeout_ms)); then echo -n "$out" return 1 fi + + $sleep_cmd done } +busywait() +{ + local timeout_ms=$1; shift + + loopy_wait : "$timeout_ms" "$@" +} + cleanup_ns() { local ns="" From patchwork Fri Apr 12 17:03:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628161 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2057.outbound.protection.outlook.com [40.107.243.57]) (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 9176C14C582; Fri, 12 Apr 2024 17:06:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941575; cv=fail; b=atzdc3s55eRrrQtf3fWgnKrRx7CMhQWE58TMelDOAv7rVZjiSnu/nR7NP5//eQWgzBIvzkzJqKKYldxbWsTpKx3ykreF4QnqwnmnFfynWILLlCCSqHi4mByNqsEUKs2SyrtVznpH/F0LHfhHxWSVfdxyL2mKDXVnOguSe/M0ets= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941575; c=relaxed/simple; bh=M2uZ/dhBefUrDGLiBoAQP0/VwhnYBnQZyg1uKLTPekY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=RFkNm1xPViApIBIKjaNV7xAgsBCtMw5xXLOJnbrsL5siuY3WSb1RSOSnEldRDfMTf7wv6eZULCsvw5GjC6Z/ikbA8gvGQ2SkQxpalPZAnpaisfFeY5guALdn/E5l3vXf9TAliIXvtx2FolEzUbtwr4XfBA2WCnylC8rJMHMRQhc= 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=G/G8i2RK; arc=fail smtp.client-ip=40.107.243.57 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="G/G8i2RK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ClfHmgcys3gn6DntmkkEprSQdEzj6zvRhIZDmg7l+6btW+0LTtE1/7AnH1OBSorK04Z9zPBoGNjsSWsCITAf4okhdF6mt5qinwExh5O2alWPa9qbH8nKUK8DP6wzlxHgRzIQ3Xvp6gfgF0CSI/J1dkoAiDJ5DckyhxKjnkYivsjE8bNOTtLWu4H9caVvNQheVH2BmP9T3UtBExhmXwYNcpzQK1qnwC4FT8M4hxYAAcFAiGu2XlOG2HIlW/IPlGjNRfW4KTlCVPIQjrbqNpoQR3sObS8QmzoBsuz/XD8BeBqgq5O6TXM1gu1Lk/G9tDes2NCgTp9KypMSzsR91r3+Tw== 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=EhmgbFPsRkFsd2yIHCyzpsdvRKy5pvZzDJMwYqjJyfI=; b=ghapg1+vSOohcR3YasmUmfNuOh28IQOrcwI/kLuSY11lMsBs4qSsyhTPkkwoFeBLHpgQ2LxGF8OIYkDaUZKcxlVKeGbOZgwCTtH6hJV7QeLd5rUA0YZPYiOYVieY0i07pjzi961k3Fks4jzgPj0srIvaiDbzpMA4IcDy+HtVdRJVrIwrdSBuKYV25DgvfKBDp2zx5ob1w3oftifCNavbgDvF8MZAttWeegmBhTZ5HK3frWPZOlEVDARvNDriCN9caOwxkRTNQ28jmSD4DbdDd1aRdDn+REcO3ojaZIybV3yMJ36DDk2lNmvD+hclIOyfGLD39ttv2G1qM/d8KngmzA== 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=EhmgbFPsRkFsd2yIHCyzpsdvRKy5pvZzDJMwYqjJyfI=; b=G/G8i2RK8prTBeEG7x91F4d6850A910rvefPFVeB9bAeyJq9ON4AJuuEMIq27IQHz6JqCdxqWcTXvCAStPQ5XqvoOHW1xMV9mbVEu15gzZpirA6xQJizdUo447Z6nk8rWYYcq22XOn1BSB87bypOeepk+BrhQ7//Q0mqkmrNm4tWiOPHzAIKQ4CoStK5TWIzF0ww//1BaX8MgfBasdrC7C2Psc+BVXFIAym6RCpP0gX8aRS+2eLADUi/gEmTvFob6gfAYnG4O9U8oWWJbnwgtLwuf7tPs5LeOfdvReNyYhkq2eMl9jVzlcNuCHTNNeiN4CFaFjsKO65OkmnmVO984w== Received: from MW4PR04CA0302.namprd04.prod.outlook.com (2603:10b6:303:82::7) by MW6PR12MB8952.namprd12.prod.outlook.com (2603:10b6:303:246::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 17:06:10 +0000 Received: from MWH0EPF000971E7.namprd02.prod.outlook.com (2603:10b6:303:82:cafe::c9) by MW4PR04CA0302.outlook.office365.com (2603:10b6:303:82::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:10 +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 MWH0EPF000971E7.mail.protection.outlook.com (10.167.243.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:10 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:42 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:05:38 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Benjamin Poirier Subject: [PATCH net-next 02/10] selftests: forwarding: lib.sh: Validate NETIFS Date: Fri, 12 Apr 2024 19:03:05 +0200 Message-ID: <4a7602678782a1f526bdcc895de437bebc96a695.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.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: MWH0EPF000971E7:EE_|MW6PR12MB8952:EE_ X-MS-Office365-Filtering-Correlation-Id: a13e32fb-0df2-4999-1a15-08dc5b12da12 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9T0Qvnx3ughWLAD9f4JQEWhP/aX5utl5OVhoxAO9qaPOIPSr9bHIdqkWda3YFKV+Vrf4Upz1kC9/B8m9Jd2NjM7BU+DYxW8/tFTB953dGCSnNGp+AVNS2QDD8JjiBB84xGokiO7EOBVjstgAK/wnyLOpdfp5Eki7nardHTcS9C3mbQv6oW6Xrwpz/hKpVyQeaq7e2pavoU5q4hMwgL7waq1rhTZj8rTcdj29FMFxaVy8YeDo/Ix1fFo5Aw8xF74Dox+E2rwJQRsQCZfGqDiP5R8kE0XzkfISsZnEYZzO/ELAkMs4Asb67OpP2wzses8HX3JgzPPZahEp8VZ6/qHeD8zT4YtHISd9ZMMkpEkqWhNWkEqLT8el/RBVizX+aigwO8PzWfnu3MGBEQuwdVOyr5OUqI4HVdiWL0oYkkw/NHOk+iKqbXsrDKXPktBraSL3TeSdtzsJQGFZJJ6EqMkjqmBdlp8REmsoJ+XhtJx/icLuMTldY4rsFwCKpDXSsNGXJXGWDyeLgto0WLmXhj+cPUWNMhcPx9iatVVIFH5zmIJbSmSDBZ5QS8KILo9h+H6wB7QYVwJeKDdtB/gEgPLlESuagZBoSceO/6VnN3uLqX8P8YFJmkfz/h2JyAKZHfCoFBVwTTPu/SsAuP2kHEret6+VXb/HctAi+kdPtJQU6eM/e5fFlfSiYBRDdj8TehWid7/rpUzKrs9cu8hoa/+BO5Zwk95NA38aDzmzKursG7RMp+POBms5UKIhWeLpy8AO X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(82310400014)(1800799015)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:10.4988 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a13e32fb-0df2-4999-1a15-08dc5b12da12 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: MWH0EPF000971E7.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW6PR12MB8952 The variable should contain at least NUM_NETIFS interfaces, stored as keys named "p$i", for i in `seq $NUM_NETIFS`. Signed-off-by: Petr Machata Reviewed-by: Benjamin Poirier Reviewed-by: Hangbin Liu --- tools/testing/selftests/net/forwarding/lib.sh | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 658e4e7bf4b9..3cbbc2fd4d7d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -273,11 +273,6 @@ if [[ "$REQUIRE_MTOOLS" = "yes" ]]; then require_command mreceive fi -if [[ ! -v NUM_NETIFS ]]; then - echo "SKIP: importer does not define \"NUM_NETIFS\"" - exit $ksft_skip -fi - ############################################################################## # Command line options handling @@ -296,6 +291,23 @@ done ############################################################################## # Network interfaces configuration +if [[ ! -v NUM_NETIFS ]]; then + echo "SKIP: importer does not define \"NUM_NETIFS\"" + exit $ksft_skip +fi + +if (( NUM_NETIFS > ${#NETIFS[@]} )); then + echo "SKIP: Importer requires $NUM_NETIFS NETIFS, but only ${#NETIFS[@]} are defined (${NETIFS[@]})" + exit $ksft_skip +fi + +for i in $(seq ${#NETIFS[@]}); do + if [[ ! ${NETIFS[p$i]} ]]; then + echo "SKIP: NETIFS[p$i] not given" + exit $ksft_skip + fi +done + create_netif_veth() { local i From patchwork Fri Apr 12 17:03:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628162 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) (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 ADBB914E2FD; Fri, 12 Apr 2024 17:06:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.87 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941580; cv=fail; b=ZEss15+HIbeQLldHXCdmM8CYOQUDhhPNjTzaPhby3hVSLm7rDsbkTueOsFvyjAV41gJKZjG0RK0WeVDjW5dl8sHqs5Q16qaJAa3ix1CNb8KMSYr55IU69V7O39VHuHxVkBZf5QPIxNCNeBOroyCr35TwHmDM0mGa0kGGAxamP7w= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941580; c=relaxed/simple; bh=6bIFf1z9WBQX5FUb8QkTBbv3CN4kzUaZtw/GnAlu1CY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KmiaNcF4PiEtC3qd3G/RwickzQj7AreK0rwhPakxD3Ow1trDJ9T5RNXGXEWqGEK5BqaIDqTtI1gqDofZBoEz8EdXxpDE2k641oofFUBK/hDR0aIOmkejLZ0ZlQjQ9YBRz6dut0acbssZKF3PLJhc2J2EkPnMtr6FnhvTDCtpA58= 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=NVZrI48+; arc=fail smtp.client-ip=40.107.237.87 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="NVZrI48+" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k9Ssyg/pFcikqCnvyBpC8kI1DBVXA4pjPsmtNCpwqAq2hq+xMy2WNH3imH8pf1LHVbDeuHCTmyWwzasGSzZsppx04ONIZnEHSdRz95EjMq2PC9u5Hp3DbENS0iC5DgthEAHRKNxcA6WWlzeB3YsVIvWimznLuM3Du+1XsHMT0J87SwBNiSmeHexJfkF1eMDKHDnY+ku8UL281rr/UmfhV6qEiLObLH9ktF68Ld5wgJDrMFdZe2PDNBFkfMQ1NBgb8IwYeTx0iRjPlWu6s61joXZXbHoFvYGenNbFEpEVrqh5zL2ejnUEYnRHlntjo75o6NQMal0UZaeKF3Q1BkHXdQ== 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=fFwcgmFMwihHZj/7XLqErIOyS7Jeu1KoZQ0EhxRX2VM=; b=SbqoVhW0pIuTlY2BH1HCnvWuDIEbUMr8mBycETFTeT3jUYfhnNR2ktgQLPjYMk0TzIJQ+J2zjniqWu8ozN9Oi2wcuHMHaDcQrrD6BM0mKDsDZ0SBdrZktpyfcskBysk/Jm6uW8T4kf1/oJ1xBZRNED0qvWaFs1G59td6pTIs7Qz4Qo9epuZeY/Bs0WwChqViQK8iazY2SydhQxDGVDZuL6PnSbpwNX7rR+cNZP++zbjbPvOVcTdNHGwd0oPK2gcCAs+ktSFLowEvPMLF8sfeOXclEjNN9rK0s+P6IfKVtgG0TWQrGudzB8RD5OtZnPfZVNQ3yvKUrxD1nb6+aHRjZg== 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=fFwcgmFMwihHZj/7XLqErIOyS7Jeu1KoZQ0EhxRX2VM=; b=NVZrI48+2zi30YTVwoc7aWKSwfMBovZyWtPFrkwMG2EEoaM3U7cKktTkHrw4Xsesko9tvlYleyanERTIqg5l1+RpZh6i3E1VJUqi2zubH75ujY3z4M4ZBseNf21ZKkoBEwNsvdR1eVtzCNXDB+SP2x9JnGLQKVt66DJi5UXiJCLtzTvgAHSQ3Kn0iA4sbaHD1U3iXRoBOEPR6ECZo2MfzFKR0NEUjpf37lHSbi+BpF521mmscKNxJ0m1rNlClZX9804dMfT/lVcbfP0VcAvzV320DIzVFlPUQ0vTxWm9wi4Ytmn/hONuJiHXeD9+IiNYZ5lpfgg7SL1aIAOgjSyjBA== Received: from BYAPR03CA0008.namprd03.prod.outlook.com (2603:10b6:a02:a8::21) by SN7PR12MB6888.namprd12.prod.outlook.com (2603:10b6:806:260::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 17:06:15 +0000 Received: from MWH0EPF000971E6.namprd02.prod.outlook.com (2603:10b6:a02:a8:cafe::c2) by BYAPR03CA0008.outlook.office365.com (2603:10b6:a02:a8::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:15 +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 MWH0EPF000971E6.mail.protection.outlook.com (10.167.243.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:14 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:47 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:05:43 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Benjamin Poirier Subject: [PATCH net-next 03/10] selftests: forwarding: bail_on_lldpad() should SKIP Date: Fri, 12 Apr 2024 19:03:06 +0200 Message-ID: <686eeb760a35f228bde1392ffa3f59462223db26.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.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: MWH0EPF000971E6:EE_|SN7PR12MB6888:EE_ X-MS-Office365-Filtering-Correlation-Id: ae524aaf-1228-401a-d3a2-08dc5b12dca3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: asmaxS9Ny4wgcxqx+t227s9ygzbKcYDOqwR7Rwgx4OXxCRBjRbn1W9k2honT4Dzoj79YZW6Nl+3dLVeBypilT/QxrObcEvxspQsjcvrB44JsQhqC5iTbVam7+numoqrCOZxbMZ9zHQV2D6kDb3/cE6AFqJ3Ddc4CKnYm9drRpsrpoOg2N+7wMUZ/6jlD9Xl+BuRJWb7CQO+KDvb8UJO2kxTStYeP7n1TOtT47VfdvvEmqdBs0CkHv65cIYiGfo5hYN0xt1dBuFe6jfmYVZrWtMwGjA2+JyZOdQgeQ0yViEL6qGGzb9fRIlDs2dVVHz76xRnb3H7kOCbz9LOwnzjCTPDJ1KGWZy+tS+DU43RtlNIK42rv4DFls7tlE00jZtPRQUsNMVJFWMB/8FAF9YLO8f6r8uwyr/UCVNo+hw+Gef+NS8/xSFnjMubM4WbuigFmtv7b4d9kzEbnxkMt25JY/qaU2iuzOW8ZBnmWQH08QW+F9ndeld8rKs5nAA3fm5+hGLjA6ygf1mAuLaJWmjqGkRzIIU8u8JdL0pD3fFB7i69OoG3KS8eetBfwUt1k3e5MlGpVLsHFMtPmuZzsPw4xw4H6Jgq4miQiZJSubBMmfj5JotAnDq4LjKiiEGe2F+UdZhkrbze/YxqzkK1Pa22FHOdhvccWWXBM8V0iUO5U2vgSryLs7PYnlnXIR9H9N6/duMnT3R0cyp6zoCjUojAtHey1cB4jXCcRDETTn+pVpDHRnyBSCXPtORlZ4kUPCAqp X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(1800799015)(82310400014)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:14.7312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae524aaf-1228-401a-d3a2-08dc5b12dca3 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: MWH0EPF000971E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6888 $ksft_skip is used to mark selftests that have tooling issues. The fact that LLDPad is running, but shouldn't, is one such issue. Therefore have bail_on_lldpad() bail with $ksft_skip. Signed-off-by: Petr Machata Reviewed-by: Benjamin Poirier Reviewed-by: Hangbin Liu --- tools/testing/selftests/net/forwarding/lib.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 3cbbc2fd4d7d..7913c6ee418d 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -2138,6 +2138,8 @@ bail_on_lldpad() { local reason1="$1"; shift local reason2="$1"; shift + local caller=${FUNCNAME[1]} + local src=${BASH_SOURCE[1]} if systemctl is-active --quiet lldpad; then @@ -2158,7 +2160,8 @@ bail_on_lldpad() an environment variable ALLOW_LLDPAD to a non-empty string. EOF - exit 1 + log_test_skip $src:$caller + exit $EXIT_STATUS else return fi From patchwork Fri Apr 12 17:03:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628163 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2047.outbound.protection.outlook.com [40.107.236.47]) (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 C3AE314A09E; Fri, 12 Apr 2024 17:06:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941589; cv=fail; b=fRrT/uDJfwe8KAsIwc2xs94PzDA3nvNJLsIjg8Xf43GA4p4+L5PQmbIxRxMLd5/rU6Vq1a4lN8JYc1iEsre1f4GTZ0ZkbJlXrRkL3pA6kzrRq4uEbnEglhlK5mbJx2LWA/CUwWQnCC55CFPKtD0TfsgfaMwZ/uukBzopXPS46c8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941589; c=relaxed/simple; bh=OyEcnQeAkWWdRUVtd2StHXqQ+LTpiMBSZSmYlCM4tqg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HfE9TOau6FBLt8G3ZmRgswqPXZdAcnkxBVv2GehsyR8cnoKY+M6eRmoeLbgulZCe/iDLJzRuvTPED5KcfAe+TnRCEWXSKq8dmzOW9in923lPonbCptNT9B9DiV0qS5sNmAUUD6sykhopwL0yCGnliHnKUTrV2PC9yXIY4cRc+YQ= 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=LUMEibmY; arc=fail smtp.client-ip=40.107.236.47 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="LUMEibmY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h41wT0XOgscNWB9FS69IQygPfDF4L7othLtFfrU3AgSGDo3blIcN4xG1IIalG2zthMCTZlEB2m6sB4SKZT+CN6EhkKyiK+I6BJxVnHRQFKayTp9m6ZouRjCybnumgpDdGt5OSWzcigpn4NmyY04snolUnOcnwCrOma4zMgU83B9zI88LuDulREyAic9+v/tY2T9GM2St+vc8FLkAz+RRc2Urf9+4nedLldfirUClaCENkGolzF2hsrM5K6WMTo2Oysk5+T4rCN7mKcldJA+6p2D+klZHTuI0SIcqUm9OeBpDQuklGIGuq6oi8Qf6AC8YmFTrBiXeGbxyrZWpB/Plxw== 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=hq2/PqPSTA0FJq9h54nrGBD1pqEih4yS6eT3b7b5z78=; b=bsGAd1xSMvtU5F3j4LUewdBry61mzH0tUMk/r+Q8cCn4LkQyxlBkytk1FpnBHhIWTQAe15/AaMwuGpAPTIHMwvWi5KK9TcxV7C5xQHifkbjFvQU1yRT44WjdIkJcI4RkAFxRA88DeJkbJUGzCN1BtSQ/ISzchz80DobMqAFb3W2vFpi8tr5m5O2kBgtUfUOqwgEBBk87x4lUsafvvW8282N6K/fOUI1HtzK6Zv0FVM9u0/6isOjK7yD52SxE0nO6HZd/RmVUtOl375pnw3vmGNN0wO6NW2cJUeWG7/IZAkvus96tp1j1a0rjkGB0cWkui2lGEZICL9Kwwkhw8LVWnQ== 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=hq2/PqPSTA0FJq9h54nrGBD1pqEih4yS6eT3b7b5z78=; b=LUMEibmYhxhgx8EJsWGxJw2tBKfuIVlaJwOnBjr0uGsFqKaq+S/tO1G8+L0OBj/M5wNjCpwqtP/eU6LdvYfvvnOroTfjUiUUgt+m2pKs9LXIweTrk6F9j2KQHcHrldTFgc9ChVr0KOdROXLDHvywMJxGo4Y22hxj3wEw+chR49y0PLeUNUJIOHqtJT4KkH12kxMM3pcf7G8OuapudqgPn53Jh86USp4laxP00HR5Q2CaWztkpuexLHnFIQXwEi6RcCmWRW93hnq73L0Jpm5ETi/OvMhCAGorgvCqWf7goKz+QIQdm6fcuiVdG/zH88uWoeOljbSS+3J4z+OpMeI2Dg== Received: from MW4PR03CA0186.namprd03.prod.outlook.com (2603:10b6:303:b8::11) by IA0PR12MB8421.namprd12.prod.outlook.com (2603:10b6:208:40f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.47; Fri, 12 Apr 2024 17:06:23 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:b8:cafe::31) by MW4PR03CA0186.outlook.office365.com (2603:10b6:303:b8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:23 +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 CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:22 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:52 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:05:48 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Vladimir Oltean , "Tobias Waldekranz" Subject: [PATCH net-next 04/10] selftests: drivers: hw: Fix ethtool_rmon Date: Fri, 12 Apr 2024 19:03:07 +0200 Message-ID: <837240b7d73895731a3e66a2affd9f0aac74cc10.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.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: CO1PEPF000044FD:EE_|IA0PR12MB8421:EE_ X-MS-Office365-Filtering-Correlation-Id: ee1a1552-9a89-4384-6a5e-08dc5b12e142 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: amXQzgaKcDaDpv/JoS+uAKrSe3ecANlLrOF7Ofcbl0arDAS0r6pYlOEAYVmq1Su6FmloRsiOX9gwa4cPC+fifysHMGVdHrZix/z3gmQ0aGQT9DCoGHpalKJXApacjKVE/T1TxII47YrC+Q40KfYYq+s1WJcHs4bFnFlaAr/jYjXtaImAuMEPly1slkSEXFA7SCJDvnJOLRU4dpAsacaQPn70xvqAjMAB0rhO/UAyECtyDztfO1P2hjl3tKWz3GtNQ2PHthA0wd6G8cGd0V+PEA1hJZlGAtccZIpietjUdGhO24gRP+jHxC5eKFsFYEAEw4paNxTr2Tshe8z9eGDtEgKXCwI6ArChYgRRo5sNO1qb3sGDT7QBJ4Mj8OsjcphjA6trsyqyfrUMWkSiPIksAhe/g8PmvsIUlFyI/7U0TbkX6yBqx4vfvDh3eKH2Cn/KCmHv4WukHGBaHRuH4u+hVtDPjO6a+ZGznsFe4a8yWzfg5RFU1QTU8mVgwyEnO7UgArRoOHSP0Cl8jinXiv7tEfaRNDPWxxZ1vRYepnUQMtwkBKcj0bbTk5bOwP2hyJHBG5mODir8ZZI63NeCkxOhxdXvIZBIIeAq6dv0UCUfkbexLbu70i2rmV/ewIsWGg/9VSu1heYfKcWhKTwo8uRc1/u0Vpy1gkz6Ao9PzTgbQm0g58RSVwT02JRs/knHFPM8eYgO4B1sgDW1iRgT0Lp4NYrDPkyaLiz+Vo3B1djVv38IWAB1Qe8jx7mueUEqaWx7 X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(1800799015)(376005)(82310400014);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:22.4970 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee1a1552-9a89-4384-6a5e-08dc5b12e142 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8421 When rx-pktsNtoM reports a range that involves very low-valued range, such as 0-64, the calculated length of the packet will be -4, because FCS is subtracted from the value. mausezahn then confuses the value for an option and bails out. As a result, the test dumps many mausezahn error messages. Instead, cap the value at 0. mausezahn will use an appropriate minimum packet length. Cc: Vladimir Oltean Cc: Tobias Waldekranz Signed-off-by: Petr Machata --- tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh b/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh index e2a1c10d3503..8f60c1685ad4 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool_rmon.sh @@ -44,6 +44,7 @@ bucket_test() # Mausezahn does not include FCS bytes in its length - but the # histogram counters do len=$((len - ETH_FCS_LEN)) + len=$((len > 0 ? len : 0)) before=$(ethtool --json -S $iface --groups rmon | \ jq -r ".[0].rmon[\"${set}-pktsNtoM\"][$bucket].val") From patchwork Fri Apr 12 17:03:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628164 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2081.outbound.protection.outlook.com [40.107.92.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 544C114D2B8; Fri, 12 Apr 2024 17:06:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941591; cv=fail; b=VsxQINUFABMpCuRwv6CVqqjlQKUkS3uXDpaOf3fDmUN66EHEqf+6WS8Ly9yHvXwcVGzZaBYdiYlnLsoLrEXszoj8Rx+zg38QOfeuvjE6cNZ2vGSR4vrKBJAWcuaRQ99o2kDI5xixcmAZK6AnN7ypuBo2CTKxA4gaeX2Ev7ZB1Qw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941591; c=relaxed/simple; bh=Og6QjflOjmOeoJbUzIPNu1OEQuH2Itk/muhQU/LMNPY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Kr1EZOPMTWTGTSj/YeAkszEsx9SaZ8BmYKsxNR26+QRGm3PLvKuy7KQn7aG50oYvVniu1zk00UtFkMqOkJg5XDmJBN42HsEtXhGBH9NNGwvRl5NfnWGs61bgdTaOjogiX5nSZl7rU/p0RNhq5F/OwioXK7MA/XN18jH1w4Gef+o= 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=fiJYN71m; arc=fail smtp.client-ip=40.107.92.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="fiJYN71m" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i8qIGgU8GU26Z24nc2ym1+azNbH6PDKHDQ4zYaiElxmJPzkaT72DztE21Y4SDVvmpNC9+7ksxcqmZqq8PMPlisG/YbhipGP9G6s+bl7ssaY/xXlIelXS6TbnvmM4hKYjU9mz1A8CAbPHmeyZAsh1eaOXOd4Uss9asIdiYMR3mNAQTApWsX6C/FTst5ojNh0xhRznHdbkVYhDiOxGsTwMn3365Dh3znxLFMi+ika4D/NdQnBpDBxnR1f/iCFXWwbuPTodREikfeKECzpyvh7sUmGXNULZtlHD7bb5kW7+UkiY1Vpz8Bhydhl1WXbMw5kE4zuo9b7SW+KdLO8RHO2NaQ== 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=XA3AfIu2I2c3AWt7gR+Do+pAAFoeTS109baHHny/clo=; b=DxknAZ7Ac6VMB1BG0DMfEm0dyxGv9OTbaA1eS4fGyI1RGRnM8jnLnm1m4Jm5bwDCO72c0He9BCH1/GjF4sr4JfYR18hqGybT+LLEtmoE+JgaB58T4WaBtc43YMURqvr4MlpY2G0iYIBuzpz3aFeTgYltQ5FQIK6zJi/BmE6sLHNm9LaB02HLDqoxu+KGukMT+Kb9kd5lpHtqUKLaIqRFvtRzO0Pr19BpsNYsmbkG3Hhot4THw7AmYbGHOjoOPzNHJQbVfOjt4kGMOyHDb9+onsFFhAwt+hcZzVFTZBHHmR5uaZB4H9Fn82JqfzzzEoAOrXzNymwPYW9ZfeGo18g+3A== 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=XA3AfIu2I2c3AWt7gR+Do+pAAFoeTS109baHHny/clo=; b=fiJYN71mLVpZpAjxhNkYSA90XyWy7WvlQrC/9eBSeSiZe7zWvcy2KR7NU3m+0T1/D+p4HXEtUT9+6D2N89lyC8e/hpsAKX4Lq0e2V7JZq+6LQsj22+usmokHaWJ25ZKfiNJR1mcPwqBClbncF7G1Ud4zryFXi5ESsA+bSzK6KYHhmpgxFsBueKqO7+0b1S1KVxh7m8p2NfNjeG/h0NpKIsGH+AejkqzDU+8376jxAmAk71AZb0lN1Bb9U9oBYFWRG3RINxqhXsHIgmh0YVDsTg1Fr5WWB8wjfd2q1flMhRQPsmBkB7nggW65EKMhYAJHOgQHmZas6yeAl+rT+oB2WQ== Received: from MW4PR03CA0186.namprd03.prod.outlook.com (2603:10b6:303:b8::11) by DS7PR12MB5743.namprd12.prod.outlook.com (2603:10b6:8:72::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.54; Fri, 12 Apr 2024 17:06:26 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:b8:cafe::87) by MW4PR03CA0186.outlook.office365.com (2603:10b6:303:b8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:25 +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 CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:05:57 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:05:52 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , Subject: [PATCH net-next 05/10] selftests: drivers: hw: ethtool.sh: Adjust output Date: Fri, 12 Apr 2024 19:03:08 +0200 Message-ID: <808d917f83511c89165dd614f0d6a1174c92deb9.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.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: CO1PEPF000044FD:EE_|DS7PR12MB5743:EE_ X-MS-Office365-Filtering-Correlation-Id: 57ab682e-2096-4e8f-f0ee-08dc5b12e32f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wJNGnuRhX3wGwO3WtUagGgPN5acx2nNeg3wioDEUD9C4SyYWnko7umaJw+ZiI3nt3G0t4JPk5wRKRGj3eRsMnXh2kqKEMNellCXF677TBRTwMd3r4gW/tAI7HnibD5dmvLRj0AmVCOd2iupqm7DQsFkbNony/yUTL0TOMG1wnM59LgWdRlVx9UPToGfa5mYItIT6WOvFv9oI0ec3a4yZa1lQoYYMiauvpgiyUHv/hpqSrdq78OQM1SGq9FYJGYgLWbyB7nlA960ITTf275bhEH5tsfPx1/u7r0TP+QU+AE/tBt9IMFD5pev9DFhH8W4Jcj5RoMKT/YEhUsGCsiUJNB6w6r04ylCiLrO6PFzcWK2H7eBHjUS+fWGCHokbb+W6vWRR4FyLI9uGcYYaJ/8D9Vzh75jZFIc4PRemQyV43lR231mr3+OuURpGBwFTIhx/x6vRLYs+Q8trj925+wbRnL1TF6NZbo/ZmTl/hNDb6HtQHT8ua9WSjPfnaXbQYW9oJJxKQ8c7n/7yo9E2Goe+xP2va5cDDTHz1Ki8HdokQVBHxGqdKVq5S711GY5f43sn98OoAgABzUzO8IrCQOMjO8/WUHBqQaKsfkKOnx25+t5Hh3RQ774iXB8M0TbGjFmACrW1eWvt7oD8iOfWZ3z8//u/7kt9WD4IWIuiTPJuX1GfJdp1XZfYAfs+p29hdf37qH11cJbyVZefWDIyZVKe6jec82+MHQZbfaq5SocTY1q207tfXvotCoFlPJXtOXjx X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(82310400014)(36860700004)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:25.7314 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 57ab682e-2096-4e8f-f0ee-08dc5b12e32f 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5743 Some log_test calls are done in a loop, and lead to the same log output. This might prove tricky to deduplicate for automated tools. Instead, roll the unique information from log_info to log_test, and drop the log_info. This also leads to more compact and clearer output. This change prompts rewording the messages so that they are not excessively long. Some check_err messages do not indicate what the issue actually is, so reword them to say it's a "ping with", like is the case in some other instances in this test. Signed-off-by: Petr Machata --- tools/testing/selftests/drivers/net/hw/ethtool.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/ethtool.sh b/tools/testing/selftests/drivers/net/hw/ethtool.sh index bb12d5d70949..fa6953de6b6d 100755 --- a/tools/testing/selftests/drivers/net/hw/ethtool.sh +++ b/tools/testing/selftests/drivers/net/hw/ethtool.sh @@ -65,9 +65,8 @@ same_speeds_autoneg_off() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "speed $speed autoneg off" - log_test "force of same speed autoneg off" - log_info "speed = $speed" + check_err $? "ping with speed $speed autoneg off" + log_test "force speed $speed on both ends" done ethtool -s $h2 autoneg on @@ -112,9 +111,8 @@ combination_of_neg_on_and_off() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "h1-speed=$speed autoneg off, h2 autoneg on" - log_test "one side with autoneg off and another with autoneg on" - log_info "force speed = $speed" + check_err $? "ping with h1-speed=$speed autoneg off, h2 autoneg on" + log_test "force speed $speed vs. autoneg" done ethtool -s $h1 autoneg on @@ -207,10 +205,9 @@ advertise_subset_of_speeds() setup_wait_dev_with_timeout $h1 setup_wait_dev_with_timeout $h2 ping_do $h1 192.0.2.2 - check_err $? "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)" + check_err $? "ping with h1=$speed_1_to_advertise, h2=$speed_2_to_advertise ($speed_value)" - log_test "advertise subset of speeds" - log_info "h1=$speed_1_to_advertise, h2=$speed_2_to_advertise" + log_test "advertise $speed_1_to_advertise vs. $speed_2_to_advertise" done ethtool -s $h2 autoneg on From patchwork Fri Apr 12 17:03:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628165 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2084.outbound.protection.outlook.com [40.107.93.84]) (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 789A514D2A4; Fri, 12 Apr 2024 17:06:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.84 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941593; cv=fail; b=eYOanYsEBfw9yN3gTDz/ULzZVXA7CFoy/Lp4E7wM+lIFw2BfD91iHjY8UxBtIfblg30zO0n4BzIs02OLNCGtMsx3hTVdPXva5QTFJNh6wU2nZKE6TZ5uhPiosrtrsU0XOc5TuPliWbQ8AY6ju+Ifukj5edPcNHmYpyslQj8SGP4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941593; c=relaxed/simple; bh=UF4D/dNmMXr/G0lIZmLD4ORkClv2/jtS7qM9xNB2/KE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=U6tTi7WAxMlC4lKQ68NceH0qV2+9ZhwJEYddZKIj1oswMPMTb5fI3e46fWleniT3PMKudglHF2H/fLA9C/kfQnFBNd6KXJkQwyGRtqnyalxTqN3s8q8Me8vefX0+zV4rTB4gT8lBp2ArzAn6RJjIkiNwvyMqXm+Y54mRWJvbfNI= 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=hOdHo81Q; arc=fail smtp.client-ip=40.107.93.84 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="hOdHo81Q" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HKI4YH0fU1r8QL3jA8tPjeOGWxQeuqp8gPH9Ve91SVyGQ0EHYaAMIBp4mh0haDy3OBRbx1I+awUlbDTZNB8wnn8k56d/y+7vbD7ous0XqOrl5RJ3BK1s/whzks/YxuXUY8eFWabPHIhXaVusz8OobsNOxRSexAv1Oa4BvbeupWe2IMpTgJCqfzUw3HsFqDYGa3YAXYU5BHiVRc+ScRoYGt28Xzf2GfJPavt09XPTPadpzA7z6pp9bu39I082gr0ULOB72YgsEcvjwAWrzc01gdW8NRo6P1D+bIYkK7stHXhGqBcvgQLdkRcAXLgnVHbyc0hJ+e/Ee8xQtuJdDERJ7A== 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=i7jZkJpnbGcoFwE/4u8GBwK4QJwgJR2KhtSOk5ku+ns=; b=CWicL8aV5J4pH/JnwK1jm6ukXIJ0dre5PkoFhZ5zhWm5iZW9RQSemF7dB2i1DlboAKhYqWbH6ZU9DTzVQRttyU+GqTwX5Q/hQpTvSyW+JtqG+jI91jBhLGigOEEvZ0rbg6A4dnO3JqnAgmidHQSgP9YcGrKcmQkMuw38QWa08V2GCoVLulXxwtYiNzEFAyYX23uMAK52A5l74FpU67ZA4tbotRT06C137C9GMKJS/voQ7Y5dpCG4yQWofCSSS9Lvxv/oLEwkjFCAq1bUMFovg41wC93NM7eHe7K1lU7BfriFVrqT7UOjTbJiCBFCvTQqjOf2QlTRksF1zVOMjVCNpA== 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=i7jZkJpnbGcoFwE/4u8GBwK4QJwgJR2KhtSOk5ku+ns=; b=hOdHo81QPKRErVbcwINH8UOkCHqbW1JOiG7bMEjUgX9SEmyNxOCKHkZKenDb9qiKNQ/FUXz+ArFBGHwVQxD4q2fHqeaqJHdOk6/RZQlzefJYFOeSCKpYvn3wd6lWEso4vuPgFKbmCI9yZSaghQcIFIQ6/ODogjsgEcjneyzJtih2DHhhOlRM18Yw/sugjx7nUYadN9y8+XdVzKRyctV+XvJOz0Dx8lRfuMUNUk6XkoDtBQmAPRtQLQmdaclNel8PTZDtLg8M4bvwkg00fFrNIRS+BmV5vaR0r7zhTdThMM3gYg/iLBqhoDQ6iP8TOD++j7Ek5Q8es4VUwaa1srAukg== Received: from MW4PR03CA0139.namprd03.prod.outlook.com (2603:10b6:303:8c::24) by CYYPR12MB8940.namprd12.prod.outlook.com (2603:10b6:930:bd::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 17:06:28 +0000 Received: from MWH0EPF000971E3.namprd02.prod.outlook.com (2603:10b6:303:8c:cafe::ec) by MW4PR03CA0139.outlook.office365.com (2603:10b6:303:8c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:25 +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 MWH0EPF000971E3.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:06:01 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:05:57 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , Subject: [PATCH net-next 06/10] selftests: drivers: hw: Include tc_common.sh in hw_stats_l3 Date: Fri, 12 Apr 2024 19:03:09 +0200 Message-ID: <06544da1267ec8e6bacbf465838674a75190f958.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.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: MWH0EPF000971E3:EE_|CYYPR12MB8940:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ce02e18-5a69-4bf7-9a6f-08dc5b12e324 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IeQYCN7ZKIJl4kQFL7zkNCz47WYkctXhzwoVF/YzsltQsa8cVXWSODiZDST++9VOB2YDfFkc8UBaNOoTNxiOiznFwqtI0eVyFHmg6TKIPQkmhIFiLahnE2WhDeit6/hoXgxMU7SNvIz3gBjZx8KbKaWC1z7Djt2My0mS1QD1nehb2nxejY0QhDR2Zawe5UYzSIYYUrne4R1msASih/UfpeA7vXHsObZ1q7Ip6GrUf3q/U1tb5V4o1/Astzjm/d8qtsmMMaLBqaHS3li4NhxTXB0eCrHyysbbRY1JXiFtpyc5rwonNIj+QcA6HNEXVgHCWEEiSsYRf/OhOoXmiLKf2lrAFOYItBcHNLib1qkCbD+S0kUGGkYY+0B8Ol/1yVT67F2i9gwvjfecpN5HA6u3jL9XTfYa0Y+qmifXIHK0JzWRGisKL2/re8URVLy3lPkeWmkqyzmGgXH87oGoGyiSFurf7KZJNZJtZQtx25Sbc7A8EUntgJjBjomJUfLy5xUAtDi+syuajbQtHii0oVrDU9Aan8f2ZlphJkZxrKKbiDBAkIYwaBbCrB5BejK0XaR6FO4Fx6mPd4n4Q/sIqemqq35XtxvP7mC4P+O4+VPDfCbq0PdIYxcPMX9ewy+NyE+ehiiDxN222Q+fASTss0JfVlVI1w0XDP/f1tltuHaO4cV1cEsS2XsHSn+UrnkEJbTuHCxeZddb2SKE6OTwf3UqbCPXn2BJ6MnC7kCCZhIz0aY8OCemOEcwRUs1dVIRQ8h9 X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(82310400014)(36860700004)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:25.6883 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3ce02e18-5a69-4bf7-9a6f-08dc5b12e324 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: MWH0EPF000971E3.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYYPR12MB8940 The tests use the constant TC_HIT_TIMEOUT when waiting on the counter values. However it does not include tc_common.sh where the counter is specified. The test has been robust in our testing, which means the counter is bumped quickly enough that the updated value is available already on the first iteration. Nevertheless it's not correct. Include tc_common.sh as appropriate. Signed-off-by: Petr Machata --- tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh | 1 + tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh index 7dfc50366c99..67fafefc80be 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3.sh @@ -50,6 +50,7 @@ ALL_TESTS=" NUM_NETIFS=4 lib_dir=$(dirname "$0") source "$lib_dir"/../../../net/forwarding/lib.sh +source "$lib_dir"/../../../net/forwarding/tc_common.sh h1_create() { diff --git a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh index ab8d04855af5..a94d92e1abce 100755 --- a/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh +++ b/tools/testing/selftests/drivers/net/hw/hw_stats_l3_gre.sh @@ -15,6 +15,7 @@ NUM_NETIFS=6 lib_dir=$(dirname "$0") source "$lib_dir"/../../../net/forwarding/lib.sh source "$lib_dir"/../../../net/forwarding/ipip_lib.sh +source "$lib_dir"/../../../net/forwarding/tc_common.sh setup_prepare() { From patchwork Fri Apr 12 17:03:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628166 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2078.outbound.protection.outlook.com [40.107.220.78]) (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 96FD614BF8B; Fri, 12 Apr 2024 17:06:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941597; cv=fail; b=oOhnjopEhYA6cBOTJtTAHNa4wm9Zz99Te0LDrEB7F6PmEWPbuz+CYbeztbop5Y8Nrrr2Gv/w7yK6/u3sHasdX58djl51fHNNSK8SuYG+5/DIirv8rLEq/BY3ie4Et4A11f+pEzgx4eBx1hBvsSsXpy5n/fXmkVzXzfglccc+YCo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941597; c=relaxed/simple; bh=uVGypwbb8hmhOJEtmBob2/abQMsih5uxvVTdKpdQaKc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=WqJ+3b67SKsgnoYwjY9MW7lShPNISli20Lkjol5ibEwuNQJvhl+c+EU9oqWojnxG8BkIj9dcy+C3ecI2G4ZJWuzsLHha3RtjL/keqLJW9lYJTPxQ6Mkz7fa2WsJHnyR6ZFEL5Vkg8mD+0u9VxcBLH/FuJahI3JTMTdmpXl0QGy8= 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=VQkYEX4a; arc=fail smtp.client-ip=40.107.220.78 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="VQkYEX4a" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nLAcq9zRPd7Q+erYTCuLBlApmsPP3V1jPBG7sPGvOIpUaC2Nly8PFHz7PIUWbv314tUhabOnjPzLV+hHx4gOwib0PHnaUdKODv3Y8ntiScMEufFOMjpfQc0Qwfi5OCMJ8CFVlycWIbeCa4trngi99U4+Dn00xcaY/ZsgqNQh925i+DeUhy/JIKWSrEXYxHIq0B+ZwFz8nZslayYPyNq5S88SZtiLVmLXbv9+ovzEeTKFfo+nfVFn075Y03wmE7agHPreYtcPYS29sKX7cpcOYC1BuYU49oQ8MwaNtjVrkb0R/hrL7g7wKmSW7JiKJ/QgAJ48AMlr62jaDYD0ssSUtA== 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=GxKFHqpHALHjJTLaus8lMS+E5wEnDG6gcRAaDpR5tVc=; b=T/7rG2kaCdgaU9rfEc79JcQ3IYLrL0X625ZPqna1boxdAwi6FGP/aE/k8YelSXpB5xZ5fU1wEsITCLOVheCTvpXnhj9Dsjoudt/hYLqIoOEr/nccbv6rAicAwzePkbvCFDEzVqcqvZpfFsI2X0trILppuBIEmmrivvky22tAeyvnDtCnqpxXLyoAK0+U9D/noow7Ey8wFdodHZJlyhWRDY2cZpwzh0XXE9r4wjWOvDYTGP7hSHZ4Ll4/AY2XXO3VgRqTlFvlU1+4Iu/+ttnNGErxxz9iaHvWKZiKQr0huJDO5EABbA7lUEc4JyBk4UoMqIrdRsjecdulToYig79uhw== 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=GxKFHqpHALHjJTLaus8lMS+E5wEnDG6gcRAaDpR5tVc=; b=VQkYEX4aQc+RjOhPJjftzBHujs13zmqrPCZ1ftzP7dJzZ12UN5zBuJc9tLB1oDs546h/vGZK54NhUG2SUunKpbAQ3qtQTAqt5w8sZToEWX71EzKF1OKTZOhwXFHFOuex7yiZL9tLOaQSLI549XKhrUqvCBnZ2kJN2tt1HPr15Dv3pggc5sq1kN3wT/3Nv7BcPVzV5itGyDYAOYwOCmwGzXHBswax3IyOji7tuKc2lZprl99smh+QGrJ5bEbmGojNoeoisxIrCh4N2E6jhUU2aZZIfd5Qvcr/mh8YtYfwuiCsrfb9bKtWB3+25sFYtE3G9nMJC0y4r8gQOXdLuG2MSg== Received: from MW4PR04CA0277.namprd04.prod.outlook.com (2603:10b6:303:89::12) by PH7PR12MB8108.namprd12.prod.outlook.com (2603:10b6:510:2bc::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 17:06:32 +0000 Received: from CO1PEPF000044FC.namprd21.prod.outlook.com (2603:10b6:303:89:cafe::7b) by MW4PR04CA0277.outlook.office365.com (2603:10b6:303:89::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:32 +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 CO1PEPF000044FC.mail.protection.outlook.com (10.167.241.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:31 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:06:06 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:06:01 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , Danielle Ratson Subject: [PATCH net-next 07/10] selftests: mlxsw: ethtool_lanes: Wait for lanes parameter dump explicitly Date: Fri, 12 Apr 2024 19:03:10 +0200 Message-ID: X-Mailer: git-send-email 2.44.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: CO1PEPF000044FC:EE_|PH7PR12MB8108:EE_ X-MS-Office365-Filtering-Correlation-Id: 5333ecef-7362-4ced-d2db-08dc5b12e6ba X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ffrYXz/9hcewUEiEikm11MWMZnE5va8Up28N0aTkUq9niD/gi3x9ChsyFJqDJjyYAsGa6dYvxuXmf3iHC0/MQrVZEjBGkoqatPfUJJWsL0nW9NQRgYAZBIkmg2AQUKeG7ibsd5LwqInVvCYwWxfJJWdTrAtw8RqJQ5fdLjJ94pU+ef/+Oa5egOGi0IQq8LweKxdoU7P5XvCrZldPO/3WedkwQTMk/nH9slPrPtxSpqUD4IQEWu89wcnCHVdL6h6GbSD+4q6kSs35hrbXYq1fzk3AALAMKC7RUvcMrTdym/Z4/hdUj4OrSDznWm1CTbktg0TQhdKDsiR75QzyLVOfXmwNVvOfo4CZSgJ5gPh8m9HtCLCh1y1RULLXoKlY1vbt4YUPc681869CMat5aUG13cIGsWqJnHZUPg+jpDC48Gw62CsfdKbXW1ugZOaA+01Sb/7KGwtwouDhb5/y8Rz/eD/s6Q/RhqenEGDiU+IxtwYKPcB/CbfvP6WLoquv0S8U/yvG1Seg5Xdex2jh1GuZpwWrtlxIWJxdvub0wu9U/JnK3upct7qTF57kNz0ZL8CivIxkDnzqLjqnVG8RaQW7/VVM5gDP+hPVCOH61qe0A9TOd0/SrjcHo/dUVLL0UbHbRCeQ/2c5cKxWtBnHU4xmgzfPmG9pTZ1dCPGkc/Em/HZ8zt0tYMlqk43CylR+LxgbBHP/EAsLvpzhJRUZpnH2CkFyo2rqgKEYU1J9SiMq9XlzeiHTGarfemaOMpqs6ADE X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(376005)(82310400014)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:31.6747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5333ecef-7362-4ced-d2db-08dc5b12e6ba 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: CO1PEPF000044FC.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8108 From: Danielle Ratson The ethtool dump includes the lanes parameter only when the port is up. Therefore, the ethtool_lanes.sh test waits for ports to come before testing the lanes parameter. In some cases, the test considers the port as up, but the lanes parameter is not yet dumped although assumed to be, resulting in ethtool_lanes.sh test failure. To avoid that, ensure that the lanes parameter is indeed dumped by waiting for it explicitly, before preforming the test cases. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata --- .../selftests/drivers/net/mlxsw/ethtool_lanes.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh b/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh index 91891b9418d7..877cd6df94a1 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/ethtool_lanes.sh @@ -24,8 +24,8 @@ setup_prepare() busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 check_err $? "ports did not come up" - local lanes_exist=$(ethtool $swp1 | grep 'Lanes:') - if [[ -z $lanes_exist ]]; then + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + if [[ $? -ne 0 ]]; then log_test "SKIP: driver does not support lanes setting" exit 1 fi @@ -122,8 +122,9 @@ autoneg() ethtool_set $swp1 speed $max_speed lanes $lanes ip link set dev $swp1 up ip link set dev $swp2 up - busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 - check_err $? "ports did not come up" + + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + check_err $? "Lanes parameter is not presented on time" check_lanes $swp1 $lanes $max_speed log_test "$lanes lanes is autonegotiated" @@ -160,8 +161,9 @@ autoneg_force_mode() ethtool_set $swp2 speed $max_speed lanes $lanes autoneg off ip link set dev $swp1 up ip link set dev $swp2 up - busywait "$TIMEOUT" wait_for_port_up ethtool $swp2 - check_err $? "ports did not come up" + + busywait $TIMEOUT sh -c "ethtool $swp1 | grep -q Lanes:" + check_err $? "Lanes parameter is not presented on time" check_lanes $swp1 $lanes $max_speed log_test "Autoneg off, $lanes lanes detected during force mode" From patchwork Fri Apr 12 17:03:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628167 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2062.outbound.protection.outlook.com [40.107.212.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 93DE414BF8B; Fri, 12 Apr 2024 17:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941604; cv=fail; b=Q2Xt8sguyfOJpJyiCETYdD6mnAuKMHPvcKdshbjg9xjvNr+tCr8VXoJgnnVUQyQE1fGCLZU1YN/e5NIzMHN+56UlnkpmK9iQuRoh4v5lArxUA4F58aL9sRlzRVZ9ZzyQr0VkG7ibI2Y9IhAj6dtSaFzB+Ha8PT5mZ8y300d1yjk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941604; c=relaxed/simple; bh=OfGDR4ehzLZyp577/m79HxCNLznCCPERJ00wlB6CHcY=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bJAElQifRBuQrvey63cInX64K5Cwvs1kcP+a0Vj6QQNkEiqmrk75YRI0aPNghRzxAKxOj9T+uBOlJ9MyxSH9ZOyX06FRoZefFXFJKuw+muqDTt5HynhsSeZfz4/Anje68oAP/BL1EIa+5L2rmDSzdgqXSj/LPVqQb4AzPHaI+mQ= 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=UC9hd3g1; arc=fail smtp.client-ip=40.107.212.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="UC9hd3g1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BwwZIPzuxJMXFyKOb4tS4SaFyxSmUV4grTDyEi2E2XyEQ49PmqKIAkhLTit0kUV2caM3A7uVyw6A5oURw17reAV09Wmee+i21l7I2x0405uHln+tCmAAE+g8kD+HuXMmqvfzF9zgHIWEXNz3KPCPmJvPc2nHUhaEIlsG8vvDdOAKFR8eQ/jqdsgvs0xyhRyBjK5rBB0f9MNMi7zzd/Tk0jQo2tZcXleDw/l7RaVZixqkSWjnBunzLBWGzIPpBfCWVRmIX22Xs1PEKIML7BMf8fWVqJRqwRhcn7U6AhG9/sEhm7sZ/wolDOXJwi+qd4mkuHlfEd/xok+08Fmo9zknsw== 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=GD3jUmq4wNmXiCMDZxbFK7JFGYDyQDI0us7zIr83hJY=; b=jmjl//6eifs3nS3+dcZ4hXX2gBW/dSNfFzV4dR89cowTkR4SNZytjbBz2WwgIJ+50kd/LESFQ53unTJA7FrKCeKzH8GJJSkiTclpHLEAtpZANV6nktOsw/kD92Bsojf7o6M2ch5xMBsHavlhKzj8lNpQulw/OeaV2m5DcBO5as8TQXwgIEIYIMV6+QDhzzvQ5bix1TmzmTVSyAnazjiY3GOIvQ+zEyA5gjvhHaYYzdhXbkSdseV1e+9U6ISU80+MyUGRth/P56PgFqYT91PvtC4PFkwI8UudFBxTKMmt9ot5MJ8up3AYH2YQ9OKg1o1MnuxSOlKzqcF3qARJvxMdWg== 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=GD3jUmq4wNmXiCMDZxbFK7JFGYDyQDI0us7zIr83hJY=; b=UC9hd3g1fslqyAQuM29TILAhwy3VZQ5PEp3NJ0IfWeA56LgSd4WZa0zWRTJ97E3b54pIw6VQ7KtIf8EL6kuILyh3OvYq0k0wkOzWGdfu60S5sC/W3kHikEKPL+lGlhK1PD0RErVQ6ysKAQXuE0n3d+8gTY0En+OuoQIpKW5pZ0KpGNrooONrTUEmyYCvWWOXIGv6T3wktK/yflAb4Y/BVB/OGlQnRC9Q5wSX+x2vIou0G7Nu9CTsftzSNUVJ6LuqlMpY7fSQY1uocO68t4+iLFUkF+OpYJcOVTbd27+ck5GPmc1UiscVsJ0xSP33iYxBev1JozOQecHMwgP4snTPVA== Received: from SJ0PR05CA0066.namprd05.prod.outlook.com (2603:10b6:a03:332::11) by DS0PR12MB6392.namprd12.prod.outlook.com (2603:10b6:8:cc::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 17:06:38 +0000 Received: from MWH0EPF000971E2.namprd02.prod.outlook.com (2603:10b6:a03:332:cafe::b8) by SJ0PR05CA0066.outlook.office365.com (2603:10b6:a03:332::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.8 via Frontend Transport; Fri, 12 Apr 2024 17:06:37 +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 MWH0EPF000971E2.mail.protection.outlook.com (10.167.243.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:37 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:06:11 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:06:07 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , , David Ahern Subject: [PATCH net-next 08/10] selftests: forwarding: router_mpath_nh: Add a diagram Date: Fri, 12 Apr 2024 19:03:11 +0200 Message-ID: <2f82d982bf2a7c23dbd8ae63e94c3655ce9f92c8.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.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: MWH0EPF000971E2:EE_|DS0PR12MB6392:EE_ X-MS-Office365-Filtering-Correlation-Id: dfe502b8-ef64-40ec-dc8f-08dc5b12e9df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PGr5f4mSFPl8SoY3HKQePyORm1y8bfv979KcXfXTYR+AmaRR8PyWYc+w5EoRXcCIX6U0TKw9LrQ57rKY8qhuiAsWJTU5wsPQzYV/+9XlzGKE5Y83/eqKQjv8GURPvq/tkzwAPDqslwJGRL38HIhpieIJgN0mFcxaJWB7Yb7lBvkyKKFPAIUx/ShA1s9PHiVMPNG8dqcAjJMPRGH+Gs2yIf1w5Pl+uxJkH1Zt0KrHhJA7qb6okt/F7DG2wqdK278+2cWnpUaO07xq1KGXBw+ZjhuLLDOkS+9QJvNti4j3ARW0GwnTPN7MFTiJtedYi+Dy19D03njV9iJkA4sRGLePGVlT249usxzW+Der/azhDqVyrsZZ3/smFe6J4asdyb42JM1BqPcwBhPauLBATpoGFYZvixSIv6EL9Ykbmdbx4AFNRQqHKIJhJNBU33Q4ADlXyUuV5ka/hbbGdq8Zetx7GVFdIJ8aibBpYsfjVpv4dOSb5TnUsRWLfxUGda25wc3+uLbg/j0iG5FdiAyoEKFuhTjPxmBWRs07UAD+azgtnijY6Ik5IihCxdjG9XaiU6Sxu66eiukBVNT35TwzmttkJfw7JWGO7v9FhsY3W+TNDG2d3ppmnARPVAKsHiu+z2xQFuZHWqIQj+JvVh//DM4s6sT55lsbdKTIVM2pldpEuFtnsJ8nZ2ZuUMiVHgufU99IdxJLPm1QJaXuVg2zjQz0ef14sEVv1N8QWClRBSL1N8tECJE8pbnZ86XyMDkDA5Oh X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(36860700004)(1800799015)(82310400014)(376005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:37.0131 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dfe502b8-ef64-40ec-dc8f-08dc5b12e9df 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: MWH0EPF000971E2.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6392 This test lacks a topology diagram, making the setup not obvious. Add one. Cc: David Ahern Signed-off-by: Petr Machata Reviewed-by: Hangbin Liu Reviewed-by: David Ahern --- .../net/forwarding/router_mpath_nh.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh index 3f0f5dc95542..2ba44247c60a 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh.sh @@ -1,6 +1,41 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +-------------------------+ +# | H1 | +# | $h1 + | +# | 192.0.2.2/24 | | +# | 2001:db8:1::2/64 | | +# +-------------------|-----+ +# | +# +-------------------|----------------------+ +# | | R1 | +# | $rp11 + | +# | 192.0.2.1/24 | +# | 2001:db8:1::1/64 | +# | | +# | + $rp12 + $rp13 | +# | | 169.254.2.12/24 | 169.254.3.13/24 | +# | | fe80:2::12/64 | fe80:3::13/64 | +# +--|--------------------|------------------+ +# | | +# +--|--------------------|------------------+ +# | + $rp22 + $rp23 | +# | 169.254.2.22/24 169.254.3.23/24 | +# | fe80:2::22/64 fe80:3::23/64 | +# | | +# | $rp21 + | +# | 198.51.100.1/24 | | +# | 2001:db8:2::1/64 | R2 | +# +-------------------|----------------------+ +# | +# +-------------------|-----+ +# | | | +# | $h2 + | +# | 198.51.100.2/24 | +# | 2001:db8:2::2/64 H2 | +# +-------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6 From patchwork Fri Apr 12 17:03:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628168 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2073.outbound.protection.outlook.com [40.107.244.73]) (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 F3BD314C59C; Fri, 12 Apr 2024 17:06:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.73 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941605; cv=fail; b=MKMX9W0PKfoDQPRxhYaRWgrcSZ/SOgH+VaaxOpygWhaIYlCYaqGys9d6ABm2jq4wKYX+VDis6DKM8orok9/WTtxb/OWKotfffTMfsYdIj8qZADQQUjXXenlsMX9fjK1S5BbvzpqENEuf/gP5xf/3LRELl3jwATN6dxAh8uo/qKE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941605; c=relaxed/simple; bh=YovImiEkCulziGNFgl7hZ6SCeabUorxWzJ5kjmeQyBA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=a3YGC//VmX4cEelCOeBgQnnbQw3riMc3zce46jl9PlO5JgpQI9VgqbYaywf6wA0SNrp0vpP7S5ZmuQyuodOABRQvLCNtpODtmsgO1prb95hS9L1Da9XRC8ARogqJ+jpupb0DvuMwC8g4rosEUJoIdGbjD4F83A6vDpC3ziRR+b4= 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=fEi0sCf1; arc=fail smtp.client-ip=40.107.244.73 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="fEi0sCf1" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hgVjyEiUyvqGZC5LCRJATfcInmiT0eYGZlUOusLU4c7o0jG8WYeEJRJdydqUb7AKGk58Tet8t+dMtbw0/3p+WYZSgdVi5xU41p/11RshDg9iHkkjdp99+voYi3BztdlhNtJfT17fb4SzhFqSMZ+ohwdpvfGPUHhhkrDtoq8EIl0yPFw0HkWl3wvrdCoeOp3DQR4i3ILSVXd9dBy52+YgqSr6CqgzKHd+4vqGeZXWBKIDDX5E+fvqYO1BrCppVAkJzZF25gqOet6+vVAGPSyHKB8byRUCneYscMx4YDXca/5RWvJxGGdWFYoTvPShnhUbdguHr2FEcRhgFtUPVmqM5g== 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=2GmEzfCsAiZ0tyfsN3Gxle0b0D42N4u0gy75qqqTpo4=; b=JK36X06+YgWjqIlftQppzMTbriQhfSm8XnI6fKad5paa45Iu658fj0xncgqfeEnFUi1eGOtAJE5UC3h8Qe6EwlNY1btACcrqzyvIGV8IImiE/o44xqKe4AuCe/ZcBATZqngD84p2bP4YfhGyfZG2IBjqwzlCvDFc7suvyGNTG0BQMlIBnfurSeeTNlwT1Rms6d2iT/AbhGSADVz7VeKgooiXSMp3M46punS5EuxndMVm1Y55ZuMby+PoA0hf7amsrI68s5z6LWa/OlX61GxmKaL7Mw2kSQ67/7RWbg0oqIZN8HUi3XU4nLylcZC9zTY3LRsQy8eNj8cjszWZChcF3Q== 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=2GmEzfCsAiZ0tyfsN3Gxle0b0D42N4u0gy75qqqTpo4=; b=fEi0sCf136HfKwVB60sCWQUJEpMA5fyHW+AceXzn5N0M7p+hBuPNv3ZwJuxw/m+jdf9300TWcbezCqP8r8cc4e4jxVtKf0fVaSD8h6hKXwDLSQNObrgGO5X+jr8flI6RPGaN+0x7wdqx8xd9Sj9BJRaZxfocGJMLGUBXjPbQ/R7C8GLHJSi4zFmVJCNDn2dLhJipTMjZwsVHqn+WAc8FnFsdPIywNbkg/tv1+WvUJHZGwtoCltEqfAkZeABjQj8MIVxe/yQz8IbUtBT9Rl8sMrtb4gmcbwXrgvK7LWSj9oKs6RjmF62tBuYFNa9XDwRM/0Vm2rcpLpZNLAe3FPMyYw== Received: from MW4PR03CA0209.namprd03.prod.outlook.com (2603:10b6:303:b8::34) by DM4PR12MB6469.namprd12.prod.outlook.com (2603:10b6:8:b6::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 17:06:40 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:b8:cafe::cf) by MW4PR03CA0209.outlook.office365.com (2603:10b6:303:b8::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.21 via Frontend Transport; Fri, 12 Apr 2024 17:06:39 +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 CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.0 via Frontend Transport; Fri, 12 Apr 2024 17:06:39 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:06:15 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:06:11 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , Subject: [PATCH net-next 09/10] selftests: forwarding: router_mpath_nh_res: Add a diagram Date: Fri, 12 Apr 2024 19:03:12 +0200 Message-ID: <1a34016962a2678462c656516ad90d4c0b7ae258.1712940759.git.petrm@nvidia.com> X-Mailer: git-send-email 2.44.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: CO1PEPF000044FD:EE_|DM4PR12MB6469:EE_ X-MS-Office365-Filtering-Correlation-Id: 396e08b4-aaf3-4504-f0de-08dc5b12eb6d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /gwSb538ZIwfJSFSIgzi1GpJj5TLwsTq3EFADeydBGWikmiPU4WVs7rClYVFmzx6OfCz5UOm76XNAW3k+hAUWv9Sg1OjoURz2N3TaNnmIrBZEFgs2mnbUIX1hmgdHWnfn0fIqoGV/2Mgci3aStJI7V6ZrTxyPjV4RzAZ+8dKB4kI1J0U1ZwaGT9t0zaJ100ZvJMEkMgNdUWwiFMD9c6SkLarKCjvS9Na064bp97Bhk+XhM+VpwE8bNJsVzDYAySOS0GPQsdGHzJEX5ofLDoa+GLjSzCFflYHO8ztupfhh1ZlE/yn1nLFvJWZqRiBjXzLv5q9L8Z+21Xth3ySiX7PXzqLwJ6TlhWPAMpagbxhi52ny7gJHj1zgoSDW3bVf4LLUJetEjJh9Ii/49Uk07INlf5eaSlYknPHObu/yMdok9IjXEXO1FDu3hCPuURY3z2bljLSinSNghsU3JSWYBx3yRI3JWDOX8XiaIWMMCFF20l+J0+gsMVkFN0vRiEXeJCeGO+Gi+eO61ion5Y1NcNAovIYvQ3ZZtgorTFWBTuRRVqLpKrkfypocta1COZEuZF9XpjXWytY0xV+8SHpcOTCzgc12lX5g7uZ5L6Bvr2hcdxG0xBjzeqJ730DB9WGDvV4UhVJqZz/PEJ6q3825DLnLzNSnLCY2PVOVcWpiYjWqmnK6mgYtoAlJTvxjWckC4FhZIUj6bRJDu1/ihUd+z/zcvK2hJo1q/Squ7i4I02WUdhRvehBdWlhI9z1EFZ4KuPm X-Forefront-Antispam-Report: CIP:216.228.117.161;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge2.nvidia.com;CAT:NONE;SFS:(13230031)(376005)(82310400014)(36860700004)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:39.5126 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 396e08b4-aaf3-4504-f0de-08dc5b12eb6d 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6469 This test lacks a topology diagram, making the setup not obvious. Add one. Signed-off-by: Petr Machata Reviewed-by: Hangbin Liu --- .../net/forwarding/router_mpath_nh_res.sh | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh index 4b483d24ad00..cd9e346436fc 100755 --- a/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh +++ b/tools/testing/selftests/net/forwarding/router_mpath_nh_res.sh @@ -1,6 +1,41 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +-------------------------+ +# | H1 | +# | $h1 + | +# | 192.0.2.2/24 | | +# | 2001:db8:1::2/64 | | +# +-------------------|-----+ +# | +# +-------------------|----------------------+ +# | | R1 | +# | $rp11 + | +# | 192.0.2.1/24 | +# | 2001:db8:1::1/64 | +# | | +# | + $rp12 + $rp13 | +# | | 169.254.2.12/24 | 169.254.3.13/24 | +# | | fe80:2::12/64 | fe80:3::13/64 | +# +--|--------------------|------------------+ +# | | +# +--|--------------------|------------------+ +# | + $rp22 + $rp23 | +# | 169.254.2.22/24 169.254.3.23/24 | +# | fe80:2::22/64 fe80:3::23/64 | +# | | +# | $rp21 + | +# | 198.51.100.1/24 | | +# | 2001:db8:2::1/64 | R2 | +# +-------------------|----------------------+ +# | +# +-------------------|-----+ +# | | | +# | $h2 + | +# | 198.51.100.2/24 | +# | 2001:db8:2::2/64 H2 | +# +-------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6 From patchwork Fri Apr 12 17:03:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13628169 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2086.outbound.protection.outlook.com [40.107.94.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 99CD414C587; Fri, 12 Apr 2024 17:06:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941611; cv=fail; b=dzyONIYps3G435oeynBigLUF5JXmLBTC01k29a1x5XHpwfTiGn22WdYS1FEEFltrpy1gKGvx44vmt4Nwbf/EwZt8Be+SsAU+sFRzSCvIoxpe9fGxQwvrC7EjV0DS0AtEEqQsltRAyhUK79bOhBvMD9DHj4p2eBaVgUks0N3hItk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712941611; c=relaxed/simple; bh=SzDVnNiB8t4r0UjRH7hF5WyNf1yWrrvu6SpXAe50+YA=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i/7A2WaZLVJdArGDw1KdeA4KDdFoFnp2QB0h71slk8ohYdBT5GFcEMcapRPSXbEa329Qgir5WyQdmG649dUKIuR1YP3TCdXWf3XxMUU7FoIpVN2xKqwjI+GARqIRAJPrRky3ZCmqzgGxM3qry6WUNG5SLnAHvud47reEIjdZD5o= 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=tHu9L6m5; arc=fail smtp.client-ip=40.107.94.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="tHu9L6m5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SvzQY7AhWSLzLPyxSVT1dtZTjZjLZtIT07a3kMkH1x4z7XmjNDBjyTTgqA2Xq5C31wWqwGUsAu7gbyW0/9aKiJKWJWoHt278KINZfHOwj+JdXhvLI10Zvo0+hhWVm9FzrGjlzatTOXKu5IBEI2d6idhKHxZbP422cdHNsraflwsEKYE6rreT9dSdYOJtfLzFBPC+KsSolc+sxoTtaJC4eMpvHozU67XKzVR9/LX6Gor5vsPR48lb5rPvskOpLD1Vwk9rL58lc28BRYF3FqgtcoxeIJ0nvSf49pNnQ4e9kUHlObUiM4mhvtAnzsaWug5PdbuOgIu3pxTvfT/+wl28eA== 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=kyeiRW2en3GKPn7qjCXQ5mReksSqxo0OFqtRi8QI2HM=; b=GBEoudj2DtIDAL6NQQbWpt08LcS8HqZAOmm5aJRmFFWrpuoz6139/dEtRzJLvAuBfW/QhFbOB+4jlepi1rRzzI/v5x86JSgbMCpax1i9qckghpyWKJoFlBSOAn0JUCilHOK8PHiCJIJjcSc3me6Echw/6zb2eik9+sxbqwHyhqmvHKKgGMlSI5/UQOyq4+oif2aHrsCXHdweTHFEc/MGQqjiGBroxX3fkIX4tblSxSQIm9WCym0kqN4r88N7/CEMbIXqmbBs3WD1ftp61Ar/fTE7EaBdXJaxkZ5GP1IARKkDxW5EioR+xm6EHj+ErMoWs49hBZiYf4J7AaTT+1OfZA== 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=kyeiRW2en3GKPn7qjCXQ5mReksSqxo0OFqtRi8QI2HM=; b=tHu9L6m57PE9yGzGLrJxgcl43Yo+P6SSqUb24Q2ahV8AQzqWRgjP0TPQVRTS1L+KNBefArqZUIEY5uRst2mXiAB9Pi2Dp2ZsQhalCB3S/5yxZWFRbadsYk8VdXVlkT5B473pqm8lGC1vr0oOgZFP2XPhS+6zcynZUwN/NW6I/h1lOV6zzzyHPcwPyo5jHtIccoKkca5ZMdN956J151L4nep6vqoUnjb8kw7vex+aDnOjNDFqEkyrGvyj87+J8mKZxmgWoSJRMHdVnsHFxm2eRbxixEP84fLTHVz7EMIIGfIkZbZ7TrrNy1/sPUUbCsEmxcDIWdoIvch8heWuHTNO1A== Received: from MW4PR03CA0150.namprd03.prod.outlook.com (2603:10b6:303:8c::35) by PH7PR12MB6719.namprd12.prod.outlook.com (2603:10b6:510:1b2::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.55; Fri, 12 Apr 2024 17:06:43 +0000 Received: from MWH0EPF000971E3.namprd02.prod.outlook.com (2603:10b6:303:8c:cafe::7e) by MW4PR03CA0150.outlook.office365.com (2603:10b6:303:8c::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 17:06:42 +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 MWH0EPF000971E3.mail.protection.outlook.com (10.167.243.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 17:06:42 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 12 Apr 2024 10:06:20 -0700 Received: from localhost.localdomain (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.1258.12; Fri, 12 Apr 2024 10:06:16 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Shuah Khan , , Petr Machata , Subject: [PATCH net-next 10/10] selftests: forwarding: router_nh: Add a diagram Date: Fri, 12 Apr 2024 19:03:13 +0200 Message-ID: X-Mailer: git-send-email 2.44.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: MWH0EPF000971E3:EE_|PH7PR12MB6719:EE_ X-MS-Office365-Filtering-Correlation-Id: f534df45-e038-440d-ec8b-08dc5b12ed16 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: baMHu1liQ6TUFk4yYVVTSRwKNlK8RIeTiL9AoWDHhhueVmferO0s91yvHk7m5mJlnXN/x4dJuEjwMZWtmHesTr3pD2RtsCKOJb8xQtGcSyxl3hsQy5Lh3JNL1eIDJB7QAGakcw3v8i1Uw0ocqr+NMGUZ6rTgPH4cueNKXrWjHk4i+zkccvfblB3VJQpMniiYu0H5Qa9SdKfwsPfISf7sWxUR6fPXYGPTpKmXcRnBVnPf9+y0/cXgDvv+MjgSptHFlr/uU0c6Jiqc6R2STntxhXmzwHolWDc22AiKyZP+OALciT3TV1Y/aXiQIoS7mNYoGOIxoTcx0GAm7Lwg6qnR8JBixeN/1iRPYUutm+J41TzuJq8u7Kqau4PHX35n7eh0zkXt78TqgiyV5ctSp27yMvFDAfDrPo/gAzKefKWNq07MgtdlpdJckEMU5Qawja7PMDLxmidt7vY/G2EqaeQAP+nfCs2wjv56oC615ZsxRp3L5NkZ6wjJi4v5Ho7dHX7V3PB7XTHR0rLD9LMreeRBnRVShaBnDkbwpRReVyBEX3Bp+oXs6DOk29c5uDXygbCQR6ZdmLMj3g0kHHzeJBSdWCosCUn+ewlwOMReOCKivef/4uzd/tqlFtqvA5cOZ+cRii+IfYS54RUGijQVWd6xWRwFl8wAdqSo8gEGE9bLjyqqsuaxjEr2r9MrxJdlAGBNUeCgbJ+zvn+FGH+YDWRp7AYHRrPscAtClIXbbuVzymlaZUvNevJl1ghthcQ66b+J X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230031)(1800799015)(376005)(82310400014)(36860700004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 17:06:42.3915 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f534df45-e038-440d-ec8b-08dc5b12ed16 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: MWH0EPF000971E3.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6719 This test lacks a topology diagram, making the setup not obvious. Add one. Signed-off-by: Petr Machata Reviewed-by: Hangbin Liu --- .../testing/selftests/net/forwarding/router_nh.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/router_nh.sh b/tools/testing/selftests/net/forwarding/router_nh.sh index f3a53738bdcc..92904b01eae9 100755 --- a/tools/testing/selftests/net/forwarding/router_nh.sh +++ b/tools/testing/selftests/net/forwarding/router_nh.sh @@ -1,6 +1,20 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +-------------------------+ +-------------------------+ +# | H1 | | H2 | +# | $h1 + | | $h2 + | +# | 192.0.2.2/24 | | | 198.51.100.2/24 | | +# | 2001:db8:1::2/64 | | | 2001:db8:2::2/64 | | +# +-------------------|-----+ +-------------------|-----+ +# | | +# +-------------------|----------------------------|-----+ +# | R1 | | | +# | $rp1 + $rp2 + | +# | 192.0.2.1/24 198.51.100.1/24 | +# | 2001:db8:1::1/64 2001:db8:2::1/64 | +# +------------------------------------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6