From patchwork Thu Feb 8 15:55:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13549994 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2047.outbound.protection.outlook.com [40.107.92.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 CEDD37D3E5; Thu, 8 Feb 2024 15:56:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.47 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407780; cv=fail; b=SDE2P16ycQ5UiOyR06zZPv/vNs35eegeh3faPvMfiOqiLYG+cQoarhKD7ABfWi7L43WLVGVxU0cxHq+eBjWz0fkTf6o2giAv/7wddWHo4WmI4PNQupPrlexPlwtgYnFMKOiWLxS4fzOa9oYRSj8oVnz6XsGmr1YfLV6ehlOcuwY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407780; c=relaxed/simple; bh=wp6y/GOF+gNA3/6ZiDf/0CERsaIh7jLWsBf46qCEGYM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=G2pMqFQ2mUVSrVX9w0V3Xs7qTROBAvqel2dabocnm+9RhMsA3IrhHLysiGXCOJtUYubXp3mtIzm9fdSMzmYjNg60Zi0E/hySAAL1PQ1WQMJda6aJDClxlY61f6cyDqSAlyG1mQUMz+nOaLm6egvqoQmGj/acIm6OcS1Aj9ofB6o= 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=LB7anfoh; arc=fail smtp.client-ip=40.107.92.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="LB7anfoh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YzmwpzYIUTL0u5vfy/kf1nIONLCMMa97z4tIaXolAiQaJ4OzryUT52HVCXeIP+DzlKmZi2IsUmoedHY1ISgzQN0hVk7Opym8mPWd+BqK0rbExxt2QqEXmNp8l5MoNYYXjaa7Ena3xVqEcuAC/plzGugPSYJPE5T/82tItgYkDjOddhgKaxH7Pf0nHOWatQCaNcptQvWci0GvpB7Cf9iAP8OoC1FUjE9BB9O+cRu9Nets1P8cgQ+d7sWsz+jWxDPnK4PAiphCKztg9NiuqZGzLFubmrmUdhSaxxIHpnmDO6SPFQqeSmkHOnvTg0ENrmqx/kk2JYZQ/sqgJYpGEwTJoQ== 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=zf4s9i8LjQzeai0hUoAwR9N5dLly0nG3jMUI3fGN05Y=; b=E1ryPGp8QSrmHg6LugiUKELdieEJeVPOcii7IV+LCE04N3Lg082kskk13YnGhF5ejeBC45Wt9sB/le3vZyEcazRhaId1N5IeIVz991ukfjEJ/7kHRuqz7YDqsWPKO/d7bc5FF2ZUVrViH3KqFIiDEsuq7PrwBEoEASGVEGW8XiB5RIuSa0nJ9HNvWy/zzyGKcMJdyThy7OpxrAUOR8LmBJQCxMQWROMluyyzCkvyWEs349ZUDl6eze3uWqU6gASoCgiU+zbC0AUbyn2wmRC4NDMtE5jma0T8SCdFgKge9qPmbSL8WBqxoFcG7keMoOTQuVKq6m8ABs/q65BfPwzKnw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zf4s9i8LjQzeai0hUoAwR9N5dLly0nG3jMUI3fGN05Y=; b=LB7anfohlJdH5XlWkMxrcv0H14rLyYf/wgD0WyK1CqetatwlyB6MRmCT52dj7rUNGA/EgednFjvmRfujLkOIrHKA4bI27jvD04+S3W2+VpHR8bkyyIVORyR1cMBKzvmEgEDWsVScD6cA3Ui3Iq7PTaRuh5OLr8Jkrrg5p6UTIXHJMirdpWBe93+A1wcsj2jeiVqdTwTUsavlYMbIPnL0otbvHuJnuYnDefhL5nxQ1cB1m9lKAtSeddiWfSFLgyaNc4CHHwPFAEBboXfj5+pRObNfgk2frmCLZRzg/tEtVz7zbvThre/ZOmUDJDSB4bAjiO+EAF7q5T0LhBn4JG82fQ== Received: from BYAPR11CA0053.namprd11.prod.outlook.com (2603:10b6:a03:80::30) by DM4PR12MB5796.namprd12.prod.outlook.com (2603:10b6:8:63::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.14; Thu, 8 Feb 2024 15:56:15 +0000 Received: from MWH0EPF000989E6.namprd02.prod.outlook.com (2603:10b6:a03:80:cafe::92) by BYAPR11CA0053.outlook.office365.com (2603:10b6:a03:80::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.38 via Frontend Transport; Thu, 8 Feb 2024 15:56:15 +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 MWH0EPF000989E6.mail.protection.outlook.com (10.167.241.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Thu, 8 Feb 2024 15:56:14 +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; Thu, 8 Feb 2024 07:56:00 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 8 Feb 2024 07:55:57 -0800 From: Ido Schimmel To: , CC: , , , , , , , , Ido Schimmel Subject: [PATCH net 1/4] selftests: forwarding: Fix layer 2 miss test flakiness Date: Thu, 8 Feb 2024 17:55:26 +0200 Message-ID: <20240208155529.1199729-2-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208155529.1199729-1-idosch@nvidia.com> References: <20240208155529.1199729-1-idosch@nvidia.com> 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: MWH0EPF000989E6:EE_|DM4PR12MB5796:EE_ X-MS-Office365-Filtering-Correlation-Id: 818db5dd-ec9e-4f63-44ea-08dc28be7ae1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NHW2Q+Xpa8lvAR3KT56bYr5/4MDlhZoHfAN2XKtUDVJzytD/t+F4x8IqoYcBgAIylaW1SGtmVAb6OBceHBECJmEi8GBmSRl1GyhsFAPDRvx3wsgBWnNqGNgw/d7L6I+X16CuaQcGtkSwCet1TGJhbwN2BYU8/axM9vQQE5duOmHVBkUVneQeul+26FuyHiEWy+3twJVfJ/tLX+RtqZ2oX7oygA1Djm5senaI5L3Ra7vWkVvZ5Spc05whVZTMPUVfgEJBm5HlPPKJ6CWuaIrV3FQwsY0o52kxmj7HSsRNmK8D+1pLYT1r7k/d6sMqvQbPZr3fISlrJPSNh+5bcGb0UEQA6RxAkr8L+hNtdjMBGyuX36WkTK0MJkMkBo8EbPd3zQp1HgqfgMBar129L6HOmLIeJWyF0id8CbsDDJhD+PoqYBkE+kBWZ/WCsrNALRNFe5uWtUoweuwI8VfEkX9NmR35362zCl97zuoyrzrVM5JImElZcIzxjbORWo8kXiMtCgYNKbOn9kVUJzRGcNaGqqa+RUXuiG9wIbc2hnkiHlS7rqZjgyQTlM9Lg9MwAdMcUJjVE/Rhitrx1uYv6VupK4fzhNpN8CRbNbOfklTaqZA= 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)(4636009)(39860400002)(376002)(346002)(136003)(396003)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(82310400011)(36840700001)(46966006)(40470700004)(2906002)(478600001)(5660300002)(7636003)(356005)(4326008)(86362001)(8936002)(6666004)(54906003)(83380400001)(8676002)(110136005)(336012)(2616005)(316002)(36756003)(1076003)(70586007)(70206006)(426003)(66574015)(26005)(107886003)(82740400003)(16526019)(41300700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 15:56:14.8686 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 818db5dd-ec9e-4f63-44ea-08dc28be7ae1 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: MWH0EPF000989E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5796 After enabling a multicast querier on the bridge (like the test is doing), the bridge will wait for the Max Response Delay before starting to forward according to its MDB in order to let Membership Reports enough time to be received and processed. Currently, the test is waiting for exactly the default Max Response Delay (10 seconds) which is racy and leads to failures [1]. Fix by reducing the Max Response Delay to 1 second. [1] [...] # TEST: L2 miss - Multicast (IPv4) [FAIL] # Unregistered multicast filter was hit after adding MDB entry Fixes: 8c33266ae26a ("selftests: forwarding: Add layer 2 miss test cases") Signed-off-by: Ido Schimmel --- .../testing/selftests/net/forwarding/tc_flower_l2_miss.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh b/tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh index 20a7cb7222b8..c2420bb72c12 100755 --- a/tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh +++ b/tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh @@ -209,14 +209,17 @@ test_l2_miss_multicast() # both registered and unregistered multicast traffic. bridge link set dev $swp2 mcast_router 2 + # Set the Max Response Delay to 100 centiseconds (1 second) so that the + # bridge will start forwarding according to its MDB soon after a + # multicast querier is enabled. + ip link set dev br1 type bridge mcast_query_response_interval 100 + # Forwarding according to MDB entries only takes place when the bridge # detects that there is a valid querier in the network. Set the bridge # as the querier and assign it a valid IPv6 link-local address to be # used as the source address for MLD queries. ip link set dev br1 type bridge mcast_querier 1 ip -6 address add fe80::1/64 nodad dev br1 - # Wait the default Query Response Interval (10 seconds) for the bridge - # to determine that there are no other queriers in the network. sleep 10 test_l2_miss_multicast_ipv4 @@ -224,6 +227,7 @@ test_l2_miss_multicast() ip -6 address del fe80::1/64 dev br1 ip link set dev br1 type bridge mcast_querier 0 + ip link set dev br1 type bridge mcast_query_response_interval 1000 bridge link set dev $swp2 mcast_router 1 } From patchwork Thu Feb 8 15:55:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13549995 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2048.outbound.protection.outlook.com [40.107.220.48]) (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 1AB4D7D3E5; Thu, 8 Feb 2024 15:56:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407786; cv=fail; b=Ar1aXtgmMaxoq6nLEa6c5JAoI6OPe7oDdhUNcXIKa/xrKo4y9qmUjZXSiTRAmwjrYqehpIiQ5RczIj41+Kf3zQUBjUxAxJfLT5M1nvk23xuvQXlvyJpe/WjXFMqiojxajr+ur25iqk4cKpwDIAiP8hfq6HPHrBmdcNCQGx2j9To= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407786; c=relaxed/simple; bh=qId9vIF59GPp+vKKgUZJlCx3qRN7vRxTnsMFjycoMis=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OIn1+ogq6amv1Y/A7LWisWb0vXXPz+qQp/cXp1GtQAYyIY3nq3bVS7dlkIGPSp2UF8eEuy6EEwOa7hRxmrM27XYtpaozYiI0PqMh3Ap6PQ6EgnXy0IQC+TJZBnilGBsPLKfn5DRDid7LzPGbLu8TNjXBMyP1oESPZcvLTYCCH6c= 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=h4XHqzU7; arc=fail smtp.client-ip=40.107.220.48 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="h4XHqzU7" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IaRBqJMrg/4IaI7YZYnBTsLVnkdtTPlPSq8/SPMERF1QGQqfT44130CG1VjXEImkAgbBqsvhMgexTev3M3GPxnwM6+pGBts3WhbOq0OYKs4SkovIHRNpkMZUutayMzI2uJDLQjtWoUaeF6Qb0wvpsh4nabNiDCYeTNbUf1zRPlRg1arvMgsgFVpoW0Ry77WVimSpdOtPV3mbsaT8jEmYxpjwa1JDA8iETuuJxHOaoF61CXuk0UsJdZzwuLMHIxT1nTdx5l12NgTNWQDqAMDaScG8L2h1Rzn1dOU0YsF1bsHD8hdvpLgIrqtBOA2CzDVNP0LJqx3IE9IdtVSkdCKxCA== 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=fw55dXQKpfEFSBszPoMkCtLnrpAIKyvVz1cBKk6BlKc=; b=aofkXfBngJVnSjOyr2MEyMqhgR2UNfd5tKwmnPxxivxCQNyBcNQg/VTIJOki2khvdlNi4WuSxzZA+BIi4dxas/xX9G5wOclaCXRiLaQPGrx7KyOAnGwmYyZygwWZuBGHYxt+fLP9z4jb4IxQ1FUXiKTfqRJdNfLQFDWKTAKUFiM2ktP0Kvcr4/1P5iD0tza06Uvz6et/uObYcuKDAHYt20vCNk8v77p8V11/xoGr3TQjxdK/Ro9a2F+Nuim/RdOgEDHF7kyjCEtq7zFONh8+7lcuDaJ9Dd1gJXykQRxUkgllsaK/JfqBCWVdRs60ILtsFBWfexIgFOBymtRKpXqR1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fw55dXQKpfEFSBszPoMkCtLnrpAIKyvVz1cBKk6BlKc=; b=h4XHqzU7NjYbmx0J2mnhsC+yn3fSjGbzUcVungAzhLF3wyM/jTNVZIGzcB7RlfMNCTWh/s4cPx46aVA3xrW+seeAVffeIaVt0VrrcWqIXRcWH6fYC94DLRqS86O6DVZ4RZkJwn57pw0ofpxxgJ2ftteNpjYsBM7godG1EavEtrH27mjnnxjDPPB0P8kcyyecJmnwwi/sVj3UCY+QjchhEXaBkkoNX3wVS7DAt5sFtzvoMlCp/aRmFp1GHURifJO27JhL6Ktx964pTW9swbWeuIHC6rWBKaqb7BDJ1iHDau4ERzlVyZ6GxyBtS2I2zqPeJvjGxzG6PMYp9fLVaV4J3A== Received: from CH2PR02CA0022.namprd02.prod.outlook.com (2603:10b6:610:4e::32) by MN0PR12MB6054.namprd12.prod.outlook.com (2603:10b6:208:3ce::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.14; Thu, 8 Feb 2024 15:56:18 +0000 Received: from CH2PEPF0000009E.namprd02.prod.outlook.com (2603:10b6:610:4e:cafe::2d) by CH2PR02CA0022.outlook.office365.com (2603:10b6:610:4e::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.41 via Frontend Transport; Thu, 8 Feb 2024 15:56:18 +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 CH2PEPF0000009E.mail.protection.outlook.com (10.167.244.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Thu, 8 Feb 2024 15:56:18 +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; Thu, 8 Feb 2024 07:56:03 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 8 Feb 2024 07:56:00 -0800 From: Ido Schimmel To: , CC: , , , , , , , , Ido Schimmel Subject: [PATCH net 2/4] selftests: forwarding: Fix bridge MDB test flakiness Date: Thu, 8 Feb 2024 17:55:27 +0200 Message-ID: <20240208155529.1199729-3-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208155529.1199729-1-idosch@nvidia.com> References: <20240208155529.1199729-1-idosch@nvidia.com> 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: CH2PEPF0000009E:EE_|MN0PR12MB6054:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f9f8812-5ae0-4532-7d56-08dc28be7d22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1G1RzO/btSLHJAKSiKpONxu9A2jcglZAhlGVEMnzQQiu3PA9S0cbpmcwY0nRF/HOo6B34x7NSGLvfG92bqX+Mqv/5Vu2wjxHTGJJWsZn9CxismUukWk+pHJbqNtseHb/OACj2hZ4HFnuKL9P/afJurER4ic4+puCmZWQFf68EKTleTI1R6AiDUjp1BqUh4OlHVNSGHnum0+S68BFrq0tLbforl782aDmdU7xVApfnTdCcNziEX+djjf21LrsrMi7pjuLv+Xz1hT0TcsnbB0SsfXwn62X58TfVcRtKOUW8oHTjoYMGoq3reAh5ILPSr7bKx2iDlqoJP1BHKp8LvHRp621+1tt9W7EmC1ONTCqMq1ugizUNmT1bDrSdoTQvQYQjWMrNpYajFQLCXxLKhJhANep1Wr+LpQ41hhrLkGZAYJjEPstth36J3soaNFtgWZ43S2L27MhZyIrkgEfKQ1dgG/3jBe5u4tIqrKPHHJ/J6EmTSIrzh4VHmgmffN0Hh4HQNf2oPs3S7rznLiZmssB4ClNg2nfoxATixQ6Q558OUeoYp4s+zY/8os2ZssWexv0FnRk2zOUj/RjGBo1E80XwQ6tnt/irlXbQH8pOwjwZUM= 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)(4636009)(396003)(376002)(136003)(346002)(39860400002)(230922051799003)(82310400011)(1800799012)(451199024)(64100799003)(186009)(46966006)(40470700004)(36840700001)(41300700001)(107886003)(2616005)(1076003)(86362001)(82740400003)(426003)(478600001)(26005)(336012)(6666004)(16526019)(36756003)(356005)(7636003)(83380400001)(2906002)(70586007)(110136005)(5660300002)(54906003)(8676002)(4326008)(316002)(8936002)(70206006);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 15:56:18.6358 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f9f8812-5ae0-4532-7d56-08dc28be7d22 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: CH2PEPF0000009E.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6054 After enabling a multicast querier on the bridge (like the test is doing), the bridge will wait for the Max Response Delay before starting to forward according to its MDB in order to let Membership Reports enough time to be received and processed. Currently, the test is waiting for exactly the default Max Response Delay (10 seconds) which is racy and leads to failures [1]. Fix by reducing the Max Response Delay to 1 second. [1] [...] # TEST: IPv4 host entries forwarding tests [FAIL] # Packet locally received after flood Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/bridge_mdb.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh index 61348f71728c..f94bfb6f45ec 100755 --- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh +++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh @@ -1252,14 +1252,17 @@ fwd_test() echo log_info "# Forwarding tests" + # Set the Max Response Delay to 100 centiseconds (1 second) so that the + # bridge will start forwarding according to its MDB soon after a + # multicast querier is enabled. + ip link set dev br0 type bridge mcast_query_response_interval 100 + # Forwarding according to MDB entries only takes place when the bridge # detects that there is a valid querier in the network. Set the bridge # as the querier and assign it a valid IPv6 link-local address to be # used as the source address for MLD queries. ip -6 address add fe80::1/64 nodad dev br0 ip link set dev br0 type bridge mcast_querier 1 - # Wait the default Query Response Interval (10 seconds) for the bridge - # to determine that there are no other queriers in the network. sleep 10 fwd_test_host @@ -1267,6 +1270,7 @@ fwd_test() ip link set dev br0 type bridge mcast_querier 0 ip -6 address del fe80::1/64 dev br0 + ip link set dev br0 type bridge mcast_query_response_interval 1000 } ctrl_igmpv3_is_in_test() From patchwork Thu Feb 8 15:55:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13549996 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2053.outbound.protection.outlook.com [40.107.93.53]) (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 E251B7D3E6; Thu, 8 Feb 2024 15:56:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.53 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407788; cv=fail; b=K87sj61q1uh2ozn7wq6pGKlcqj8QQfRR494iDuaApKza73ZzVXcj82j7U7L541V7dDHIS3v7j3+jvU9pbexkGy2J6kJj1jye9TKyFrkzwE5WjA0u/Lkawn+wN7mD8E8wfEYx9SAvtIxSTF+2yF7qt3w1cVhpGW7izDODpwwMUnY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407788; c=relaxed/simple; bh=RthFTu2/y5ad94yHCkOgPbM4VnUPiUP7kNRF3dW8PFk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=t7Ntw6iBuoGcoIKvya9pBaXa0nr/zDgx7sGTn3Vovi/HLvL9Djseq3mezY3kdztZODXHhPtvtHdO5NXHlIEw+8LYPK/szr1c2u8LG86XMtKNr5I0uN+ep0wek1nTJ5c1SJvffe/TRhwVsd5irFphibV7y/e7awhO68GHtfHIpKs= 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=k9koFhJF; arc=fail smtp.client-ip=40.107.93.53 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="k9koFhJF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RNHi+1EACrwJDhaowuv0zzqo2ovKhaqfvX7BXhQaRzj/V7V5efeVBIf5jlhCAm42W/khshPo8ei1Ud+V8cqVy9DRYJ7okl7qlta2sxTYnsUpyh3VGTj9Van17C4gnG1KO8iYjw3/RKKtCWrKw4ZEyK6LtD6oBrYTOghzJqZLLw1TEs2vI+6qGKCRa5oQTguIuuSh6pAW6/5KupwUow4/jKsXP7FoVS63z626v4KTDRq4yDuMecU8YscgJmwLhAk0gNgSeZlIjnoBOg0a5eWywLQFH/ZSbKYEfWDg4kZwamS3IjnmpjRIiavOjqn3VJ8MBMe2frMeOdMcLgdy3NZXIQ== 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=Po3QyrtoWh2IxlD8OGx2MIsaqLZITTIA/vfivYAexrs=; b=A+kDWpUqs3It7QQ76nIeDnduoXSChRR1T5jY2Y0VpS4kmS9rAT0hEWxq8+u7+WFdsmM37dIxje0nIa8yyA6vyLWcvg5a9+uf3xmaLlXLvROKbEC5oYcOCKA8Bw/dEOU/qXRPTIkejwm5VWkkOXHFdrDvMOO2tVbL/dcrlTyhFDy8Ravb96YCspg1puajnUCs+Tyf671FUIUqTg0KQYIzXr29AsEQUmtGKv2Ct/pRd0OFLSKNgjnfPacDnYB0MOSMqw4euX/V6iJZSvXGVmp2/yi3FpW4lGDvWqMpEu+5KZJTp+vu2SaF/jyuyq+4mzf2zD1vte/jXqH2e2wEfxNAyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Po3QyrtoWh2IxlD8OGx2MIsaqLZITTIA/vfivYAexrs=; b=k9koFhJF4sNzFTetd7VIYuQDAFhaUhCigCkN7I46VjP6SkgXDOBnAYVGfEjGfXrYqn09ZbKg6BCAQnCM5wUqCSNRlsAXw5uxvJa2wFMydjxh6KklAAdDh04iLNSR7NvvxUk7qBosxHJUC8ZtVDBDbieH89Yy00n48wcM8sbhUrmoG/B1UgJipg8l44WfkEtItzFcOTg2kKwuZKAgWbUj6pDrNGQBqeRgWDgarkcoRnr6Q0KpaEnKwJ+OqvTfFMGysgQniyIl2guUg3ZgjqYCVT8crhF/XmkoOSOwzh3uiDlM/Ba4ERnsVE5tdID0DIVEkQd8vslfwXgMo/revklybg== Received: from CH0PR03CA0008.namprd03.prod.outlook.com (2603:10b6:610:b0::13) by IA0PR12MB8422.namprd12.prod.outlook.com (2603:10b6:208:3de::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Thu, 8 Feb 2024 15:56:23 +0000 Received: from CH2PEPF0000009A.namprd02.prod.outlook.com (2603:10b6:610:b0:cafe::8f) by CH0PR03CA0008.outlook.office365.com (2603:10b6:610:b0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.42 via Frontend Transport; Thu, 8 Feb 2024 15:56:23 +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 CH2PEPF0000009A.mail.protection.outlook.com (10.167.244.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Thu, 8 Feb 2024 15:56:23 +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; Thu, 8 Feb 2024 07:56:06 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 8 Feb 2024 07:56:03 -0800 From: Ido Schimmel To: , CC: , , , , , , , , Ido Schimmel Subject: [PATCH net 3/4] selftests: forwarding: Suppress grep warnings Date: Thu, 8 Feb 2024 17:55:28 +0200 Message-ID: <20240208155529.1199729-4-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208155529.1199729-1-idosch@nvidia.com> References: <20240208155529.1199729-1-idosch@nvidia.com> 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: CH2PEPF0000009A:EE_|IA0PR12MB8422:EE_ X-MS-Office365-Filtering-Correlation-Id: 36b96f60-2fab-4315-410a-08dc28be7fc7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nI4yAYTA5UG7uhoQiR5iXjEkEOs8mZ/aYWtQgQCvf2XlHm3I80/UmLfR1+g8yXomESFUUI1X5m40gVQCJDrzU/f+Qck5aEikQF435+WeGkW+KZDljs7xTc5Oss8O4n+vz6FNcBL/9df4iI5mtNSP2zXzn33bxGDUIZieAqJGK1zxg32sU+1BXFEaADzpXoEkANtn5EwI3XPV0RzL1MTBlgDJMwvwUEjoXHpYzKxBnvE5YXBonzC/inI2NsNek/iTlhRaVD5rBNXewOvkt2oHSgoXBViQ1vXMt2KmEkl+GDZB9RMGHxA06q05fEXYWG0FRoaYOiu/ASGqO1661fHY7ToAqjfjAO7yXKya+NgmhmIGqSqlsYb8QwyFzA4wcLeCE2Eize0qX5Yhf0MeJzzmFCkcRmph9BdLfen5t1GLZQia7HwiWRfdYzc0lmTTfTpuNVe+ZxTxfbujHfDwf7FvdXwXteInAkdSi1GYAExF8R4XLu7Nj871pHn6qmn9eCmaLE68C0hKP1NMdX7cJCVu9PVloXJPuRIfiY9gsqQoRkJfHOChCRjfaO1AmsPWNQ4PU6UTijrxKxJzZFJs5HeZpJbcBxRFZrPWwhS6/trQtas= 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)(4636009)(396003)(39860400002)(136003)(346002)(376002)(230922051799003)(230273577357003)(1800799012)(82310400011)(64100799003)(451199024)(186009)(46966006)(36840700001)(40470700004)(36756003)(336012)(16526019)(6666004)(356005)(1076003)(82740400003)(2616005)(83380400001)(107886003)(7636003)(26005)(478600001)(41300700001)(426003)(70206006)(316002)(8936002)(2906002)(54906003)(5660300002)(8676002)(110136005)(4326008)(70586007)(86362001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 15:56:23.0711 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 36b96f60-2fab-4315-410a-08dc28be7fc7 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: CH2PEPF0000009A.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8422 Suppress the following grep warnings: [...] INFO: # Port group entries configuration tests - (*, G) TEST: Common port group entries configuration tests (IPv4 (*, G)) [ OK ] TEST: Common port group entries configuration tests (IPv6 (*, G)) [ OK ] grep: warning: stray \ before / grep: warning: stray \ before / grep: warning: stray \ before / TEST: IPv4 (*, G) port group entries configuration tests [ OK ] grep: warning: stray \ before / grep: warning: stray \ before / grep: warning: stray \ before / TEST: IPv6 (*, G) port group entries configuration tests [ OK ] [...] They do not fail the test, but do clutter the output. Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/bridge_mdb.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh index f94bfb6f45ec..d9d587454d20 100755 --- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh +++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh @@ -329,7 +329,7 @@ __cfg_test_port_ip_star_g() bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00" check_err $? "(*, G) \"permanent\" entry has a pending group timer" - bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "\/0.00" + bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "/0.00" check_err $? "\"permanent\" source entry has a pending source timer" bridge mdb del dev br0 port $swp1 grp $grp vid 10 @@ -346,7 +346,7 @@ __cfg_test_port_ip_star_g() bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00" check_fail $? "(*, G) EXCLUDE entry does not have a pending group timer" - bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "\/0.00" + bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "/0.00" check_err $? "\"blocked\" source entry has a pending source timer" bridge mdb del dev br0 port $swp1 grp $grp vid 10 @@ -363,7 +363,7 @@ __cfg_test_port_ip_star_g() bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q " 0.00" check_err $? "(*, G) INCLUDE entry has a pending group timer" - bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "\/0.00" + bridge -d -s mdb get dev br0 grp $grp vid 10 | grep -q "/0.00" check_fail $? "Source entry does not have a pending source timer" bridge mdb del dev br0 port $swp1 grp $grp vid 10 From patchwork Thu Feb 8 15:55:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13549997 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2052.outbound.protection.outlook.com [40.107.94.52]) (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 067707D41C; Thu, 8 Feb 2024 15:56:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.52 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407791; cv=fail; b=qMtafNHSRAC5ZYwsqWUjpStX4HKcEQqH6rVxYFZoI2wMmCCrwG1tvoaNdoZdZJv6d4tE2/hptnFWHfF2fFJ3U/D6PGaqlI/CUuTImoPBQvFTPTH26BipmumTzKERaNiTbqDAR0+GWsJimp24HSbE63rNaJXP3WwDD1+fEGXTgM8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707407791; c=relaxed/simple; bh=DhqeG4woumYbwJaQqqKMnLD55c6wBaOfGckfPL7Vd2E=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=khVoxMQnT9OLcQxHB1ULtpEutAc38colUftRXWGdol4Y3UwL6E6k7jZn0qQwidMXzEF6KBo3QS22N2ndmhziYZiCkwFsK2KbpUuchijLpooNodHxI6PM9cCVhAGmuMqjhisJZVx0vT9SaypvVCl/Z5/s1I88qFSr8LzjT6H5xfA= 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=eD5EPxN0; arc=fail smtp.client-ip=40.107.94.52 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="eD5EPxN0" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=deKaESG5WQU1SEOJrxYldCCUqQZHdH2WANxH11X2YoipgnnUH4K4SX8Dk6JqiuZGqKmmEcMvrfkcNz585KW6PpymNfjTxRMqinL0HUhDh0IuK3VfCxGcrmRMhIUIz8tjlTN8dPx64WHvf41whwbdGpUURgA5qg46XOSCOO+gH2Ks9A30bqt9BJ+Bo02tbR6ySPHuks7p+ykuI4oHs1WuS8g8r+mk0WefuV59gjZk0uBovwx0s+SPoZdQ9e7RnOEBPMYbWQpzp+xw51n7Aj2IXACIDsr46Fikbdh8o+No989P2DwkrssUh1ntBIFrnBB1oLHNUbqsB2zVzM3Ga3vfuw== 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=WxUxUE0ExgcJQeteEtQoDgHb1sKR7LDIIIOTtto1XmU=; b=jd8lo2wfA6pad6/LybqndXh2XhXDFd2Xt4+JhnLDvn9/U33qf06SnG6sH2/EiuchAe9rEYtmY/Dj+1L9K1vygUhaOPc4mVcSfFSFxUbQMydjQy6ZVF6q/wofj+3YPENK8ZAbk97FllRoFT28wZedmp6Woak7uvy+hwGUABBVXqiQ8ZbpCBPZa9vR/85SKgD60TW/hetIcKN3Htax2S/eAQNQsQXWCR+6mpHJy9OwxodhKu282BtI2Z6mKSXKrghPd+dp7keEPR/LPUz86JBIgJH6meGAkZXjQ33jC3ZGZZxv03F5G9og85ISveNu9ApfTeP/3bc4mKc+vv75RJGN1Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WxUxUE0ExgcJQeteEtQoDgHb1sKR7LDIIIOTtto1XmU=; b=eD5EPxN0LpVx7+Zm2Vc6nHCcWezRhUxnDgYLfO1mwrnIWXSyFV32qkaNhTdjP/tKyUjxXIaEe4lFD96acE8wry4M1OnUDU4w5SfZJI7wB6pgOgVBfL9bgdXEjDMz1JZYe/IOicoaiwLv38B1vbk2HcC61ZFggZ492mgaBuy9gsTsx3aAHB9GKdDh+4QE0D8e2ASNzTyjB/pqE4HvfaQswqYoHWBAO1iHYiaTsMkTdpUWOi3cS/Jz3AUGeT+MmGNTNlhutz3PZHchKlyRoSWUhpog0IZo2Si29PTt1msOBiz2g8z2StAE+PpFQFYlmOzevWfjvZ08sB25uMsaTFfvSQ== Received: from SJ0PR13CA0160.namprd13.prod.outlook.com (2603:10b6:a03:2c7::15) by DS0PR12MB9398.namprd12.prod.outlook.com (2603:10b6:8:1b3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.11; Thu, 8 Feb 2024 15:56:27 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:a03:2c7:cafe::1e) by SJ0PR13CA0160.outlook.office365.com (2603:10b6:a03:2c7::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.10 via Frontend Transport; Thu, 8 Feb 2024 15:56:26 +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 MWH0EPF000989EC.mail.protection.outlook.com (10.167.241.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.19 via Frontend Transport; Thu, 8 Feb 2024 15:56:26 +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; Thu, 8 Feb 2024 07:56:09 -0800 Received: from dev-r-vrt-155.mtr.labs.mlnx (10.126.230.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Thu, 8 Feb 2024 07:56:06 -0800 From: Ido Schimmel To: , CC: , , , , , , , , Ido Schimmel Subject: [PATCH net 4/4] selftests: forwarding: Fix bridge locked port test flakiness Date: Thu, 8 Feb 2024 17:55:29 +0200 Message-ID: <20240208155529.1199729-5-idosch@nvidia.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240208155529.1199729-1-idosch@nvidia.com> References: <20240208155529.1199729-1-idosch@nvidia.com> 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: MWH0EPF000989EC:EE_|DS0PR12MB9398:EE_ X-MS-Office365-Filtering-Correlation-Id: 59e66a87-bf4d-40ea-9d44-08dc28be81f5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xWE8rHAK/vzn0CQ+7/QU5mCEuiFJsIY1qRXd0ix3YSvQsYTjCmYI1FUdSvp7yMTK5v+cUwGMc6usQw1k2g9SUvCnYIemQ/Mmiqmwi2ycCzAqZCADcGv6euG7Pmd97tBhRWRm+K4ek1bFTTeIJe5M9J14poI2FBmolcTUEjyjQIMZFcD1/yQV6BEYTvNLdOtnqBEB6TAXNxaJw9umB86UcxwFyNCajYmqUlnhbuhJIE0eM21vQzU7+Z0uUPPgLo4UFlgq2MQ41rRnrt4iDVX++0D/HTYUvmTQYJsybR81qpnXIoy2w5jWmfEuzhtWKu9TsVDZPncvuNeBMtoG3lWMZnzbw/9gkq4Vnf2TW/5gZjjxi6M14loWmA8GTpQnY38GtffEwd2YI5Zh5yqy01E0aC+8lhKdsJWmP4Vb7FofdaHC/rDJaZa7f2dUiEHV/vkiSd3zqjZB1VdXgVSaPj8VfG/EXD5kWwdyJ7PNAHcG/XNSrVdFiL9XfHgXcBnM+jUK0Z6lOF5HpKtme1ShfGNf29yY53oHxyOshCws/9XnV8SjqF5uK1tPj+jeeV698vz0w9oy3lStgqCKGqSisT974dyNBu/EzzqW7AM5JYjNF34= 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)(4636009)(136003)(396003)(346002)(376002)(39860400002)(230922051799003)(1800799012)(451199024)(64100799003)(82310400011)(186009)(46966006)(40470700004)(36840700001)(356005)(7636003)(82740400003)(86362001)(110136005)(54906003)(6666004)(316002)(478600001)(5660300002)(70586007)(2906002)(4326008)(70206006)(8676002)(8936002)(26005)(107886003)(2616005)(16526019)(1076003)(336012)(83380400001)(426003)(41300700001)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 15:56:26.7460 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 59e66a87-bf4d-40ea-9d44-08dc28be81f5 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: MWH0EPF000989EC.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9398 The redirection test case fails in the netdev CI on debug kernels because an FDB entry is learned despite the presence of a tc filter that redirects incoming traffic [1]. I am unable to reproduce the failure locally, but I can see how it can happen given that learning is first enabled and only then the ingress tc filter is configured. On debug kernels the time window between these two operations is longer compared to regular kernels, allowing random packets to be transmitted and trigger learning. Fix by reversing the order and configure the ingress tc filter before enabling learning. [1] [...] # TEST: Locked port MAB redirect [FAIL] # Locked entry created for redirected traffic Fixes: 38c43a1ce758 ("selftests: forwarding: Add test case for traffic redirection from a locked port") Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/bridge_locked_port.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_locked_port.sh b/tools/testing/selftests/net/forwarding/bridge_locked_port.sh index 9af9f6964808..c62331b2e006 100755 --- a/tools/testing/selftests/net/forwarding/bridge_locked_port.sh +++ b/tools/testing/selftests/net/forwarding/bridge_locked_port.sh @@ -327,10 +327,10 @@ locked_port_mab_redirect() RET=0 check_port_mab_support || return 0 - bridge link set dev $swp1 learning on locked on mab on tc qdisc add dev $swp1 clsact tc filter add dev $swp1 ingress protocol all pref 1 handle 101 flower \ action mirred egress redirect dev $swp2 + bridge link set dev $swp1 learning on locked on mab on ping_do $h1 192.0.2.2 check_err $? "Ping did not work with redirection" @@ -349,8 +349,8 @@ locked_port_mab_redirect() check_err $? "Locked entry not created after deleting filter" bridge fdb del `mac_get $h1` vlan 1 dev $swp1 master - tc qdisc del dev $swp1 clsact bridge link set dev $swp1 learning off locked off mab off + tc qdisc del dev $swp1 clsact log_test "Locked port MAB redirect" }