From patchwork Fri Apr 23 12:19:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 12220301 X-Patchwork-Delegate: kuba@kernel.org 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 3AC75C433ED for ; Fri, 23 Apr 2021 12:22:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08BD061468 for ; Fri, 23 Apr 2021 12:22:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242540AbhDWMXZ (ORCPT ); Fri, 23 Apr 2021 08:23:25 -0400 Received: from mail-dm6nam12on2068.outbound.protection.outlook.com ([40.107.243.68]:23233 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231338AbhDWMXW (ORCPT ); Fri, 23 Apr 2021 08:23:22 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mSc2M/HUhtsWVhr1jqqi99+xZyaprQdWz+YYRzKFHm4qWEzMNAiqCOwCWm6lJ2kq3672JiCq4BZ0eOc8UvsACNiKUDW6A/liDrGcCCZXhnh+sm+krW+fWmu8u3SK+vOWm72AHq+vdi9o1UeEmF/WYTo/tgGjOEsySttDgKFxfEhuIHOBwTYWHDAnspPVIKsBt152RjMSlcWcFKmiK5ZHpKG14x9PYyLjt6IdTW7BcAnbLkd/J9OvqH0E5WOqVojoXkwZgjmVN3VI1N4/UOT+6L+cxAnHL/EUbzjthwTNQ4OxNOv+rtreHTB9MenCHegPbWjgOyvJ4U4BXRxQTFcokA== 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=ZNXs1CquO1Wlue8e7sqNekAyzy/QaKsPg3LcNoOp8S8=; b=iWDVgqCKZTAEXWoZMTRQxaQhzCfVBSjuqcaTEcTxL+JRhqP1xT0QIfELbx0gTFmDV/qn8gZkywkuaZYSgRbyY/4TozMe37RP4tLwfNcdGbCNhgh519DhT/Cisk58+k+4aeMy7l8BFh4iJjLY9wWw8zTM1u3YMeQxDdiEdBYX5kGz5vqiqqM1T/+JY8vJ9S28k+DkuTeh1ZCsb7Mv7Kh27m43iBtD35vpGRjJLMApnb8CEp+JGc0lO0zSdprGQHqwubziH7pa2YLNxW2c1T71PJsNXyN6Df8862GCfyEmb+kazI0lDZxVnZWDzJCIOUM/zgcQML+WdwxrHaPu7sUJjw== 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=ZNXs1CquO1Wlue8e7sqNekAyzy/QaKsPg3LcNoOp8S8=; b=bmx0JHrz6eO2egykYKH/z6U3YOTvbst5G1y+dUtdRERA0oONdDKBBi6n+PoqWwLPl5VdygNyEPreg4EKaG6uDOqKxJAEPsiV9yiD51y2AlprVRonYHHvgJT6eiFF5ZztXuFbtQ413AVBOMGR3nRlYv3Uk8yZ2H0jw8ySnEZ0CYVj1Qn6abqLsYMmqHKJzuxkbsIE5jqC+d0jAxb5f+xZFBYDBiAdwmD2cl0ka1J+wA3iuh7HRkl9zPU6sg7BPCXV4sS2ui89TlZ9vqLE08ju6DDlLAmY6iEb+f1yqiAre3uQRoZeDo4DAkDKwXdLEcBwb2bRTA+tnpp8Aiz3oEiU1Q== Received: from BN6PR13CA0050.namprd13.prod.outlook.com (2603:10b6:404:11::12) by CH2PR12MB3672.namprd12.prod.outlook.com (2603:10b6:610:2d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.19; Fri, 23 Apr 2021 12:22:44 +0000 Received: from BN8NAM11FT020.eop-nam11.prod.protection.outlook.com (2603:10b6:404:11:cafe::d3) by BN6PR13CA0050.outlook.office365.com (2603:10b6:404:11::12) 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:44 +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:44 +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:41 +0000 From: Petr Machata To: CC: "David S . Miller" , Jakub Kicinski , , Ido Schimmel , Danielle Ratson , Jiri Pirko , "Petr Machata" Subject: [PATCH net-next 1/6] selftests: net: mirror_gre_vlan_bridge_1q: Make an FDB entry static Date: Fri, 23 Apr 2021 14:19:43 +0200 Message-ID: <37c81f146401e9c24db019a60163a65d598a7657.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: 5ad321aa-5834-461b-0fea-08d906527f84 X-MS-TrafficTypeDiagnostic: CH2PR12MB3672: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:972; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UEYaRt/z+KRt7TIJtuvVLUdAVV3tu4Gnoj2c5JQ3XnoliJ+duE8aVHXLkFApTX8FLUCsLT5PbahauoP6ZaDWIwFyt0EQCQloIyuQz9jlCqv4VIrmJ24Idww1PE4sRQrATvFMCxMCo43l5V+T64dTa5j/kVBZ/FlIKqMVLX6LOBvwe/4ZAsbIgqJIz1xZKYyPY4XegTHPGhpaFtlsvZb8kFn/CmOgfRtDT+HFncAIvr69v/hDQuBV92QRTTfDILzCYwbhy+hBIkIDy5v41YjR+eqvxnUv1QOip+jFj8yWDsYxCybdzzLHnWIkXsufMkMTQDpdld/F8GRQ4Layik9IN4TN2GYhW8NhFzGavQghCaCirJ6tq9czvQ7+JexmpZxOprRoODjj5VcTdIEBQcOW+8mYmc5t2aIDyjoYUtaQwZXOpzGKQ46jLS0xnBTD003k1sU5Mst28V7MAvWFV8KHJQNJfSeOUFNor5IL/L+6eBGvckZonB1ntGkwZxea7n4mJPl0XIiqAhcsnSXeho85he0gUVybxUmRTGtGbmhSuCBZG3yRYFgbn5pQFxuO5dOk/MVji0ZYEooeoOKX1FZzXybRWBGJPJJJeuTHetKrXhDp2425+e46YnojRlWZmWoiO62moDIUVdDU4z2v9Hm4jub3YVamJ/nlxUQkl6yCO9M= 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)(376002)(396003)(39860400002)(346002)(136003)(46966006)(36840700001)(2906002)(82740400003)(70586007)(426003)(83380400001)(54906003)(356005)(82310400003)(86362001)(316002)(4326008)(16526019)(8936002)(5660300002)(6916009)(186003)(478600001)(26005)(107886003)(47076005)(2616005)(8676002)(36860700001)(36906005)(70206006)(336012)(7636003)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 12:22:44.4333 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5ad321aa-5834-461b-0fea-08d906527f84 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: CH2PR12MB3672 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The FDB roaming test installs a destination MAC address on the wrong interface of an FDB database and tests whether the mirroring fails, because packets are sent to the wrong port. The test by mistake installs the FDB entry as local. This worked previously, because drivers were notified of local FDB entries in the same way as of static entries. However that has been fixed in the commit 6ab4c3117aec ("net: bridge: don't notify switchdev for local FDB addresses"), and local entries are not notified anymore. As a result, the HW is not reconfigured for the FDB roam, and mirroring keeps working, failing the test. To fix the issue, mark the FDB entry as static. Fixes: 9c7c8a82442c ("selftests: forwarding: mirror_gre_vlan_bridge_1q: Add more tests") Signed-off-by: Petr Machata Reviewed-by: Ido Schimmel --- .../selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh index c02291e9841e..880e3ab9d088 100755 --- a/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh +++ b/tools/testing/selftests/net/forwarding/mirror_gre_vlan_bridge_1q.sh @@ -271,7 +271,7 @@ test_span_gre_fdb_roaming() while ((RET == 0)); do bridge fdb del dev $swp3 $h3mac vlan 555 master 2>/dev/null - bridge fdb add dev $swp2 $h3mac vlan 555 master + bridge fdb add dev $swp2 $h3mac vlan 555 master static sleep 1 fail_test_span_gre_dir $tundev ingress 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: 12220303 X-Patchwork-Delegate: kuba@kernel.org 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 X-Patchwork-Delegate: kuba@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:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 12220305 X-Patchwork-Delegate: kuba@kernel.org 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 1711FC433B4 for ; Fri, 23 Apr 2021 12:22:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D503761463 for ; Fri, 23 Apr 2021 12:22:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242400AbhDWMXd (ORCPT ); Fri, 23 Apr 2021 08:23:33 -0400 Received: from mail-mw2nam10on2061.outbound.protection.outlook.com ([40.107.94.61]:42129 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242249AbhDWMX0 (ORCPT ); Fri, 23 Apr 2021 08:23:26 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I36eSxcfZwQ4n8UzjfLSt4ISOpAScOVSV8b3PyJHQjekDM5vGHOhuBwsnXeBJ2wfOHGsltjcF7Iey46RvdmfII1G+vdxwHQXfIvoiThZ1vaY1GKOptgF4C+z0sKfaFy9hlDOSwuA8Vzgobk9Yay56eB6TTi/AcDZy6OW6oVqm6LYvLw1wNe5inspheHWpjxMrIOnRLob56Sv23bU/ILj3RmYyczvfAqBnCEyCbBWA+i9yM96UGBMYWnzAL8T5U0dwtbkTJA6yreg0qIOslJP2ksEffJP2KnVQP8fbIvNTWMPSPWdam3VS4eAyEs+im45WLefjsBOrM263Ja7zR4LbQ== 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=TdRSvPBSkHVMXjCD+qz3Kao9OEPiA+Ol4wrWnPsZNFE=; b=XbCJUUToa2xD+/m7JnzzJ4HJ3tPf+nZEp0UNMk2itps5CY7wEwby3rPlexp/iI17vt/1Q7nBnOCMU79/clcAax5QHUPdTjluFq/BvD78LhpZadUlim8eT8bSLRNVXPwN8huxom5BBxx3rG5JSIdZ/+FLA7ejVLj4FmL0WqGqZ188strlXpEqqcLCFoUMPW7aQtgSuVWaWB/hvbEsE6H4JpG37fEivbRrJ6TE9nq9tXaC2q48Fu+4qkksXw6SJbvHqXjYIk0K8Ke8lNR5pYsKuQtlbBMHDnfyodXlGSIvGThouNvKwCRVty1+Q/ezMGj6h6Wm1WPMg4wbiqLYjHC0SA== 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=TdRSvPBSkHVMXjCD+qz3Kao9OEPiA+Ol4wrWnPsZNFE=; b=gKyboEnTgzUmLgYQU++R8eRv+1PfDC8HoLODPH6mSlHmdWIisicUPTbASriQxRv4X3z9UqYVJIf213Lz9qALk6oYnUz2KsVsbKwpLROR9c1o//Zj79t3WKjmGQ9+pOipL5OJml0EDMX8EwmLfVnDkz7NMnK9CndNt8k/XJUEKUrrtQ2W8nn72oSRGOd5moe1DrXjVHoe26dgc+AL9A19MwlG7JkJ+j4bigbpo+yYMhWVztB0M0vfcOZF7OJ3p0vYUOuvLHHU1B77wkvKPTyN0dpbvx9hujgdVZWrQNFKVDHIlR2DRaZlxI7nKBDw7wmS1zss05dHTHRSNHfXjZLgIQ== Received: from BN6PR12CA0043.namprd12.prod.outlook.com (2603:10b6:405:70::29) by CY4PR12MB1366.namprd12.prod.outlook.com (2603:10b6:903:40::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21; Fri, 23 Apr 2021 12:22:49 +0000 Received: from BN8NAM11FT049.eop-nam11.prod.protection.outlook.com (2603:10b6:405:70:cafe::2f) by BN6PR12CA0043.outlook.office365.com (2603:10b6:405:70::29) 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:49 +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 BN8NAM11FT049.mail.protection.outlook.com (10.13.177.157) 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:48 +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:46 +0000 From: Petr Machata To: CC: "David S . Miller" , Jakub Kicinski , , Ido Schimmel , Danielle Ratson , Jiri Pirko , "Petr Machata" Subject: [PATCH net-next 3/6] selftests: mlxsw: Remove a redundant if statement in tc_flower_scale test Date: Fri, 23 Apr 2021 14:19:45 +0200 Message-ID: <898eb9e5bb2cc8ed82e7f5b5458befef96bb2ff4.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: e16cc12b-f0ea-4c9d-fd1c-08d906528232 X-MS-TrafficTypeDiagnostic: CY4PR12MB1366: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6tVsaIz9as+m1WUhWFmsNqWdw4QpUD4+GrJ5LVYWp+8VUtJGgS2nxv/L617rydx5y21yboTvD7MjiCtOlI3K+KscPs0FDoV63m8+uXW8hiNwMCpnK5mFcCOQRJU5dpdhDIy2D/UK3J0W3iW2EDsxa67gUwqjxqQWt1RJyhJnQDDeeyTNDZ7bRkT9+nu5ZfyrGTSq673DRd+28xc6Q2wgSW5D7An57YB1uQZxCZHG/8F25oyO5zdg+WnDIBIlAVFCn01enV06O8j58mJ9qy55+sP1MU0N+2WgYW2EAPTygdZtu5lBpKA6GrA85XD9RiSFwTCtOU9g5CkW9EOVFv1qEN/EvHU2D3wfZBbF3pKUIoCVR+7byGH3tmS6EbMjE5vknnSnf2di0stCrFMb5aP3L7GIFDO/j+SX64wnBAqSmHxf3EW0FJaxFqx5OKtLtiy0j2dKtdllOljynToDN0839IWejnwafXLkRMxTzG+6xiSKIbBMCJsjZIqe2hcyvoikZh3m5V/oXKSRLBBJC+V2kIE3tL2BP31W/7OcVKnoj3vVoyfaRIN9AoAHGjkA6ZZWiuqAIUYVa6l+g0BqRPYBecdBA3+h9Y1lD8l4KC04AKPrXYT8clyfADg67BEO18xH6NiXgShHIP0ce/OfP381EKGlcjll5WLXBh1Yy5bsRjE= 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)(39860400002)(376002)(136003)(396003)(346002)(46966006)(36840700001)(107886003)(26005)(186003)(6916009)(8936002)(7636003)(426003)(36756003)(16526019)(36906005)(8676002)(356005)(2906002)(336012)(316002)(70206006)(83380400001)(70586007)(47076005)(2616005)(36860700001)(82310400003)(86362001)(4326008)(5660300002)(82740400003)(478600001)(54906003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 12:22:48.9391 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e16cc12b-f0ea-4c9d-fd1c-08d906528232 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: BN8NAM11FT049.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1366 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@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: abfce9e062021 ("selftests: mlxsw: Reduce running time using offload indication") Reported-by: Ido Schimmel Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata --- .../testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh index cc0f07e72cf2..aa74be9f47c8 100644 --- a/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/tc_flower_scale.sh @@ -98,11 +98,7 @@ __tc_flower_test() jq -r '[ .[] | select(.kind == "flower") | .options | .in_hw ]' | jq .[] | wc -l) [[ $((offload_count - 1)) -eq $count ]] - if [[ $should_fail -eq 0 ]]; then - check_err $? "Offload mismatch" - else - check_err_fail $should_fail $? "Offload more than expacted" - fi + check_err_fail $should_fail $? "Attempt to offload $count rules (actual result $((offload_count - 1)))" } tc_flower_test() From patchwork Fri Apr 23 12:19:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 12220309 X-Patchwork-Delegate: kuba@kernel.org 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 00920C433ED 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 B89D760C40 for ; Fri, 23 Apr 2021 12:22:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242528AbhDWMXe (ORCPT ); Fri, 23 Apr 2021 08:23:34 -0400 Received: from mail-mw2nam10on2040.outbound.protection.outlook.com ([40.107.94.40]:14048 "EHLO NAM10-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242556AbhDWMX2 (ORCPT ); Fri, 23 Apr 2021 08:23:28 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=noRYkpoDoOWGDi+P/Uzwt4ZMjHEI1IJrlXTVVjVHjpA5Ry9RhrEnRlhOvdhiq8wvT+Tivh50cpgQekjByF1nXsWnVMY+oKEq5RU9KjgM3eWOcrJaO2ZAnX+ub8xUXgSW+vNL1ElsBZwVf8aKdTB+voQY6hhDcb8Z+0//b0lfBwE/2wNzTD304phCZTTM44B6fQN9GgYNqZITPqmX33gODzrwInVGD9V3BNr9dvuKVHgRPugIVPD1aeUmK8aKDuBSlRyhoBvzD5Tdcm+5BF2X0nEtdH67Q3Z60n8OVUM/QYIbGAdj6i/d5sZQvBTMhXcoCiEtNYyesV9WD+Phz7eGvw== 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=XZnu+pz2wk9QHig2xzx2MkbpH87ZMG8yM812MAlPx3Y=; b=IrzhrA3ot0Lv+gO33dso/lK8C/osp2s9vZ3j3j5iGjhWXuhgBKByiTaqfa+cK0NqD3jjFOkmwWgapTlbaBpEpGMk4yrIKh7Yfy1J1rTOTF2QlaN2hDqUXCi5+AtDwe2E9EnzZOg2xiGZomWQlfu81kc8s9mCHeu1FoGTxlRp8lyUCWahZuD8c5scqLXDts4xMImspFb5hoZ79jQplucVspGUEFsr2ciJUfzrm/ckD1OYF2y4heuuUHQa3PHzctLO+qw+VbAXD9Xr9Jo6Fn7/Jsbg1lI1Eoxio1QSteIiOFAaDZWqf3JfGcqNLi+BCsmC4pFRUWDczSE0YsL00G2g+w== 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=XZnu+pz2wk9QHig2xzx2MkbpH87ZMG8yM812MAlPx3Y=; b=WpBOGvUjO3DRI6Me/dIFpgyBH5ufxxXfwdZwubssWKVwvaqLFuZKcadKIcXQauvVGnnjyWtd260Ycwceajb8mKF2josfDOIfakui3P90+/97nm7UK6eHvmttaD+dbUhAe090yYpUScAzVj7Gw0gecSgsTLZz6wk6GWZKOOZtUOpNFzufo4Lxq1DJRirjw+7d098rK1yybCZcPVO4M/fZhcA9k5AETmPeaGou8qrCy+zjqbmRlmkmmr+XpOmgN1dx+iapIuWNRRTBvb3Guh5BYSFPmHPxhuOhIV7SIikZO71LPZPs47ytgxDHXZ3cHjw7Bz/VPT1kc9DLFdqao1yFEA== Received: from BN6PR14CA0005.namprd14.prod.outlook.com (2603:10b6:404:79::15) by MW2PR12MB2556.namprd12.prod.outlook.com (2603:10b6:907:a::11) 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:51 +0000 Received: from BN8NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:404:79:cafe::88) by BN6PR14CA0005.outlook.office365.com (2603:10b6:404:79::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.21 via Frontend Transport; Fri, 23 Apr 2021 12:22:51 +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 BN8NAM11FT008.mail.protection.outlook.com (10.13.177.95) 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:51 +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:48 +0000 From: Petr Machata To: CC: "David S . Miller" , Jakub Kicinski , , Ido Schimmel , Danielle Ratson , Jiri Pirko , "Petr Machata" Subject: [PATCH net-next 4/6] selftests: mlxsw: Return correct error code in resource scale tests Date: Fri, 23 Apr 2021 14:19:46 +0200 Message-ID: <792e1fa1bfd0c5df815b910f5a9e1f4ca2d77921.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: 9e961282-9c2c-4035-2dec-08d906528399 X-MS-TrafficTypeDiagnostic: MW2PR12MB2556: 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: z7A5yACLhfSnFZf2oFDqq9FcQzdgrmNN4Hi7CwfpqfOhNq19ZhKo3VlhwQzP2XPcVyU+nv2E2MFL9A/hr95sqAmTD3JCRkCHU4HH1Qz4k8uB99dLGMSVrHBQijBCmb1q+nKXxMk5AN4KX6iC+Df4c+uTt2rGABA373MKu85RFFzbc6W2/gIE1IS68Qh2yIRd+tooq/fmkF3W8EY+R1120kTtqK0AcOiArE7HUNe8opOhP26TFBARBwyfR9n21yjXXWbDvTRo56QR8/iYQhAy8K+kboYR3OYVpEV/sFb80ipLEAcbZSukgFh0z33vyagZRxED15Wqg+uYI3r4e9ZanGYYW//Y6aHrrjFEKbZc8Xp+qbvzojcO5unk9N06ILiUA99xeMveRELJTQbRjFyJ4TS1FnToEajiwJ6KhGWV8B6hBQBc06hua3+col+hKExu3CBQf9Uy92v4RwHCAy8PF1s0BC4KnPQjzv0PES0Cq60gvHJ7uoC24T3xZ/1bz/wBOxXV08RAAfvla8/Rxp4GHzcTmp6JHw3jfjfArQMfoe4tGuV8I38CJFQqZ4WQnYj8gP+CpY4ELNTnAk7ImbiK2tm/JZMq/aOOH5rQd41j0M80d0tfGfX+5a43Uy7rehPq6j3xcu5iH0Q73Ng4+RFMPw== 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)(39860400002)(136003)(376002)(46966006)(36840700001)(316002)(54906003)(36906005)(8936002)(107886003)(16526019)(356005)(86362001)(4326008)(336012)(2906002)(426003)(6916009)(8676002)(36756003)(82740400003)(26005)(2616005)(5660300002)(7636003)(186003)(83380400001)(70586007)(478600001)(70206006)(82310400003)(47076005)(66574015)(36860700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Apr 2021 12:22:51.2715 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e961282-9c2c-4035-2dec-08d906528399 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: BN8NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR12MB2556 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Danielle Ratson Currently, the resource scale test checks a few cases, when the error code resets between the cases. So for example, if one case fails and the consecutive case passes, the error code eventually will fit the last test and will be 0. Save a new return code that will hold the 'or' return codes of all the cases, so the final return code will consider all the cases. Signed-off-by: Danielle Ratson Reviewed-by: Petr Machata Signed-off-by: Petr Machata --- .../selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh | 4 +++- .../selftests/drivers/net/mlxsw/spectrum/resource_scale.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh index 4a1c9328555f..50654f8a8c37 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum-2/resource_scale.sh @@ -30,6 +30,7 @@ trap cleanup EXIT ALL_TESTS="router tc_flower mirror_gre tc_police port" for current_test in ${TESTS:-$ALL_TESTS}; do + RET_FIN=0 source ${current_test}_scale.sh num_netifs_var=${current_test^^}_NUM_NETIFS @@ -48,8 +49,9 @@ for current_test in ${TESTS:-$ALL_TESTS}; do else log_test "'$current_test' overflow $target" fi + RET_FIN=$(( RET_FIN || RET )) done done current_test="" -exit "$RET" +exit "$RET_FIN" diff --git a/tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh b/tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh index 087a884f66cd..685dfb3478b3 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/spectrum/resource_scale.sh @@ -24,6 +24,7 @@ trap cleanup EXIT ALL_TESTS="router tc_flower mirror_gre tc_police port" for current_test in ${TESTS:-$ALL_TESTS}; do + RET_FIN=0 source ${current_test}_scale.sh num_netifs_var=${current_test^^}_NUM_NETIFS @@ -50,8 +51,9 @@ for current_test in ${TESTS:-$ALL_TESTS}; do log_test "'$current_test' [$profile] overflow $target" fi done + RET_FIN=$(( RET_FIN || RET )) done done current_test="" -exit "$RET" +exit "$RET_FIN" 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: 12220307 X-Patchwork-Delegate: kuba@kernel.org 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 X-Patchwork-Delegate: kuba@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: 12220311 X-Patchwork-Delegate: kuba@kernel.org 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 X-Patchwork-Delegate: kuba@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))