From patchwork Fri Apr 23 12:19:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 426679 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66B29C433ED for ; Fri, 23 Apr 2021 12:22:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 31A4C6128B for ; Fri, 23 Apr 2021 12:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242571AbhDWMXc (ORCPT ); Fri, 23 Apr 2021 08:23:32 -0400 Received: from mail-dm6nam11on2074.outbound.protection.outlook.com ([40.107.223.74]:19108 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242542AbhDWMXZ (ORCPT ); Fri, 23 Apr 2021 08:23:25 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OWIm3ioYiokXMFgkldtIfVQ4XFpuaQgCPUeghkeRgj58D+PMIlm2OIEIfutZ/1AEXzWt38dXAEucF+EcFpD75eC/rhUgfSswkZ9YyTuErj94pCjl9nrB+PXpdpDTJ1TB7ftb7rNAM/Oi6PvHZMRnnJQ7JNTrJmcjQPfHMPURCT2CPJBlZiiuYrA0cS7kdqr91GCWwTrtg2LONh6DoYiBkDUtXV05A2HXSBC/++9N2SI+iFyhTcjc7IULrga0OiU5YsnyH/4522l9zprpeGGD8J/wd4o4u+++bH94VZhOf5A114zhAc5K6P3rHWTkqWovmIe3SfmRdaNbT7UEexWyrw== 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-SenderADCheck; bh=fxNcMJ7AjsY3NXZShxR71YocN+B76Qtet5ZIV67cUco=; b=gkyOsETazQLfI+cAuSb08uW3tRzzeGQSjIeAv6CqzFZwxzw83e034mL4hJOwucp1wa0tGMP/Nr71f2zPVWLBT2Kq75ucFS7sJysDgf2nPiUMD9q/A3HajR2A3Ve6kXlRxT2Zq5NvRucw22xGbPKqbp4TfjJA/xMytcjjYqtmspmh68Sd2GRrAbDzyUzShg7VLLMwbWIY4a+s6I4FpIa70JiMl3Cd1bluZJyMerXI92JVp8V3X9Iy3Wp88H4dZxDJFLZlHzMPQwfh05AcRiUwc+OmlsSLjYThGtseREc3RNBQCCuBuYLBGTUEkgReySakRGzau55lfDPwkAtyoDjrqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none 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=fxNcMJ7AjsY3NXZShxR71YocN+B76Qtet5ZIV67cUco=; b=quW7l/CkMNzLQq4sH5/TGrYtMkdJQ1NRMfVjLQGjc4Vnx0nD1It0z01Eaq/5eVaC3yQqsvmA1p5eHvX2uWFzBD2kVBkMBoyMqFD/jd2+AAG0JxbIyZ7zzjWVAEeYPYQUm/nvhBQ7S0G6zrKeAJw3W2IhJEfnwwNQ+ZB+kDok3Q00h9X013s4/yXM7iJE990pWp//s2XMHun0IwRu+PnQSB/u+vVfSfotz+heuhV3oEBQJ2VZsOYI9KvIQteDborcrLXPPvlKAY9y+UXF8q13izYbO/8x+XGeoq7GF8elrcKCTL3lWUd4Tv0RtDfutaDQTo00CbjmrbAW8j/8tkCG0g== Received: from BN6PR13CA0071.namprd13.prod.outlook.com (2603:10b6:404:11::33) by BYAPR12MB3095.namprd12.prod.outlook.com (2603:10b6:a03:a9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18; Fri, 23 Apr 2021 12:22:47 +0000 Received: from BN8NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:404:11:cafe::e7) by BN6PR13CA0071.outlook.office365.com (2603:10b6:404:11::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.17 via Frontend Transport; Fri, 23 Apr 2021 12:22:46 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT020.mail.protection.outlook.com (10.13.176.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 12:22:46 +0000 Received: from localhost.localdomain (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 23 Apr 2021 12:22:44 +0000 From: Petr Machata To: CC: "David S . Miller" , Jakub Kicinski , , Ido Schimmel , Danielle Ratson , Jiri Pirko , "Petr Machata" Subject: [PATCH net-next 2/6] selftests: mlxsw: Remove a redundant if statement in port_scale test Date: Fri, 23 Apr 2021 14:19:44 +0200 Message-ID: <54a1517a6951c5bc84af3c2b5df323c153d04b59.1619179926.git.petrm@nvidia.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: aa7df6fa-ff9e-4b70-1ef8-08d9065280ec X-MS-TrafficTypeDiagnostic: BYAPR12MB3095: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ISjjO4MrVsQ8UFMq4WDNlY9ZOxvIg62M0xgDuiTPg1rUGRUUWfH4HSlrJHwdFtH9OUdq2seoVGdLelF6PBzXSfxRewxWidKGKeIFREEWKjPt5vfEfkPkIdJtAUBCMu16VT0WYCqfO9P82uhpUMaQw27OXRIe7m6c/Zv14XsRTJb3LPSVX5BzIgJvE7hK44jTSJEhyDyIP6vmIV9jeMlDBTmzBLFIQjzh/gp4r1MDk5/gf7RlLTfqRgwEiNr5qzAwNsbEtuENvFhMgFCmEM33TYEZEBnwhy1In/+kjo9IIgNS74CQu2QjXNAc3rQ/ZnyzrZw9Y5diPKuMm5/ZAl0fZsT5lGus+eIipes+ltoxCjpfCFOJA0iaVkdWphT7Tjnr/JyHuWyMxmKpLx5vTFRajvbDB7VZp8r2K9uyPxZSWFChlZIeD4ne3bOQSkE43WpPbPOS/+Gut8BFIROoAtDcwoM4PgLIrzG5p4DJDBkIbNw7ksKDKJR2IAcwhMgSSOjNecE0u1fBZGUxpQETY4YQYVvYvsYafnsSqZkPYcQPj/OrdK0HinYKVaYfyKKTIzrmvgLhaaPxl0L3q9IqBBKP6UHB0qY822slRJjLy9A8CCdtNI/SRkT/JG3L0P3ugXIZ+1gkQWvRqTwuA+qcv1XjCQ== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(39850400004)(376002)(396003)(346002)(46966006)(36840700001)(2906002)(86362001)(47076005)(5660300002)(316002)(8936002)(36906005)(426003)(336012)(2616005)(8676002)(82310400003)(26005)(186003)(16526019)(356005)(82740400003)(6916009)(478600001)(4326008)(36756003)(70586007)(7636003)(107886003)(54906003)(36860700001)(70206006)(83380400001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 12:22:46.6940 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: aa7df6fa-ff9e-4b70-1ef8-08d9065280ec X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT020.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3095 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Danielle Ratson Currently, the error return code of the failure condition is lost after using an if statement, so the test doesn't fail when it should. Remove the if statement that separates the condition and the error code check, so the test won't always pass. Fixes: 5154b1b826d9b ("selftests: mlxsw: Add a scale test for physical ports") Reported-by: Ido Schimmel Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata --- tools/testing/selftests/drivers/net/mlxsw/port_scale.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/port_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/port_scale.sh index f813ffefc07e..65f43a7ce9c9 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/port_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/port_scale.sh @@ -55,10 +55,6 @@ port_test() | jq '.[][][] | select(.name=="physical_ports") |.["occ"]') [[ $occ -eq $max_ports ]] - if [[ $should_fail -eq 0 ]]; then - check_err $? "Mismatch ports number: Expected $max_ports, got $occ." - else - check_err_fail $should_fail $? "Reached more ports than expected" - fi + check_err_fail $should_fail $? "Attempt to create $max_ports ports (actual result $occ)" } From patchwork Fri Apr 23 12:19:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 426678 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1ABEDC433B4 for ; Fri, 23 Apr 2021 12:23:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF7F961459 for ; Fri, 23 Apr 2021 12:23:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242573AbhDWMXf (ORCPT ); Fri, 23 Apr 2021 08:23:35 -0400 Received: from mail-eopbgr680062.outbound.protection.outlook.com ([40.107.68.62]:17633 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242570AbhDWMXc (ORCPT ); Fri, 23 Apr 2021 08:23:32 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iwsihMBONP0c2CUwvada0kMPWaShqeDOMzMDN9UdLJqb+BfJwc2cuV1izG9qmPejPHoJfodc9ObCUsSKHUnUd+DQHRHZVcd/AcLCKHRS7D5GeASUcjV38RiOEbUtmlXiW1cWF0eYBRyNLZx8SRpXGoFiRT60YxsBI2wljxmLgi6GLhxHsS4WXvOqkrA8emWX2q6VIiUaJpJqpLSRGSt/rpcly3Wntw/jcUKtq4cWkaSZjGLN7t5yY6bkrN8u/aZORgm3cRvkj4BJY/GyNuL6E7SK8fGRuQ6tLE2PTHzwUriPidEAtGvFz2NQkeYwv0z1bD/J5KV2B8y5bb00Xj6FPg== 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-SenderADCheck; bh=q0S/4fpUmdT6IXxuo+10lCKIIHtsZgEZCGFNMZH6upQ=; b=SEBLCsuXx23FY4t6jMx2dTr12efPWm4ezQ9sUa3yuvmpScLZG3S7/UWwmlcFl9H8qkeT/6URVcvmlDXTw3O/Cov0vOXApFEZSBplJqlNBnjLnH35PYl5aAw6/FIEPBkbNVbF3R5ZeHcIA/3xXs6BSOapvp2ziWONhSKEoZudzgvCwehTRldI7kJ6bM5JiBTiOnb+nJN4/2zArhmoNfqAAPUtqdM3HQE6+99F10j31XiEwQHEfW45/ZDk1bplFxKf3XovG6kDA59ppRviknw2WyR2FV2Rh3u272rNjO//DiqKja1mmTQtlZ+Gra/CyDDvt91tEZo+82w5TA0J5Z/v4A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none 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=q0S/4fpUmdT6IXxuo+10lCKIIHtsZgEZCGFNMZH6upQ=; b=KUDvjY/uWrW3YZlNDdyhLfEqO38jwgHkrURUihWFi2+sW2PWwcvWwIb5oW0+MscK8eacxabKFem9CYfQgqkTE8FxTx1hIOYRGfm8dBgjxYJOkzOb3+Vj8Q99AO7JdmEeFLaF+qll1NUqm3f7jKHAyGKPfKYqkzSx5NKfdOTmKdJZo7erxqWuM01srMXgw8krxngkACpkHCvPcSzsb4/Yk+QVdXBN6qADbFGqLuScQpxruaq1vtj+QSmeQ1peiobP3gzfhUw7r/NPAhdPhfSTMxSLbrGk4Eo3de0PXqzDIFlL2vIlJ3q7EK7fJhoAYx2QiO0SgkvwlQ493O6vfX25Yg== Received: from BN8PR04CA0010.namprd04.prod.outlook.com (2603:10b6:408:70::23) by CY4PR12MB1639.namprd12.prod.outlook.com (2603:10b6:910:f::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.23; Fri, 23 Apr 2021 12:22:54 +0000 Received: from BN8NAM11FT054.eop-nam11.prod.protection.outlook.com (2603:10b6:408:70:cafe::ce) by BN8PR04CA0010.outlook.office365.com (2603:10b6:408:70::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Fri, 23 Apr 2021 12:22:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT054.mail.protection.outlook.com (10.13.177.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 12:22:53 +0000 Received: from localhost.localdomain (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 23 Apr 2021 12:22:50 +0000 From: Petr Machata To: CC: "David S . Miller" , Jakub Kicinski , , Ido Schimmel , Danielle Ratson , Jiri Pirko , "Petr Machata" Subject: [PATCH net-next 5/6] selftests: mlxsw: Increase the tolerance of backlog buildup Date: Fri, 23 Apr 2021 14:19:47 +0200 Message-ID: X-Mailer: git-send-email 2.26.3 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 10d7133d-bb0d-45cd-285b-08d9065284f5 X-MS-TrafficTypeDiagnostic: CY4PR12MB1639: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zwhOimdzkUji9N6aNYErmRlT0U9xYSK3NS0q8LQaK3edDX/QfxLoFPf7lUR4dWlZ8ObzUrTr79JRC7gpxqdrpiSdryQ+GqumehKnZ/bPr/deieTTbeSQsf0uQvnxtdG7FWnDD64UMNZslpjhoGomaauIkpSn/zlso9lFJat2qO0l8etdkkwiiHOw04jsWQfyG9q6MDA33rfOhofDeb/8ly/rc8RAZHhrG+zeENBG2NWRIy9eFUkSEMQ7Jh+Er5qf7T1V4+MAd23pXE0kkYBcpn0kV2d6MKHkCzdsgd2hDcu9auWMjDBta1UpCYmljvA3s+l/tE3yNteaC2VfJJVBi/v22PVul2aJFhhiND9aWjU5wnFkaD9JmlnDxzJ3g+JBbQMBsPgLu3Rje5e7zUmchwop21uIpeOuehHCCefAJYtwfVC2TE+k1LpbezcB7w8YJtE0wB4SepAcv+Mn5/sbWimzk31TghAk5JA8/f4CYnS3E7kiyZ/iCEhfyeVwnCm0zZ6TidVFBO6Z/E7d0WlZ2/aVuw62f0xyozQwfQt1kt7KJ+kpHrDXsIPVPBEoOUareqivoNwmH1faThCbkYlXRm9RT7gzrbMTTxogwp9NfJmmEgF2iArMkp/sORmLaO3NgelGxS2HRKVUuIH8+DYbhgT8I3s2mFDNIDlNW+XpHhI= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(346002)(396003)(376002)(136003)(39860400002)(46966006)(36840700001)(336012)(426003)(6666004)(186003)(16526019)(86362001)(5660300002)(26005)(47076005)(2906002)(82310400003)(36860700001)(2616005)(356005)(36906005)(8676002)(478600001)(54906003)(83380400001)(8936002)(82740400003)(316002)(107886003)(70206006)(7636003)(70586007)(36756003)(4326008)(6916009); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 12:22:53.5650 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 10d7133d-bb0d-45cd-285b-08d9065284f5 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT054.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1639 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The intention behind this test is to make sure that qdisc limit is correctly projected to the HW. However, first, due to rounding in the qdisc, and then in the driver, the number cannot actually be accurate. And second, the approach to testing this is to oversubscribe the port with traffic generated on the same switch. The actual backlog size therefore fluctuates. In practice, this test proved to be noisier than the rest, and spuriously fails every now and then. Increase the tolerance to 10 % to avoid these issues. Signed-off-by: Petr Machata Acked-by: Jiri Pirko --- tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh index b0cb1aaffdda..33ddd01689be 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh @@ -507,8 +507,8 @@ do_red_test() check_err $? "backlog $backlog / $limit Got $pct% marked packets, expected == 0." local diff=$((limit - backlog)) pct=$((100 * diff / limit)) - ((0 <= pct && pct <= 5)) - check_err $? "backlog $backlog / $limit expected <= 5% distance" + ((0 <= pct && pct <= 10)) + check_err $? "backlog $backlog / $limit expected <= 10% distance" log_test "TC $((vlan - 10)): RED backlog > limit" stop_traffic From patchwork Fri Apr 23 12:19:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 426677 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 559E2C43460 for ; Fri, 23 Apr 2021 12:23:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 21B3460C40 for ; Fri, 23 Apr 2021 12:23:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242584AbhDWMXg (ORCPT ); Fri, 23 Apr 2021 08:23:36 -0400 Received: from mail-eopbgr760081.outbound.protection.outlook.com ([40.107.76.81]:1286 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242249AbhDWMXd (ORCPT ); Fri, 23 Apr 2021 08:23:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Es9Mc6TRoCF2169WnELbhMZ8+kPQMWt+LgBc0G7tdQGJvI2YTJ1iQkwhgPQXjgHHlc8+QKzGPQPAm3mRF791biIxuI2YKo9vg9gp1wxDz7v2FK4yR3BqxybIvRKx2S4bhcRPLnut8yF6nkU088dx1qGdnAWPICpC/ncTRav4iDVhaXKKqqDZu/gYUyvLAwvvRupZ7anfjeYCiJFmW9F8rGsZVCvEFpKnzq9RcYms8uTveieHly8lcRtzUrKzPmy2Tx/jXImDr1c8UdRWK30iDjav93vDTg2Hv8OpjU7SRzcW9hd83rte5rrOxpwFlY7IQN768MXqZsT8CAgkFh3f+A== 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-SenderADCheck; bh=2ATL7DX+2WF3s+ZAPewK+Km8IwTLApZ1iDYOULRTGuE=; b=FYCJNVwPoIzo6jR/UCdlOaGAhfuHb0NB/MIcai3U+GD6EmBd8YV/tn8DoXRZK4xiYD6IKbb9oIEPrUKxJnrgOR+p24J2CgAi8yCeINb9tZ3JkNRWzRrdNvk1OXq5bOOJWtNlAMG58Dfoay9WnNb2DCPG6CK6ZLZ7rspf4iXcJCLEbjpkNrY8lQI8XlDaVAbdF27s+/pHmfhkU3qsBOqAl6xWgVfwvCPwGWTR3+BToFIfsikxF+rrdY5+ulqCpWkV39VmEZgXjJJkaA4OIWuSiKNlJgaQZ/RL3BKBy4oJt4B8vE7q40VYZHMvWzPDwWV3K4vhN04TFmnnT1VyPnPeEg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none 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=2ATL7DX+2WF3s+ZAPewK+Km8IwTLApZ1iDYOULRTGuE=; b=Z97Vz1Mr5pxsb7RwShqVbSp0LQ8t3gqjP5BrqYUABjuleMFPPzBuVfHBAX6jqlSfoo9weH2JAb0Qu24ZtSuRA4Hb1YhW8Ska7JKCC2NRlVzhuLAVEiiLsQfSJR5ihmaCOWfsks6DH7F9hNmlS8hmsAz4RPIlsrBzFH04MX4HcMrMQ6jzdR3fH3T1stDKBGPrUUaM7IhzSh22F9Pv4/PX+G3dUT6GuWQjcacxjOUbz7zQxQZP6C4ydE3GhtFJ9TIoRZCmHauiIPPFWAF9jxiE0KoGArHPcaAv2UmCwIfOIgNGuduao2gDXneQ07+5boRss2wtEJkaldNzFLyFqB5DRQ== Received: from BN8PR12CA0006.namprd12.prod.outlook.com (2603:10b6:408:60::19) by DM5PR12MB1532.namprd12.prod.outlook.com (2603:10b6:4:6::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.22; Fri, 23 Apr 2021 12:22:56 +0000 Received: from BN8NAM11FT027.eop-nam11.prod.protection.outlook.com (2603:10b6:408:60:cafe::60) by BN8PR12CA0006.outlook.office365.com (2603:10b6:408:60::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Fri, 23 Apr 2021 12:22:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT027.mail.protection.outlook.com (10.13.177.96) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 12:22:55 +0000 Received: from localhost.localdomain (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 23 Apr 2021 12:22:53 +0000 From: Petr Machata To: CC: "David S . Miller" , Jakub Kicinski , , Ido Schimmel , Danielle Ratson , Jiri Pirko , "Petr Machata" Subject: [PATCH net-next 6/6] selftests: mlxsw: Fix mausezahn invocation in ERSPAN scale test Date: Fri, 23 Apr 2021 14:19:48 +0200 Message-ID: <6990c097a89494eaf6527682b29eabc9f8dc7824.1619179926.git.petrm@nvidia.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4049e05b-ba0d-4cc5-1bf2-08d906528670 X-MS-TrafficTypeDiagnostic: DM5PR12MB1532: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yk2JWkxmHmMO1fB5hyc4+zkQJKYfcqNRa1pIzTJpx0VyaHukmsLESuuurr67JI1gu7uenwdKfqjT9CdS1CZaA7P8IXA81AIft3t/8VNmk3+OOWN1/xxSP/JjA0UO4RXlBaGpMbDXXdLduSANkq3PaZ/1QTS+Q+3HxyEJw6OrcR7jpgead1GwJpeCnIe+4IJMVc5u5Bd8Mscqaga5Fl6Q9aNcRsA6NzDicB/uFqd+YqgO1gWsYAX27CutY55ocFQuGeidi1ob0xB/9k8rUdxGOSiQooypRN6DEy5H/Z2Zl4ZA94QRvxlL0Mv4J3hrBdozZxk3AUYD8xFhgBDFZi6X5qe7NSg8XHN8d1u1UnVoNCjB6EQFToYqKE00KR94YPPaHPch5cXltq+bWXR9z0PWOW8yoYWzy8Ue87JDYt/Y/5SEtr5mL/usSiXBGqYgEDn4noO9gFGuxkxb1bq6rYLeSy59dSB3zWgwLj9jyab44Xog7ohazHw8QHkGb+QKw6l7DWZGUiCssbQdawSTwNUp2WIh3PbeONXH9cLSmpqNfc2CRIQaZTRiA9wm4kKErks7gPhh/wg+UDwVIsyFm5eqr1FOFbDWumkSPFCSuX5QY8DQ1pyRRlpVHoZimx+7j46uNqJ5FCExDIRAY0vbXgm0xKj8kjx7nWpRV9go19M07kM= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(346002)(39850400004)(376002)(396003)(36840700001)(46966006)(36906005)(316002)(86362001)(6916009)(82740400003)(2906002)(54906003)(82310400003)(47076005)(2616005)(186003)(426003)(8936002)(107886003)(36756003)(6666004)(336012)(83380400001)(478600001)(70206006)(356005)(36860700001)(70586007)(7636003)(26005)(16526019)(8676002)(4326008)(5660300002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 12:22:55.9666 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4049e05b-ba0d-4cc5-1bf2-08d906528670 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT027.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1532 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The mirror_gre_scale test creates as many ERSPAN sessions as the underlying chip supports, and tests that they all work. In order to determine that it issues a stream of ICMP packets and checks if they are mirrored as expected. However, the mausezahn invocation missed the -6 flag to identify the use of IPv6 protocol, and was sending ICMP messages over IPv6, as opposed to ICMP6. It also didn't pass an explicit source IP address, which apparently worked at some point in the past, but does not anymore. To fix these issues, extend the function mirror_test() in mirror_lib by detecting the IPv6 protocol addresses, and using a different ICMP scheme. Fix __mirror_gre_test() in the selftest itself to pass a source IP address. Signed-off-by: Petr Machata --- .../drivers/net/mlxsw/mirror_gre_scale.sh | 3 ++- .../selftests/net/forwarding/mirror_lib.sh | 19 +++++++++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh index 6f3a70df63bc..e00435753008 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/mirror_gre_scale.sh @@ -120,12 +120,13 @@ __mirror_gre_test() sleep 5 for ((i = 0; i < count; ++i)); do + local sip=$(mirror_gre_ipv6_addr 1 $i)::1 local dip=$(mirror_gre_ipv6_addr 1 $i)::2 local htun=h3-gt6-$i local message icmp6_capture_install $htun - mirror_test v$h1 "" $dip $htun 100 10 + mirror_test v$h1 $sip $dip $htun 100 10 icmp6_capture_uninstall $htun done } diff --git a/tools/testing/selftests/net/forwarding/mirror_lib.sh b/tools/testing/selftests/net/forwarding/mirror_lib.sh index 13db1cb50e57..6406cd76a19d 100644 --- a/tools/testing/selftests/net/forwarding/mirror_lib.sh +++ b/tools/testing/selftests/net/forwarding/mirror_lib.sh @@ -20,6 +20,13 @@ mirror_uninstall() tc filter del dev $swp1 $direction pref 1000 } +is_ipv6() +{ + local addr=$1; shift + + [[ -z ${addr//[0-9a-fA-F:]/} ]] +} + mirror_test() { local vrf_name=$1; shift @@ -29,9 +36,17 @@ mirror_test() local pref=$1; shift local expect=$1; shift + if is_ipv6 $dip; then + local proto=-6 + local type="icmp6 type=128" # Echo request. + else + local proto= + local type="icmp echoreq" + fi + local t0=$(tc_rule_stats_get $dev $pref) - $MZ $vrf_name ${sip:+-A $sip} -B $dip -a own -b bc -q \ - -c 10 -d 100msec -t icmp type=8 + $MZ $proto $vrf_name ${sip:+-A $sip} -B $dip -a own -b bc -q \ + -c 10 -d 100msec -t $type sleep 0.5 local t1=$(tc_rule_stats_get $dev $pref) local delta=$((t1 - t0))