From patchwork Tue Aug 8 14:14:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346176 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 9BA861401F for ; Tue, 8 Aug 2023 15:46:58 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2070.outbound.protection.outlook.com [40.107.223.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1F777ABC for ; Tue, 8 Aug 2023 08:46:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WR8z52t3u2A/1qruWlPbxFrWj3Q9SODaoWmu02E3CxKptF54Q39v6ocF5U0X1InzwkjwbEWSh8XIkmaZBznyRxAS7i55ziRSupP8FNqCW0Nqel7YWJHUkAmjdeOKgbGAM+kkfuZ6beXTYr/6yjbFAJyjPwa2DOcHKI1nFrGbiNq238GtLIik296mZnwmzAHsajeonuir9UZldU411SZewNypjNwA75/ahoYfJc/DGTU/tRR3VvkxA9bkdDikGDM8kIVkrG+AK6pGz9RJmx/ci3zpAI4xf8tKh1zLN1iK8uh9FmpS+g4UyR11HAkRIq9iGkoerT29dp95gDOHZpXvbQ== 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=gwgRqpdSL/ICEN4nx078sfEVZjEKcVeEXYdn9IGtlZ4=; b=GT1sTPkXybnDBqLUANUDvEAKc7suLPErAAmc7oo/qtkepQV0JHopgSLjt27skmPtaRajLOLbivvOmMLWEhUQPPPq4oeWKDljW4IxVhnJ4VdH3ac8/5nCtYPxx0B9LyeJrP6AZVDQChFubv4O8QjxZ6BCHJNzKRkpnqj7PR8GXfWieXnAo69q0M583jq1ShamTTDVUXzm3v7wUBuuXS/BRsJAmId1RsRRmGHGbZlljK1tXx+So8Pi260OOtyvazz8qX0dSekDItdnuOzzTUOHXDarcS5y5gCoDoSdcy9OEjJtXOEClMFrheIEAM8fM3m9udKFb44PRdte3iKvWdssnQ== 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 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=gwgRqpdSL/ICEN4nx078sfEVZjEKcVeEXYdn9IGtlZ4=; b=EVj4vO9ZMI9XdzdhFof9H8OTnkcIYlQNV9/TpjV6qf4CsF5LvUYVZJLDIeC4dNNC3bMdmeuS9YZc5qGwDYnd/5n3cI9ZluoWSMs2OqJe7EESeLRehiUOJl2BzRsM1xJzxr2qv9ijv3ZFI9gImI/nhPVyfNyiQCCT6wTrD8m8vzJ9zLy6uTs3QbNMZNWC7IZbpMezHW830ArboFXmhkmvm/4+R5uwQf1EI0RUs7ZNhHP6FbP6IZ0f6H3ZefhW4SuRJCJaM/a5DNe6y05/xnNoKVlL05rhg1QWncxSC6qnDb46G6LgYlz5paJy4PBejdyk73YLQSVKtq3PsmS3RGB/Zw== Received: from MW4PR04CA0043.namprd04.prod.outlook.com (2603:10b6:303:6a::18) by LV2PR12MB5823.namprd12.prod.outlook.com (2603:10b6:408:178::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:15:52 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:6a:cafe::69) by MW4PR04CA0043.outlook.office365.com (2603:10b6:303:6a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:15:51 +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 CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.0 via Frontend Transport; Tue, 8 Aug 2023 14:15:51 +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.5; Tue, 8 Aug 2023 07:15:35 -0700 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.986.37; Tue, 8 Aug 2023 07:15:32 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 01/17] selftests: forwarding: Skip test when no interfaces are specified Date: Tue, 8 Aug 2023 17:14:47 +0300 Message-ID: <20230808141503.4060661-2-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FD:EE_|LV2PR12MB5823:EE_ X-MS-Office365-Filtering-Correlation-Id: 3bab1bd0-d334-400e-24f4-08db9819f8c0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wy2RvXNA9kz08/Ysu5TuquVpRT/XRov6jkooCEOscLQX2CQyQ8Tehl2UdB3O/Lgb2ZweaL1K/e/DdxAhs1XUByhEpSSrp/hg2ndJKcnPkJQuzVOOJK+gj2SoqAJ4KP/xQWVBLXnZehkY68pJGs8J88WQXQll6+uQMpxIgsd5oD7Ghwt1ehIMcpFxNkFDJgqgIF1qoX0LCLClpHfMwJwZSAOzuc7pStjzksnhGmyv0P0YBKk/hW+71pufS9HN1GGhl7owW5rZy5yCRQmVLw095dtUrjlLa8+UpXgiStmeOvcgaUEj+cjp6Faenje/w//IUvPoTgRUUZQpHArvpom7h2m17Oqnj6pOUXjkTAlXrzw6hMrFbDzk4y59TFTDsT5yIX4iOmR/YaL3a3ScTw8+E7I0k4KW2T7gGQnorFp/yykM7hmoPql5eYbwHjT+RBqFjkd1LaPTpRRww6rYJZVl1h1qwzYbe1PrvvcjjmvTWuvNToJXrpkSp776jMSB2KhqEb33mwy+mdTPO4/oSSXTHPaRrmusq6qg1U9pKDUoV22MrYgo/idVEzjj3DFys1ZBe83bP8mp2EXYuKLTXZdT7YDT6Q6NNpeS+MWkb8Hgsf+ml4NW9roOnJoqJbeQ2jQBudt6ASv1YvRildXPHFLjrCoc9c9yeZm5lbovDi2kupODF9yoU/ZUYB2rJOCpwG6U7Kd+wyhe3FOZWYyXUCNKJiAyvuDHRsQ54Hnrt1y4CR4+5f+BfPalrtmfN3lA0Jq2lPzimEAc3WLTv9yV7jwTnw== 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:(13230028)(4636009)(136003)(346002)(39860400002)(376002)(396003)(1800799003)(451199021)(186006)(82310400008)(40470700004)(46966006)(36840700001)(2906002)(83380400001)(47076005)(316002)(82740400003)(2616005)(6666004)(41300700001)(336012)(16526019)(36860700001)(86362001)(426003)(40460700003)(107886003)(5660300002)(26005)(1076003)(8936002)(40480700001)(8676002)(54906003)(966005)(70586007)(70206006)(7636003)(36756003)(356005)(6916009)(478600001)(4326008);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:15:51.6128 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3bab1bd0-d334-400e-24f4-08db9819f8c0 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5823 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org As explained in [1], the forwarding selftests are meant to be run with either physical loopbacks or veth pairs. The interfaces are expected to be specified in a user-provided forwarding.config file or as command line arguments. By default, this file is not present and the tests fail: # make -C tools/testing/selftests TARGETS=net/forwarding run_tests [...] TAP version 13 1..102 # timeout set to 45 # selftests: net/forwarding: bridge_igmp.sh # Command line is not complete. Try option "help" # Failed to create netif not ok 1 selftests: net/forwarding: bridge_igmp.sh # exit=1 [...] Fix by skipping a test if interfaces are not provided either via the configuration file or command line arguments. # make -C tools/testing/selftests TARGETS=net/forwarding run_tests [...] TAP version 13 1..102 # timeout set to 45 # selftests: net/forwarding: bridge_igmp.sh # SKIP: Cannot create interface. Name not specified ok 1 selftests: net/forwarding: bridge_igmp.sh # SKIP [1] tools/testing/selftests/net/forwarding/README Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/856d454e-f83c-20cf-e166-6dc06cbc1543@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/lib.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 9ddb68dd6a08..975fc5168c63 100755 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -225,6 +225,11 @@ create_netif_veth() for ((i = 1; i <= NUM_NETIFS; ++i)); do local j=$((i+1)) + if [ -z ${NETIFS[p$i]} ]; then + echo "SKIP: Cannot create interface. Name not specified" + exit $ksft_skip + fi + ip link show dev ${NETIFS[p$i]} &> /dev/null if [[ $? -ne 0 ]]; then ip link add ${NETIFS[p$i]} type veth \ From patchwork Tue Aug 8 14:14:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346177 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 BE77C171D0 for ; Tue, 8 Aug 2023 15:46:58 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0213B7ABB for ; Tue, 8 Aug 2023 08:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X8+S9cUT6XIEHZgVgJHwEjBsi+TyLlaJWKZj6IlYAjEkJDn6yrUYHjnCJiH8k8O4H9bJK/yzGEKq7aD1oI2HhtwejjZZHBZUYKmDHLngVWVCeOUetzRlctxMYYoHzjuwHt8QGmPhOgr8hWALB5WodSrMCeiUMAPILRcfwYaUkF8tnBjutCSsUf23zvZE9NTcLxlhk6ZjvWaOSUX9TXqHL1fV14Ps2dZk/qrdrG+ABK/xDrMt05/0A3VP6kkEuMa51A5WYvCsqJPQmvYORc3UQlZGbZMPxZU4otZNPVvuCbp3jl8U1GqhtPqgfPNFKBMot9rRw6KdheDuOhGLAlSgDQ== 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=xZmsyxattMjLt/Gppiqx7yvwYdKp47rC94asz9Wwv0Y=; b=jSzqsu5eRU+IlIuE23MMjwvioRTTGn4AmJZ/yyp1PVZ6x5pWhPNadiVrN/fIhDdROndX6PELRRcBAE/llPTAwkA432cpUvQPA+jYectm7FAwH0xHTk2kRkciZC3bSrGCsCeG3OxUHH1+yfn/NTd8+hv7bRuy9xGaBqgfZGHOtiraCISnsla5wPZ1WTgSx2IriHykC7upzeuYrlF5BDDAEwAFcM6r9qUzZRUym02+jyxR8sSsCg8Sn+RPeYyXLH+XnDww6HResrLKWbkHVGbf/ihMBpxawZQMNAAHbJNvZy44uRyTsYGnEQckH1mdhc6lQ0WNEY7xz+e2AVzbTY7u1w== 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 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=xZmsyxattMjLt/Gppiqx7yvwYdKp47rC94asz9Wwv0Y=; b=Uk0Pb7QXpNo3qppiVlRCPI2xOQgqLUmx1vXhAn0m2ptrawpFhonj/O6PAjlJpd8ZGCQHQQfp3M37mP9WYqOpRmxRgZUDv+csoAo/YqwyqzkAN4HVarysJkbn72/gVWK/Igyg3tdWuyXE42V6MxB4MzTdfWHupn+doVWck8A/R8SQiWym2aRkMxMw7Zt6X/OFFrJtLuf/JLWpvReKZGhnXCa4kN1PuOFYj1AYwYKxKvykAl/MBE7vKkctlEQMVvakBx5lEcws01yO2MvDGJ7wf8lACZ4+su25GzVdNd1FSRWIhnA3s/OE4fdxU15bV15JzQ8pCsgL167XCkVqgaIfXw== Received: from BYAPR21CA0015.namprd21.prod.outlook.com (2603:10b6:a03:114::25) by PH7PR12MB8428.namprd12.prod.outlook.com (2603:10b6:510:243::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.33; Tue, 8 Aug 2023 14:15:51 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:a03:114:cafe::82) by BYAPR21CA0015.outlook.office365.com (2603:10b6:a03:114::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.2 via Frontend Transport; Tue, 8 Aug 2023 14:15:51 +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.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:15:51 +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.5; Tue, 8 Aug 2023 07:15:37 -0700 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.986.37; Tue, 8 Aug 2023 07:15:35 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 02/17] selftests: forwarding: Switch off timeout Date: Tue, 8 Aug 2023 17:14:48 +0300 Message-ID: <20230808141503.4060661-3-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EC:EE_|PH7PR12MB8428:EE_ X-MS-Office365-Filtering-Correlation-Id: e088e476-7da1-48e9-48be-08db9819f886 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UzNm+gzoy82MQfQSu5Io2ZfOpG9t7BQ+9KpG0bIQ9pIOqLRqjBsG5wg8ZoEKCqfJyTOGgh/kOjLaSkPn+qOgA3N9lA39o+jm/hcSvdXzGew4Yb4Bco3MN3//63Z6XGRaI9BYNCKgN7SiEpQjeADi4DAvpGmFucnAwZcSTK4YBVvPcwF69cN79pJjooZX3zLrZePgO9EcAQymUHxts9i77ALUu/IW42h+Md8AsmDOPnv0bK4yCyEOf/73APRZPk3tApZixsPjKpsoUv7QCOXeBa+xRcSeS72uss7KcTH7UNYSEhbx7V0cCin/ycWjlccKKz8/dbXg0e2r3QC+JNGaAaGOQNXFFCJeEIBr2Q//dqSP0UcUVzCN2EWFItUZMyK/5Q4e78vverbhiQXqsYW+xbbyBQkVr8V8wYeX0C+2hPiUPZZ3fxzyypQTgXaGVtF5J79hGZpnZnZ6Zt7v20FXAEQHC7D/jC0nWdh3BYEcSVP5tzkUd8B2NzGKqsOcwi3Nl+OE3Iv4wfm1726opPbmMOLSa4hys6S6Si1IEEhttBs0tU8nCKcdB554La1XIKjjRW5l4y0RWMH0gfRdkDF2+D+MeQdVeQRXN8q+UMnO6qAvaz7K6EFPVxqGKqAHRFokoTfezX0UDIl4j/tdCYapgKku/3KtDHws+V3KXAi5OaSUttiGq9DrsrR+8THn14P/IZ9m3eXTkP/tRjBP+WLltuslmzJSDm6dGy3oxtt+HFtD2vWhqttSbhniQk7vlwHQTa9t3TpKSc4E0A2Ke1xN35ZACUqa4Gr0XQA1BD18y3oHKJ4HTNoejeEPG2hJ34doS57EX4/VyYAff6wvN2LEQHs8FVMF/MEwdUfGljEKROA= 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:(13230028)(4636009)(346002)(396003)(136003)(39860400002)(376002)(186006)(90021799007)(451199021)(1800799003)(82310400008)(90011799007)(46966006)(36840700001)(40470700004)(40460700003)(966005)(316002)(86362001)(426003)(83380400001)(47076005)(16526019)(1076003)(26005)(5660300002)(36756003)(2616005)(2906002)(336012)(7636003)(82740400003)(36860700001)(356005)(40480700001)(8936002)(41300700001)(8676002)(107886003)(478600001)(6666004)(54906003)(4326008)(70206006)(6916009)(70586007);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:15:51.3430 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e088e476-7da1-48e9-48be-08db9819f886 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: PH7PR12MB8428 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The default timeout for selftests is 45 seconds, but it is not enough for forwarding selftests which can takes minutes to finish depending on the number of tests cases: # make -C tools/testing/selftests TARGETS=net/forwarding run_tests TAP version 13 1..102 # timeout set to 45 # selftests: net/forwarding: bridge_igmp.sh # TEST: IGMPv2 report 239.10.10.10 [ OK ] # TEST: IGMPv2 leave 239.10.10.10 [ OK ] # TEST: IGMPv3 report 239.10.10.10 is_include [ OK ] # TEST: IGMPv3 report 239.10.10.10 include -> allow [ OK ] # not ok 1 selftests: net/forwarding: bridge_igmp.sh # TIMEOUT 45 seconds Fix by switching off the timeout and setting it to 0. A similar change was done for BPF selftests in commit 6fc5916cc256 ("selftests: bpf: Switch off timeout"). Fixes: 81573b18f26d ("selftests/net/forwarding: add Makefile to install tests") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/8d149f8c-818e-d141-a0ce-a6bae606bc22@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/settings | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/testing/selftests/net/forwarding/settings diff --git a/tools/testing/selftests/net/forwarding/settings b/tools/testing/selftests/net/forwarding/settings new file mode 100644 index 000000000000..e7b9417537fb --- /dev/null +++ b/tools/testing/selftests/net/forwarding/settings @@ -0,0 +1 @@ +timeout=0 From patchwork Tue Aug 8 14:14:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346181 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 141B4174CB for ; Tue, 8 Aug 2023 15:47:03 +0000 (UTC) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2052.outbound.protection.outlook.com [40.107.94.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 305517A91 for ; Tue, 8 Aug 2023 08:46:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XQHCPF5yFhLtW66m6IIRG5Fy0f127gtQ277RWenr9xExRG12iQYmuPEo7SfkZOEXPrHf31sAgoMacGWLL6lcqXDtxkucX0uWbDKEKpk9h6BwgpmG34u8xQD7esf+ktHEExkTWjlGs+kHe9OHXoFGKoZMlbrvTLPAFgJDCiS7NVlCvnOEfofZIUkdyEj+vI9Bs0LEwL+lXAes/yIIIlRIDbIamVJeHyFKifQBNXklCdVQpKF0MQ9Sqw/ukH3lndlOjZKs95SfP1ZJaVyAUB124rasW4qrfUri9vPC1ulhHdQ6THXiJCOjvkqOSHaxbHJoJ+tqpubJFWb3mTKh4RlMuQ== 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=eueLGk0RhrCOosWXR1wN2r8+GscuwDPOVVgs5RLAhu0=; b=WF/rUBLiEZrzABt5tNOhnKsFabgghqPAS/PwK1JNJFZsH8f6dxclTevL03GJajg4Mid9tKn75m7D9tQuYEta0nKzlxc6ghJ8gyeM+fvwlJf7oXI51zVJXYrlOPS01XfYSn+QAdHFe+Z4KzwqmqLogkJNucZ2/rhOLQowrwfvVcqzuAM0HgEImzgEqKX5Lkw1BnjhJvR7V3sJR1nYNeER2ENwgzQ9eH+YYzQUNMxtKz237Yag0itirgiqHVOyIUIgEIrs9Q5gHa0zrGX4+E7xQnaue0jnUaPahjpIBEwR4Sndyr5I2xmZ5yceX0bgR3TgSzlko6ceqdrRH+YOP1aitw== 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 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=eueLGk0RhrCOosWXR1wN2r8+GscuwDPOVVgs5RLAhu0=; b=AJUgNi1h3QSyAOJkAXp/4belBNu8Us3SYfhXoIdWKYqXf7Kkq5Ov4IH69hlx0FabQ0zF62bwndr5v2b3lEElzsUOWvPjlqq6M2nT21L25H4BsQ8aC91rynYoroT0iwb7LHdTV8fsSVL/FV8UgR4iZBlMKkPfrmtw1db+LFHTq2UBVgAmmU8ZeoihfGBmxOuT2Pku9e8fTW0yQFqFxI6hB1kPCZXJmB7TkUuZmfUs5w8gOhwNDMcYkA4yXFpKKuP3gO2F5cOwqAn9pGR0pfIU/cWhTFh95yBPc2RpWVZbQZVBZ80bRomY47tmi52Hz0bUapDCb4RaQjKhaA0ws4PIfQ== Received: from BYAPR21CA0010.namprd21.prod.outlook.com (2603:10b6:a03:114::20) by CH3PR12MB8584.namprd12.prod.outlook.com (2603:10b6:610:164::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.21; Tue, 8 Aug 2023 14:15:56 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:a03:114:cafe::8a) by BYAPR21CA0010.outlook.office365.com (2603:10b6:a03:114::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.3 via Frontend Transport; Tue, 8 Aug 2023 14:15:56 +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.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:15:55 +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.5; Tue, 8 Aug 2023 07:15:40 -0700 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.986.37; Tue, 8 Aug 2023 07:15:38 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 03/17] selftests: forwarding: bridge_mdb: Check iproute2 version Date: Tue, 8 Aug 2023 17:14:49 +0300 Message-ID: <20230808141503.4060661-4-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EC:EE_|CH3PR12MB8584:EE_ X-MS-Office365-Filtering-Correlation-Id: fe887e38-d747-4844-a11e-08db9819fb26 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fgNqWjT8qeiM1TW7qJQOQ7tiKRG71fHBrrZqDFIalbtqO535LyVrQF8os1mmBKC5Pm6YIJ6R5GnYkDfThWbkAE+2mTuPsWHRsmr9TE9uPNZEHJ1b1mV5lGZDN1sHzyTSi/E7SOQ0iYHiVFyaP58EsMmCTu+8DAQgepFXhC4NZM/yxBxxycHeieueIZyZ1MjIxBcfun3rDXVx+V6ULjBNt2DaRLoL0avQUp92yAAtn1K86EKawoYkg8FlScpqLtrLZKXrnd8MMhPCyKYeDOGsD8GTeJqXLg39iqDuGuv2dDIEYH/0sDoD/bhsjAoQDKrT4uG9eSHRaLhBMte0Ke6SYidpfGGEAGv5OgNV7YNWMB06c2lMw+igSwmom4BeEqh01eO3LXD/QzuvHOTGfz/9SDsql/g0or6heN71HSsHf2ILSURFGQpCowlAAN9EOrHzCasGUZIlemRKqfAkDu9bTfZasIaYpH5q88mPi/9VXt9XCZhME6AY7qfXLY+f5RLUNQ+IrD2COoEloWMk5dvML71rE8s7Uxy0QZ4n2cirVbyC7bkPcr5nsyeIzwEoY/s5GlHyQvWnO6pkrsA3BvLCwHge7uJUzbUhpokERSD7vH3blPPyokhsDNQIl93TOOou+lVNN07UwKTIinJ5KprrthEu2Qz2PdfdXkdL5EkETn2IWQF/vzp7nA9D07vcNZfsBTUUgNCq7cOnGuyuQ38jpj33c1Lzyk/jH3CW5kGuTHejMnB+SBK1NePX/4S1aT0dZe3Wg/B1mPYlGlary9E94p7L+zFI0uIgtu1JKB1PEZM= 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:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(82310400008)(1800799003)(186006)(451199021)(46966006)(36840700001)(40470700004)(83380400001)(426003)(47076005)(36860700001)(2616005)(40460700003)(7636003)(40480700001)(6916009)(54906003)(356005)(8676002)(70206006)(5660300002)(316002)(8936002)(4326008)(336012)(70586007)(16526019)(478600001)(82740400003)(966005)(6666004)(86362001)(2906002)(41300700001)(1076003)(26005)(107886003)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:15:55.7493 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fe887e38-d747-4844-a11e-08db9819fb26 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: CH3PR12MB8584 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The selftest relies on iproute2 changes present in version 6.3, but the test does not check for it, resulting in error: # ./bridge_mdb.sh INFO: # Host entries configuration tests TEST: Common host entries configuration tests (IPv4) [FAIL] Managed to add IPv4 host entry with a filter mode TEST: Common host entries configuration tests (IPv6) [FAIL] Managed to add IPv6 host entry with a filter mode TEST: Common host entries configuration tests (L2) [FAIL] Managed to add L2 host entry with a filter mode INFO: # Port group entries configuration tests - (*, G) Command "replace" is unknown, try "bridge mdb help". [...] Fix by skipping the test if iproute2 is too old. Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/6b04b2ba-2372-6f6b-3ac8-b7cba1cfae83@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/bridge_mdb.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh index ae3f9462a2b6..6f830b5f03c9 100755 --- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh +++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh @@ -1206,6 +1206,11 @@ ctrl_test() ctrl_mldv2_is_in_test } +if ! bridge mdb help 2>&1 | grep -q "replace"; then + echo "SKIP: iproute2 too old, missing bridge mdb replace support" + exit $ksft_skip +fi + trap cleanup EXIT setup_prepare From patchwork Tue Aug 8 14:14:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346175 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 A156714265 for ; Tue, 8 Aug 2023 15:46:55 +0000 (UTC) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2042.outbound.protection.outlook.com [40.107.243.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F1B035AD for ; Tue, 8 Aug 2023 08:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ibXc9JHnsZqcW5LKYU75zWhQ1XYVET4QC1dWGoZHiK6QV9voTG6QlicM8L0lfSdmSCPMxClE92jTzfGq40SQg242y+sXrX2+NMMTuDRQVJEy0W0dI3hhZir0070CovVzLQlX+caF6YQuG7sVU7RPlfzqRKnx03yRJ7QHuvTc46FlPqo+EIAuN0FoxGsug2Nv2kBkNe+4floB+Rt0ofDpacevia1Xe7DCN5SXQxICC/wrZlMANdU2478X/9jEd7+GfPMCie3wTHLZJO3K5muNZqGkfsZlXEziKnzLPGinECL8nlfAjWsq1tcGteQ2YYGqASZeVi+HILX6SL5AtPBsvA== 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=wSbpzq4rsPNvwX0AHf/LP+kveatQZloXX4+2cqcZ1Rs=; b=fIJrAIDP6TL4Cq+JpKcZU/TyDhydZL5e2gIzncYPtrl2NM9ysKhwe2oEy+0hlXFDDTEGW3sZnIaifBavM9rk3hM3YApiY3JSH/ZOKOAoU3XU/XmMerLT2AdhrtbmbvXc3E6j18w2QFNH0ikQoldtuUWcIrooygrxCHvZZnDBKlM0eAkzTEzNTjsh8Hu9WtFfW3augWRnQSmLANLibKYnzzu/AvuZIGxc9fbs3koKK27wJkHSRbHFHtQ/pJv0DUySiMPPlEYCRtdWuhA+U0Y4EQAHMBWoEZU8CNoSxlTJcRamx2fM+vncM5z0Ws/U5ciUFz00XtdEwnbA2DIaObUl3Q== 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 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=wSbpzq4rsPNvwX0AHf/LP+kveatQZloXX4+2cqcZ1Rs=; b=hmTaB4774WaMMPDON2zt5uz5E2/6LfvK/wEuk91An50IJpDf31VRhAZrwO1FyJpz4kWdwGG+lGWAhQ/otE3B5weu1IKmLfTxsonFq+G0pVnk0ESxdqPk5HZEQ9GUScDeHgI3mh+MXwkJmkpzqnf2wFmY3QH4fsjjal8N3/G3lwBneUyFl++LjHgM/CW3q0d6d4LI+tAQHczrMBnHfFdfGbP+iBvKGgXWevYSKGp20peh9jCPfACBzKnaCXZEnWIHETU5px7LuuZAoFhfL71kK+/TWpJMYR0PH3wOlhlm5XsNDV/23BO6/7/juZ5D65Yai7nwpNmXKUfxu/sn/3HyUw== Received: from MW4PR04CA0042.namprd04.prod.outlook.com (2603:10b6:303:6a::17) by DS0PR12MB9446.namprd12.prod.outlook.com (2603:10b6:8:192::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:16:00 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:6a:cafe::da) by MW4PR04CA0042.outlook.office365.com (2603:10b6:303:6a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:00 +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 CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.0 via Frontend Transport; Tue, 8 Aug 2023 14:16:00 +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.5; Tue, 8 Aug 2023 07:15:43 -0700 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.986.37; Tue, 8 Aug 2023 07:15:40 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 04/17] selftests: forwarding: bridge_mdb_max: Check iproute2 version Date: Tue, 8 Aug 2023 17:14:50 +0300 Message-ID: <20230808141503.4060661-5-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FD:EE_|DS0PR12MB9446:EE_ X-MS-Office365-Filtering-Correlation-Id: 8425c016-c589-4ef8-8589-08db9819fe11 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jscUos0di+QxSurQjxVSdEBT8xuY2mfvXeVVgqLNVY4PZjXXHViZod3dGteQAExrCc64f1WRdCVuxpq9syg6nPPrHUgqUDpPCpOpWEZY8tOI4ag9+fThXIbw0leGdh8c9OlWqp/7NXZGeo+B3WllRxw3TYeLyunNlXHhLaT5ArrY9H7EBp/xH7Q/MgTzIQvPyyq3IWFFFV8WwG8+Kur5S44ZfvVU10AeCBS92Cv1d2ArKlsxzjBBdibIsFPcEnj0k2X1CyDJARQBjV23a6lxWrjBOEfoUALwtK4ls1Iv/T0ZOuidpG2xjymTIfdH3gRDLhpq5zMRf26Kz5LgIK2CYfMmon+oa12a8t+2bdtdwNyvDeUZALH2bRpxHkreJo9G4HnU5L6zgPacSNmyGU92y2iV+43rE/kR7kfX43MWUKjDko/gP4EQ/bQxNcifMHrd7Q+oigxUnwfmXewaK0SumUW3gHny2ELhURM43wkct1M/rVqo6vXK7klvfovSvV7sjiV/mMemUuMJ2z/n0kNCVqFc/uvEUFNkxGnWeClUUWTBSCcuWWOuScHfxRTjGiz5TqP9u+UQAlh5VXIJM/XafTsiYjcWAdwWdof8ovD2Q+OWsH4ecg+d5x6dT8fmBhGTAukctWiYXkhnH9p3NsYDdevmm4HBAkGNVKHbQfS/aE9hHH8pmjpaZcopFSrlVPHeGdrixGs43///yK9ILn/Rzw2CmyQ716q8qydxsKqJTRfYpg8RBFIcXfhNMnN7tJ+p/CCS5xW2okgp4VSe45aoQpN9uFbz+EdYlkp1m0auHjs= 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:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(186006)(1800799003)(82310400008)(451199021)(46966006)(36840700001)(40470700004)(2616005)(107886003)(1076003)(26005)(16526019)(36756003)(336012)(966005)(6666004)(82740400003)(478600001)(7636003)(356005)(54906003)(70586007)(70206006)(6916009)(4326008)(426003)(41300700001)(316002)(8936002)(8676002)(5660300002)(40460700003)(2906002)(36860700001)(83380400001)(47076005)(86362001)(40480700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:00.6128 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8425c016-c589-4ef8-8589-08db9819fe11 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9446 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The selftest relies on iproute2 changes present in version 6.3, but the test does not check for it, resulting in errors: # ./bridge_mdb_max.sh INFO: 802.1d tests TEST: cfg4: port: ngroups reporting [FAIL] Number of groups was null, now is null, but 5 expected TEST: ctl4: port: ngroups reporting [FAIL] Number of groups was null, now is null, but 5 expected TEST: cfg6: port: ngroups reporting [FAIL] Number of groups was null, now is null, but 5 expected [...] Fix by skipping the test if iproute2 is too old. Fixes: 3446dcd7df05 ("selftests: forwarding: bridge_mdb_max: Add a new selftest") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/6b04b2ba-2372-6f6b-3ac8-b7cba1cfae83@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/bridge_mdb_max.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh index ae255b662ba3..fa762b716288 100755 --- a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh +++ b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh @@ -1328,6 +1328,11 @@ test_8021qvs() switch_destroy } +if ! bridge link help 2>&1 | grep -q "mcast_max_groups"; then + echo "SKIP: iproute2 too old, missing bridge \"mcast_max_groups\" support" + exit $ksft_skip +fi + trap cleanup EXIT setup_prepare From patchwork Tue Aug 8 14:14:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346180 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 E24C51775D for ; Tue, 8 Aug 2023 15:47:01 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2046.outbound.protection.outlook.com [40.107.220.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4D8A7D87 for ; Tue, 8 Aug 2023 08:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xem2gC/N+F0I55eyC/OfZGMNkucuJG2RUET4sfgXJWBEIkbnye5VVU6nXJ+8VZKQ0hR0OuqhimdmPzCfl5wA5d20ioawGNzCs6OB7Ra1iEdh+LdiR+guMqT2cRgI5nQpudB+m1Ry2NaWyYf2Ty0G9VYWiY735YViQ/VBlJGqJX/bXBLKRPrHcuxuJg42H+68ayGyYV14Zz7kX56wH72kuKfzZRogRJFdlOdkpnir6sF4tf3HPrseWyJjaK0Dih4Nm2gzzbhXig3RMYALaU9EFx3bHIQY6uTJnzbhRTcAHAPVxpauHmy94qRUqEoLWyRSPMZ1McgbE+sa7kKLWlTmOw== 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=xoMH7/T/+FkOW7OBEITpo7Jk2nnS/EDOloQLZqEulg0=; b=CYC/Ztc4NGGp0K9OhAJhvhBWFUJfn7QjifnDlWeHcCp9hfkmLInolWMVB3cXjZE54lbhxHkyEeO15sY+r6cPuZXfbjzgxggeBaEl2UOGn51U1sWYZJx67+S54FVRF+lgT64soZWCWTG07wdlEb83IZt3uOPliWfviV9ydx3t5mAzga4+RICM16u1IHcNwRtpTvKOQSlUCRsdbka9MLVLMin6KmCnvtZRyIMaCOcKpj7e3ptkQ+bc7AuEYiz/GxxthxUlFGW7wgcF4SJCs4fY2+ZWDzI18M9Efsy1rEQgo2iw+USppw7cwYxnhxWSDIAhs8QvTZ50lATxVZvaaOVnFA== 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 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=xoMH7/T/+FkOW7OBEITpo7Jk2nnS/EDOloQLZqEulg0=; b=cPmIwBJIYs59yMVtrAAwqTW/Fs/+SczdWJmd8JpFdrU3klGDtBdMmGmKnYMvtLZhSIZtBDHeMgDVV4h8jict6SmBOnN63+YhN4/wcH/0W7qVr1CokBWJKgxxIY6IufVoNzM6qbatvprY70WxdCeAmA7veQiomiLp5PkzXCxNzYn5z0zS3T9xyxRfOCtT+UxzABGMayw0oZPGpFeP+q+WbUH1Wm++A1dZq7Jvq7lkvK6FCDmKj+J5pwh0oIKG8STcX4e7AcNzD3HuyAEz3OUuQT0d7Tf9vWGAxslSwOIVBbwxNwQWCFUwxlM9D4vNoosEwSWAMORWsxp/S1iLGkkoHw== Received: from MW4PR04CA0045.namprd04.prod.outlook.com (2603:10b6:303:6a::20) by MN0PR12MB5859.namprd12.prod.outlook.com (2603:10b6:208:37a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Tue, 8 Aug 2023 14:16:03 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:6a:cafe::5) by MW4PR04CA0045.outlook.office365.com (2603:10b6:303:6a::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:03 +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 CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.0 via Frontend Transport; Tue, 8 Aug 2023 14:16:03 +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.5; Tue, 8 Aug 2023 07:15:46 -0700 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.986.37; Tue, 8 Aug 2023 07:15:43 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net v2 05/17] selftests: forwarding: Set default IPv6 traceroute utility Date: Tue, 8 Aug 2023 17:14:51 +0300 Message-ID: <20230808141503.4060661-6-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FD:EE_|MN0PR12MB5859:EE_ X-MS-Office365-Filtering-Correlation-Id: c365bda2-aeaf-413b-3989-08db9819ff8a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IJ3UFBzkWY9SiVbzvVuRg1UXqv4++/48+6KnZKkPz2whPIDE4HgfRnbh46M1czVeB/AeQ+Sv8JC7VuE1SSWjVcaKGBf7eBgLrLKaV11xcdDkBiH6RMt3fBWu/xhVSVCRTzRNOjdw6nsA8sT2eliHZ4ofNxDyoFJZpSRADROBRfZUORcuBj0Y9SMNRdQfG2jWnuA0x/U1GkcfDXnAAp9dc1QcCXmtjFntw4iSFuD6wgTRwcc89XxxBiWtUVphRVClB09osqjXJROBj7MtXYEGVL5193qxhz4ORlpw91AKVEnjBenNHtn5JTB1heyjpXTwp+i7vqU8k4QLfrNijJSrSmvmakTKGwIJV2YtCdzfYjQc55Vx+ywJTjZ3upiIVzozlo6GmkKXIxijJYF5mjlQxOZFIhyasQGBIyUK3zIjsVGgcZNdL967eXlNrwAQ+9fDpP00Tf3t0hXh83YEWKiQvwZu7I/VBbtirbEOKD3ijc/qCGgq2sAjYd4fr4Vr15Li+Q/W4bRCKfQBka66lTSLE3eYchfxphXxy+pYouMiLJzKg68bv0IfFuw+q2JdW9YwaDRXCKYNXy51LlmDXohSBtfXeoqD4yHi1ra6lhEQy5PGyEP6McBAH1J7OolWM4A+5gxEFaRCUHEMVC2sWuJYChG8gq69B15nLluRLc2vBWNeT6z3WxtQOkH7GRP4DzcycG2RUt1y7CYYbWe6vf3Hg79U8pc4HRiNd0FghvfGTE5+Gl95aGKpverf1tt2j0hYkYMCPd7RjkFSFsevXp7Lig== 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:(13230028)(4636009)(136003)(376002)(346002)(39860400002)(396003)(451199021)(186006)(1800799003)(82310400008)(46966006)(36840700001)(40470700004)(7636003)(40480700001)(2616005)(40460700003)(82740400003)(86362001)(478600001)(356005)(26005)(1076003)(36756003)(41300700001)(966005)(5660300002)(316002)(8676002)(4326008)(6916009)(70586007)(16526019)(70206006)(54906003)(2906002)(336012)(8936002)(6666004)(83380400001)(47076005)(36860700001)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:03.0972 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c365bda2-aeaf-413b-3989-08db9819ff8a 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5859 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The test uses the 'TROUTE6' environment variable to encode the name of the IPv6 traceroute utility. By default (without a configuration file), this variable is not set, resulting in failures: # ./ip6_forward_instats_vrf.sh TEST: ping6 [ OK ] TEST: Ip6InTooBigErrors [ OK ] TEST: Ip6InHdrErrors [FAIL] TEST: Ip6InAddrErrors [ OK ] TEST: Ip6InDiscards [ OK ] Fix by setting a default utility name and skip the test if the utility is not present. Fixes: 0857d6f8c759 ("ipv6: When forwarding count rx stats on the orig netdev") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- Cc: ssuryaextr@gmail.com --- .../testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh | 2 ++ tools/testing/selftests/net/forwarding/lib.sh | 1 + 2 files changed, 3 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh b/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh index 9f5b3e2e5e95..49fa94b53a1c 100755 --- a/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh +++ b/tools/testing/selftests/net/forwarding/ip6_forward_instats_vrf.sh @@ -14,6 +14,8 @@ ALL_TESTS=" NUM_NETIFS=4 source lib.sh +require_command $TROUTE6 + h1_create() { simple_if_init $h1 2001:1:1::2/64 diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 975fc5168c63..40a8c1541b7f 100755 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -30,6 +30,7 @@ REQUIRE_MZ=${REQUIRE_MZ:=yes} REQUIRE_MTOOLS=${REQUIRE_MTOOLS:=no} STABLE_MAC_ADDRS=${STABLE_MAC_ADDRS:=no} TCPDUMP_EXTRA_FLAGS=${TCPDUMP_EXTRA_FLAGS:=} +TROUTE6=${TROUTE6:=traceroute6} relative_path="${BASH_SOURCE%/*}" if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then From patchwork Tue Aug 8 14:14:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346140 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 9851412B83 for ; Tue, 8 Aug 2023 15:36:49 +0000 (UTC) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2077.outbound.protection.outlook.com [40.107.94.77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B4359E for ; Tue, 8 Aug 2023 08:36:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oQfpDV5s22OBtUdQqFs22LLmOO0SicuJWAAkxK08cws2yT5NC+v5IGq1Tksw7nXPDjW5rXb7DfL/7tWfXxkhdfTfe1KmS+QVYzjieqt1HpoxBjld80mGBJcSF1Hp1VDbQHP6paU/MW9N6UFEuktOtp3jPf/YKUZlaEziL8sIh+tq1FWkCMN6xY0kuH/+FIrCm3dt6A3coAiPXiU4ce9/Cs5K8553vpo/tKBKxeI24WgHFp+wx4ibbIEBZF21XYh83U6jscWZGLtJycXidaHJbKfgDvw3wZiZrudd2134wiu7e+ezCQeET9MpxBKE2N0pOhM9fu+fu+pIR9jKS9WFww== 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=gBBW/2jnpCdTZuwapZKaTHWc/uOD79xYDSWGRWCJ5Ys=; b=QFs/CWchce3mtTdZw58ZW3PnukqVTeM4eO0xQB8gn0d4CD67FTBQsVgGDVFgGxoMBRn73mA4ma+B1lrm825ORfbQiyRB4dZZ+ag0mrw8nlOUR1nsn+sU2+uAPIHLuEpYRqi5wiNo+69CijLmCQX00YhorsQ1yWsJf60tRg5YWwFF27dheg6Zm+7EGAJxYqFxRBjdPLNrw9hfjAQXfz6S0FSbv6+YZvQKLxquGe+7Pc0Ul9kTK8NiGIrO+NCmhH6ls5CpnKL3z2OZbqC9zOEoSJ1EzpNNJRcaTNrVZCNiSqKqwJSVqvvgxaMU/T3pijT2GmB7SYw5D0D/wBiclYfsNg== 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 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=gBBW/2jnpCdTZuwapZKaTHWc/uOD79xYDSWGRWCJ5Ys=; b=nxDJtIGuPqIVaU+DTlE+XncZWv2kiacilQA+wGHjvBFUuGrvaxOGIexApYwHV46HW2nlMoLdk+dqIpdSN2sopfF3bfHDtnF8yxjpQDxh2+b9kliz7DvDz8OMo8lhmwjouTkUH4UoGuuqckad1uB4rRGvClvPE3+87V19sdUfYcGDSAZbf5XEuE/iroErRxUX5DX2wKRFIJiTdfT1+tFdiSMkKPVZ3p1+zF/0Kk6HxDlDUTztoBRgkBzLXnUQtWbzVSNrhyXISf1OO7/3uURkWDfOG3KGtx7Ye4Nfpv+LAmjoa4UeYelQyPOs6xOfoaqy61pCRZsLs9urJslzvNFpfw== Received: from BYAPR21CA0023.namprd21.prod.outlook.com (2603:10b6:a03:114::33) by SJ2PR12MB8650.namprd12.prod.outlook.com (2603:10b6:a03:544::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Tue, 8 Aug 2023 14:16:05 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:a03:114:cafe::a7) by BYAPR21CA0023.outlook.office365.com (2603:10b6:a03:114::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.8 via Frontend Transport; Tue, 8 Aug 2023 14:16:05 +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.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:05 +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.5; Tue, 8 Aug 2023 07:15:49 -0700 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.986.37; Tue, 8 Aug 2023 07:15:46 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs Date: Tue, 8 Aug 2023 17:14:52 +0300 Message-ID: <20230808141503.4060661-7-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EC:EE_|SJ2PR12MB8650:EE_ X-MS-Office365-Filtering-Correlation-Id: 5dcbb19d-35be-420e-12c9-08db981a00c9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oaIEgwq5g4B2TfHFg9zy3eUfXfCzDYioXoNyOtWTXpBkI/u1xQgV48DAXKK8AAUXesqNgxSLp+ImGHkvEG8kxcYOW6zvU6o0r5d2i6OhK6NbcSg45Eka53ALDJ6zV641xUN3f952z9NqdUj2PENieIr2S1xk6oafEmya+N+2fZmeREQ6UrFf/obLwWUZyyBZC4ql4WMYqXvkScdYbwGLjN1czWLTYUYEWiPmgsX1Fo82bmVBDo9VMipEX5/GyeamIZaqoVq7bqr8NsU8j4YYQpNJ4sREejsFUmYmdTKovoQ/WNnlyNmByLdorZ+ROBaSVuVAxV4HJ8gX8NTs9GHHYqciCaow+zH+K6qv/B/9j7jsv4z/pgL4K5FuWYaBDRRkSxU+GayjnWT6eOoBVedb20n428x/1oGr1sSgYJSEnPfXSeAeYBursyAQHqw66oYdbBWUN40hFTG3i+Adovdt+ZYXpvKLuNCLswZyc4maV7sXscOmrmgNBPev4WPA1RHac7ISJLb7soswapaaVgIgCU917bWKhxQ3mTsg/xww96evKEY86wUnk/WjVuRefM+asmdDyldyKlYooYIejQFh9DMhE0NPoWcZ1kzTX6VOBa+83zyPCYAjArVXi2uyEm8foxFgdoEWAe6HKPw6jHeSFpHAqY7+Uu+ztTGV+pQrWFhGXZhylnPeUY48JTHXNc8VlddLefr+7gQy7Eet87qQp+ook0MD9OPUHp6U3xKLuWSV7Xk3yI6gMxtcEMHua9BaegrzPbyFa5eTgchWe3nIxmgzx4xXePph1TcBlgvveaeZHpzfveqxb5i4vbWW0JDt 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:(13230028)(4636009)(346002)(396003)(136003)(39860400002)(376002)(186006)(90021799007)(451199021)(1800799003)(82310400008)(90011799007)(46966006)(36840700001)(40470700004)(40460700003)(316002)(86362001)(426003)(83380400001)(47076005)(16526019)(1076003)(26005)(5660300002)(36756003)(2616005)(2906002)(336012)(7636003)(82740400003)(36860700001)(356005)(40480700001)(8936002)(41300700001)(8676002)(107886003)(478600001)(6666004)(54906003)(4326008)(70206006)(6916009)(70586007);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:05.1868 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5dcbb19d-35be-420e-12c9-08db981a00c9 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: SJ2PR12MB8650 X-Spam-Status: No, score=0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org A handful of tests require physical loopbacks to be used instead of veth pairs. Add a helper that these tests will invoke in order to be skipped when executed with veth pairs. Fixes: 64916b57c0b1 ("selftests: forwarding: Add speed and auto-negotiation test") Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/lib.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 40a8c1541b7f..f69015bf2dea 100755 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -164,6 +164,17 @@ check_port_mab_support() fi } +skip_on_veth() +{ + local kind=$(ip -j -d link show dev ${NETIFS[p1]} | + jq -r '.[].linkinfo.info_kind') + + if [[ $kind == veth ]]; then + echo "SKIP: Test cannot be run with veth pairs" + exit $ksft_skip + fi +} + if [[ "$(id -u)" -ne 0 ]]; then echo "SKIP: need root privileges" exit $ksft_skip From patchwork Tue Aug 8 14:14:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346178 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 0198D14278 for ; Tue, 8 Aug 2023 15:47:00 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2042.outbound.protection.outlook.com [40.107.220.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DBAF7D83 for ; Tue, 8 Aug 2023 08:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X29VUzxwTPPE4KuBGRzgOSSIwQa25GCAHoH+irvrp+jKjRnOBzVLg+DH+Jypj6aB+ZjOxzaeJb0sifwsqIT6dBBZbeLNRN5xfOG67lrPKKSGyAgFGqg7JqyxTWo9ZFQWFUxbmAiwTakkg1M6+iE0H0incq2Zr+5OWjFHwpr6ljn6hrUdNJ9t9WZP7AhrRIXYRgl+k98C0nQWt67eu8YSYVp1qnGyLbMqBB9zmYsy+QnAJIJsqTL+6m0R0HPnIZvAwle2/kP6sZTjZH8a36+htRzwRGynwSMjv7ZHc+v3xTDpxyrj/ArZC9VvsOJQnr/OQv/J/8WgQxK6+dq6ho3lRA== 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=FMj/epV3tCNjfYQ8wYwqVCOsGSb+mKS/0AyZduT/v+A=; b=A+fmVcEyXg767VmHNNAGOEh5quNtDtPEws4g8hQ6hHFtivKd3euLqpcKHjeQToTJpoE9lwn3s0QFahIzufcualPqdJQr9uFTWSw0uDgV/mZ7f80EvZvRbS8cejh2fD/ZQ3Wf/6br22Hm7zOGp8Y83kgOXgLMWh5aVgl9MiKiUcvWuiWStbD46f5gDR75jJ6JUcwFYptM3G2b7EdHFkAeuuPuNWAk2iI8eb6KN/ZocxMmxLpFijf5Fgh4zptqNoqSnTHX1QQpBGr2za9y2YzYI2/SvWgY/iB4uB8drlz59C3+fXmo0cOPJs/JS8pyQf93qgulzZwIqAbZCNPrTa1F2w== 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 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=FMj/epV3tCNjfYQ8wYwqVCOsGSb+mKS/0AyZduT/v+A=; b=PYUm+sJCBKvDR72OqTSzcbqL3go+m5C09mrWyVGzcHXX91p9kz+hODr0QgLaWOxA45OiPEJ5qHkNAEKVDedTdnUzdkrx08FYw3VsoCJ4tXk18XyFLQOaBuWI5HSwAGbGMCuQ/8y38yQlOhjZjpq6/3dUQNwHcPN1JHAoKBNdOEq477qUzLMsFfpa+IMpZlX2dlxcm1TNbYZZHTSsktbrzhZoOjfc2+qgOIglrl/59mORao5eDGamqFjM+7aL4O9rv2HBtbtx037O/uftxOz9GJ9UjWVdNhtXSyPIu31P+TUXtN7afxhCJN8no1uyBJm0Hv757uOjj5L7BaXyQh0tSw== Received: from MW4PR04CA0343.namprd04.prod.outlook.com (2603:10b6:303:8a::18) by PH7PR12MB8777.namprd12.prod.outlook.com (2603:10b6:510:26b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Tue, 8 Aug 2023 14:16:07 +0000 Received: from MWH0EPF000989E8.namprd02.prod.outlook.com (2603:10b6:303:8a:cafe::87) by MW4PR04CA0343.outlook.office365.com (2603:10b6:303:8a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:06 +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 MWH0EPF000989E8.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:06 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 8 Aug 2023 07:15:52 -0700 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.986.37; Tue, 8 Aug 2023 07:15:49 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 07/17] selftests: forwarding: ethtool: Skip when using veth pairs Date: Tue, 8 Aug 2023 17:14:53 +0300 Message-ID: <20230808141503.4060661-8-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E8:EE_|PH7PR12MB8777:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f670f96-d107-4785-43b5-08db981a01ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C6HtctMaBIv07VJEcwS8twXjs12p5TuFa4Gtz8sbCEyUPZyZnaIuyqJhVkarMTpSyS0nzjpxIcToHxn2eQjU20GNvqYVw4w7AIh3nJybYL9MYZVY5SgWGrP2+Ir4g+wlgMRN7gj5kaX9AMvpOB3xLWb7YFJPS81gzz28z8x6pJ8l27VtP39ufRM+rj8A6BgHX40GdroYMaOL9BGojClI3nzIJtNjxMdp2AdktkbS2OZLdqRZuvX2Kz5AYQkXCc/6PGr/YoPtkU0WDOg9YkiX2nyuad1R8FxXNNq0lUEtoqXtzk4c49qKjcJZooETMSx4iBX4Rj+C9yUnAvYdBkG4tltIm+fcAIggJ4ZYDwCPiwxl2RZFDUwWvBLHTUZxzTD9qZKUCUjzZwjn42SVBmLOv//d8tD1rNi6z+eiugdRfo3G5jaC+6OREkd5VrMdhzhqqlBIUA+rK2RT4Bb1jqe5dKwet7Tzm3jvuCZg/cJYe9Qi92lM9cFQa7SbOKaHQPGO/KZ+gbNAB7npmfodBQzXo/5TRmJc3+5NeREYPKjNgVZToR00hasIQVse/dVqWqe2aaiQuyWXzoX75ldOP91QIt9y74tphZE2t4bLln3utXu+PNuOM9/u4+ZxEzBHz3xx25q9v60olcNMV7kbW+XMkM5GGAYGv6lBJNwNJVRyCpK1w4kRH8WpAjCEoiNtiwjeqfKrrMGqu6k2Z46oY73KQdtFeYjlRhWz4WJlRrbzZL7vrkmOqHTSzzcg06quIs55R3GPRs9VL52udlRCDVgzgg== 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:(13230028)(4636009)(346002)(376002)(136003)(39860400002)(396003)(1800799003)(186006)(82310400008)(451199021)(46966006)(36840700001)(40470700004)(426003)(26005)(1076003)(107886003)(83380400001)(2906002)(5660300002)(8676002)(36860700001)(8936002)(47076005)(41300700001)(16526019)(40460700003)(2616005)(40480700001)(336012)(6916009)(86362001)(356005)(7636003)(54906003)(316002)(82740400003)(6666004)(70586007)(70206006)(478600001)(966005)(4326008)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:06.6692 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f670f96-d107-4785-43b5-08db981a01ab 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: MWH0EPF000989E8.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB8777 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Auto-negotiation cannot be tested with veth pairs, resulting in failures: # ./ethtool.sh TEST: force of same speed autoneg off [FAIL] error in configuration. swp1 speed Not autoneg off [...] Fix by skipping the test when used with veth pairs. Fixes: 64916b57c0b1 ("selftests: forwarding: Add speed and auto-negotiation test") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/ethtool.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/ethtool.sh b/tools/testing/selftests/net/forwarding/ethtool.sh index dbb9fcf759e0..aa2eafb7b243 100755 --- a/tools/testing/selftests/net/forwarding/ethtool.sh +++ b/tools/testing/selftests/net/forwarding/ethtool.sh @@ -286,6 +286,8 @@ different_speeds_autoneg_on() ethtool -s $h1 autoneg on } +skip_on_veth + trap cleanup EXIT setup_prepare From patchwork Tue Aug 8 14:14:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346179 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 46DD8174D1 for ; Tue, 8 Aug 2023 15:47:01 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061.outbound.protection.outlook.com [40.107.223.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80D267D84 for ; Tue, 8 Aug 2023 08:46:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cYtH/sBr++9aY/SO2cxu7SZZ2r6O+iKwxJvSW1mRGriuPKGxC7gKgOT3KUaGiEOlkHTVvVWGyVqGY62HHWI66cbzw35zaTUn11JPXQie2t0gp3H8OHoaBhek6/0IxR+DfUDPpJ3mf+Byi0iNSkN4RvFj7CUNLG334VmsPdtUO08lSnwXgYbthAfIBxLEtsMBi37FahNoAoL4SmIZJgEgjeNsBd+B65nM/OKhf3WOxKXJ6zIsh+mUFd3TI2x4tEV23VBZNeHxbjd442B0CBq2PrBy5U+m7Js9/axQuC6TCUDLhoI825wYy8WwrgUHJi02ZxrwGtrVEjyhjOEcrbUB5Q== 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=2T14pdwEM56X5jmGyMKQ9/XX8CofFLtbZuZEKCIilrs=; b=WlhUGmgoXisXpqmInlKxGwxxOXABurn4s75iv9FiVlUfk5NOTfT9L77meBqioFs9rYqAzIpsI3TdAAZqwAHVHtUhFMGpyBdXVs95NY8sWBTXfHyxpbOUOP0jHjkQqGWSJy7Faa60AOnPEUw18p1DR283VmQzV87+ZUzsMmYc+i893TjichDlj39sfBjt1xWyPIPcBEGIiuf2tqrwKLTvzuxUtP+pS+HJxLhKQyHd3a2l9cHcZonD3RNr2WRw3ezOKHKN112L8KbUtXRd76brVyGXAWd2nD+jvWltsXuE06qV3uBQM3GiHAb7WBEFyzmWp8rtO2cpy5Dkm0lWz2YEfA== 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 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=2T14pdwEM56X5jmGyMKQ9/XX8CofFLtbZuZEKCIilrs=; b=oaRbShrCo+4RUFX+deaZo/GtwviwpJARAkNS1+Xcd334mr+VnU4KdPzcJ/LA/ldUX4QG7KacY4OxeLBHtNRJk0BBGYqNIcMaOHkA74RbEJwHjFThKVxRjJcZimRUXPnPEoLc7d4h1J7cUfYxKORLupWzUfAqNw5KPMfxq2AuQKAIRGO6g04Hsmu0dHwfVQ4aN3A7IEanQY8PBab8vb0AP7hDC+7xLEaxSqFBFP4PbrpuNRzT2OlG6KBXm/7FaTwAtFiKTE/SxizEoGKxcurzcv8/Mv+ln1sIt8VBFu+w8vh/YLDRKD5KHVejvc0dx3oG40gQl42t8z/NobRNR+tf1w== Received: from MW4PR04CA0327.namprd04.prod.outlook.com (2603:10b6:303:82::32) by SA0PR12MB4429.namprd12.prod.outlook.com (2603:10b6:806:73::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:16:09 +0000 Received: from MWH0EPF000989E9.namprd02.prod.outlook.com (2603:10b6:303:82:cafe::b7) by MW4PR04CA0327.outlook.office365.com (2603:10b6:303:82::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:08 +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 MWH0EPF000989E9.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:08 +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.5; Tue, 8 Aug 2023 07:15:55 -0700 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.986.37; Tue, 8 Aug 2023 07:15:52 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 08/17] selftests: forwarding: ethtool_extended_state: Skip when using veth pairs Date: Tue, 8 Aug 2023 17:14:54 +0300 Message-ID: <20230808141503.4060661-9-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E9:EE_|SA0PR12MB4429:EE_ X-MS-Office365-Filtering-Correlation-Id: 7da0fedd-dc32-499e-1b6c-08db981a02d7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yjuAUNEW0Gyj/qJucOa2KS+pcjME+621QiSCH8ZUvYg8WGPEmm8bLMW9N9edQGcPimr11y3LIiAluwOZjRUSzMHfDVey6medESunMfTBROsxoLYQdrk8phcaklEEKryhPb1E7k4vmauMu71GvVF6Vx1zx2gOuUu0FQJnGEPE/RELg3oLxlqDptq/+/C0pUr6B0jBmhJ/Pi/E+LKfSPum3LvI/XPwcz3HzBHTeva6zZ37TuEzpYIfHiTqXWMQY8fDEOtPzx5BDcDi6bExzocnX+SFZEajQ6aqBiAW2rbEIL9xovlAPKmGrDwyUMOBIzgzmkdCBt9jhz3BxOjA0lWnnmNbE5/Tm6NmY1GnFPHCoNH61IXiD0fVqejy2BP0iuBBBIWe3uBWKhxTPwcFrfln7GxQ24s/buWNZHptzZvY0Qk79gBJQSNDJZBqLgPd91AUckOVBkn1mwHE/q0DTkUjP7TBadTZ8169IU5km0CvCzioMs7/wYKQr3CVohrcE62LgsWHVxjNwg2x0tZm/b2EmCSAyBXdePEA5UZVN7B9SnNUsTVYnm4M/VRFGdsTDX3uS8ZgmJJRwaLNOcPyL8fHUZGcvgTpJ761mxOGtvNyEjD+Bdbzde9BtT2o3E5YwVrB7B7mMwyeEOYHadCcCySM/BvCUS648BDKySw0fgtkJLSuiJNEzktRP7FyFqdXWE3zugPGOlN3j6vG4/KvWcYFmvpuLPc1UAiHiYITyjnIq8A92O4Bd4X+Vln64RTAWTE18KbH8cUefGJ+6+ZCx/AUgt+hI5u4qQUw34ni1vpLQZY= 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:(13230028)(4636009)(396003)(376002)(136003)(346002)(39860400002)(82310400008)(451199021)(1800799003)(186006)(36840700001)(40470700004)(46966006)(8676002)(2906002)(8936002)(41300700001)(316002)(40460700003)(5660300002)(36756003)(40480700001)(86362001)(7636003)(356005)(478600001)(82740400003)(26005)(426003)(1076003)(54906003)(83380400001)(966005)(2616005)(107886003)(36860700001)(16526019)(336012)(70586007)(70206006)(6916009)(4326008)(47076005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:08.5561 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7da0fedd-dc32-499e-1b6c-08db981a02d7 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: MWH0EPF000989E9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4429 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Ethtool extended state cannot be tested with veth pairs, resulting in failures: # ./ethtool_extended_state.sh TEST: Autoneg, No partner detected [FAIL] Expected "Autoneg", got "Link detected: no" [...] Fix by skipping the test when used with veth pairs. Fixes: 7d10bcce98cd ("selftests: forwarding: Add tests for ethtool extended state") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- .../testing/selftests/net/forwarding/ethtool_extended_state.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/ethtool_extended_state.sh b/tools/testing/selftests/net/forwarding/ethtool_extended_state.sh index 072faa77f53b..17f89c3b7c02 100755 --- a/tools/testing/selftests/net/forwarding/ethtool_extended_state.sh +++ b/tools/testing/selftests/net/forwarding/ethtool_extended_state.sh @@ -108,6 +108,8 @@ no_cable() ip link set dev $swp3 down } +skip_on_veth + setup_prepare tests_run From patchwork Tue Aug 8 14:14:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346142 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 B9BAB134A2 for ; Tue, 8 Aug 2023 15:37:48 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 771FE134 for ; Tue, 8 Aug 2023 08:36:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YKUGLJshPp1Qkf4MYprnVOcL5lFBxcKKpqbjngF/ra8Pleh5H4jSTNdwc9qFsz6CSmcbIvGB34akEYPlExNnT60+3sX5N77fFA1ZnToF8gSbvczbcVKxrM6KYXu5+L3vD0o+NuLns/TBLCBUXEBAEYoQUOO31neCy9/s1LK0mYvkBeh4lvnvlwU2fW0EfbmfY9P/uQTHZuK9FuPUpqbKk7mnTFlwW8BcP2TjL8Q8euh2cNg+ZFYgXP3NFMHE2kPUFI0OeLeUeahywWntSwrADiQdlzha4T/Q73Rvpd3dVlKR3VI35+edQvHKp2n7uYw+VAFnTsFG+MPDh1EUaU3BJg== 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=20hcQEs4AJlQ4qu3E3eqcfVdprQsTfkFNjrOMc95ENQ=; b=GHF4I9PPTOpLkFK0A1k3gyHDIRwyl1gAObX442Goa0yLb7DcTA9a9it7idZwXW0WlztCT/KTHYBrh0Es4uJwzdGypCViek8Yf+GsRexMxfI7lPDYmt5+UpKpZlRZo4Gkqc4r7Mj1kFU6mnD8nN0Q/ebhBq36UMVT/RbIyBKujuGiUzuv3CoZAxUlMc31atNAaG2D9AExt06/o2RCb5d8TLVGv21ZZJjPm9jT9Kqi9WriJPJmKvwunDW5stVPxYeHLvCzoEoGkUk73I/qFGNW6n/9h8kVhdtz3oH+F7lnrnOtcvhjpKaCPnupLag+jn8NfHd8E2iw+s7mnlrjKTK4PQ== 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 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=20hcQEs4AJlQ4qu3E3eqcfVdprQsTfkFNjrOMc95ENQ=; b=IfumICqK01wjjj4o1TYyOVKb3Bb42qG3uzqblX+SX6WUJr8i+ejTKp1E13hrvpdD3Z1pSXhrc2rDUR+KKsgeq+l2CR0yB8rAW29h4b/gZjV1ZJCakYSx32M4Zc4JDHqps/QZvJLv61fQwZ/f/XKzjxEhWyYs3F/vpct7drwXOSfhhILI/FS8Ewauh3+eCdPFVpzicQGMCr7Yzsp4pND+8tSxGCygepGkGsI8zYsn0YKX7oYZdVoESaofYqmZ9CD+ZKMnDnvUyTjlEHaSULHjryYzNGA83qvl9VeiJvYVzafJcMkeT1RmEtYjJ44VM2GK53TOQE+WYFQ5OxdULa8KKg== Received: from MW4PR04CA0058.namprd04.prod.outlook.com (2603:10b6:303:6a::33) by CH2PR12MB4875.namprd12.prod.outlook.com (2603:10b6:610:35::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:16:10 +0000 Received: from CO1PEPF000044FD.namprd21.prod.outlook.com (2603:10b6:303:6a:cafe::8b) by MW4PR04CA0058.outlook.office365.com (2603:10b6:303:6a::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000044FD.mail.protection.outlook.com (10.167.241.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.0 via Frontend Transport; Tue, 8 Aug 2023 14:16:10 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 8 Aug 2023 07:15:58 -0700 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.986.37; Tue, 8 Aug 2023 07:15:55 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 09/17] selftests: forwarding: hw_stats_l3_gre: Skip when using veth pairs Date: Tue, 8 Aug 2023 17:14:55 +0300 Message-ID: <20230808141503.4060661-10-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044FD:EE_|CH2PR12MB4875:EE_ X-MS-Office365-Filtering-Correlation-Id: 712b4cd7-2477-434b-68cd-08db981a0407 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vnr3LlfO84NR9TyI18HoKhbiXyQIA5jT2awgL8FYHZyG3Z8yEhfACO6blMa64hjbyg6WbQzx6SE+7qc5+5/xlDdXL2FCT1VJ8yfeDdA/U2ijABvudMB11/7D4f5UeaXMpQ773ltuVW77IGkrqMNr2MZkBi65Q6XZlSag4B9PTJinQnO3EHirmQlothBmDelU0p3O8ZTJNmGD5nVaNbUpd1ipc40taDVkEOsvkrCHQqGBb/GgYyceFYIMeP1vYN6+U8bmLe2ctqPc9RflXe3teR4lnHfTXsBWNp1jD1UroqnXcxuZ19zhOyryxTH1g0e09upigw6ZzB5B3zRNzxjzcfgwQEJ/VBan3mWLlIqQxyP52AF9GMwHSTqqtUHN2j0NxUO0wh9g5AaAtg1ZzsKEznIkcOvx1Oo1qmXPjpARCRTpqvMRrpywCfkSB0dELmwkPR0CJv+R6mMjXHHcE4KHKa2xIiYajl0WG9j6EylQHxLk+HkciHD90uQ4ELlkTwJMErf1/QhdT+as8orfWMkrPXsTZG9GjIczKRkltutPTTD51+bF7cFJ5SagBiCJFQLVF51FRbQM8Kem9Li5jIeUv6MtqRWvvJYHRnuOXlVLa5yDY4D/DhqQki2sWrg63v4Bkv3utmxuGfhv/yR1i6y5wwwuXULZnSRfCDAnI86qKSVB1mdWagF95PK2H2AOH+if7QbUxuKCxcOW2NoHgANDQVulo5VnARco2GUQYtt+DVU7WpQThIX0GnmoXGm6H1+olRR/IJesz2Q1gVqiPjzcpdPPCByTAXQn6lxsH09MnNw= 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:(13230028)(4636009)(396003)(136003)(39860400002)(376002)(346002)(82310400008)(1800799003)(451199021)(186006)(36840700001)(40470700004)(46966006)(47076005)(83380400001)(426003)(36860700001)(316002)(40480700001)(70586007)(41300700001)(6916009)(70206006)(4326008)(1076003)(5660300002)(8936002)(8676002)(26005)(966005)(54906003)(478600001)(107886003)(86362001)(2616005)(40460700003)(36756003)(356005)(7636003)(16526019)(336012)(2906002)(82740400003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:10.6285 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 712b4cd7-2477-434b-68cd-08db981a0407 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: CO1PEPF000044FD.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4875 X-Spam-Status: No, score=0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Layer 3 hardware stats cannot be used when the underlying interfaces are veth pairs, resulting in failures: # ./hw_stats_l3_gre.sh TEST: ping gre flat [ OK ] TEST: Test rx packets: [FAIL] Traffic not reflected in the counter: 0 -> 0 TEST: Test tx packets: [FAIL] Traffic not reflected in the counter: 0 -> 0 Fix by skipping the test when used with veth pairs. Fixes: 813f97a26860 ("selftests: forwarding: Add a tunnel-based test for L3 HW stats") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh b/tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh index eb9ec4a68f84..7594bbb49029 100755 --- a/tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh +++ b/tools/testing/selftests/net/forwarding/hw_stats_l3_gre.sh @@ -99,6 +99,8 @@ test_stats_rx() test_stats g2a rx } +skip_on_veth + trap cleanup EXIT setup_prepare From patchwork Tue Aug 8 14:14:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346148 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 EFFEF13FE0 for ; Tue, 8 Aug 2023 15:42:10 +0000 (UTC) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::60a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56E7744B5 for ; Tue, 8 Aug 2023 08:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTXWCb/QvDFYs2f5UjfHXFecY9CtC/bWet4xhGp22ZsWHW/we/aXbngcLzEXFGvuvuldGMMqefZOy+s/EgncdVeLjDw8+NPOKvzb3lmN6cBE855xP6pJzL3cVP+iCLVItBAd+vBGIgY6L45qfOnz2GyJ20R49/gw3jvY8eDVCTebkpJmgVrvFOcmQMoSN6u7ypxAT89ZdAt9p1yevx8CKtA4VSFvvLDPUeV5FcJszS0XehOYMpjKnjQz4gsigVvO8IVJtFKRafFtU6o1HkamIGekh93aomypHGHOlAjvrVcleSZ4gg7LWrfLCdwGe1mWSHFh1N5ntVNvn59Hc6AVHQ== 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=kqpxPQdvDr1ScO9poTTTnzPvMBpT8xX8RgMGOXa+1lA=; b=bYtA2MVr1sMm+37A8YZHjZuTnEqT28BXK1t2+WTS4yuh13DpCIv5Y1lFsYGpIMqLTlJOiE46yFolvHqohgX7U9l1zd1/IBNr6NSEgXajKPspxGiYkm6GKAKWXLww3U6fGomaVByDYZ3DRSADQn5Qoj7ZkD+akyGPmrNG/y9DsB51XWz9xeKam/InWOQ7w3k7jcNKNXUHGCJaenTSUFq2uiqkXkTGE5JL7mk9VcZiSkYOG0W6Rj0QvFbij4YHyvGR88e1ijKl0W2OLFN/NGX7aGXA094mT6cB7Ex2Xg1QWoT2zb73jbOAjUTb6C0YTKuMKRxuuvbGMUNv6jmmpSqhRg== 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 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=kqpxPQdvDr1ScO9poTTTnzPvMBpT8xX8RgMGOXa+1lA=; b=lFEmRBzFcgj8kdlf+wb7bgkEw3nF98aiwaCNYTLfciXHnTpxKYbH9llLeL7ncBgsVrV75bPuLx0NswaELOZSkUS6HVaU55QOY9rn3qZA+unqLCDL+v4H3B3MspIo4PbEKvDbGhQjpxk5Nbvbdgys09cbxdH7TqLOtHA4vUmEy/MZtCmAFpIOu/MDEUNI70fl1+6oBcZL7qwSp5kfb8FoOKr5pcnPx+NUXCha2wBfGiSDDy2JfJIZlEcD0sXj+4axHvDCxjDRXrOyf1o5iLRmKik7YbYslLqIXPldSWT4+wWgJPTBtsuBvLJMO9so3oD97kkOroSRq/oXX9GxsxNIJg== Received: from BYAPR21CA0002.namprd21.prod.outlook.com (2603:10b6:a03:114::12) by DM6PR12MB4089.namprd12.prod.outlook.com (2603:10b6:5:213::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:16:13 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:a03:114:cafe::df) by BYAPR21CA0002.outlook.office365.com (2603:10b6:a03:114::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.0 via Frontend Transport; Tue, 8 Aug 2023 14:16:12 +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 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.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:12 +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.5; Tue, 8 Aug 2023 07:16:01 -0700 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.986.37; Tue, 8 Aug 2023 07:15:58 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net v2 10/17] selftests: forwarding: ethtool_mm: Skip when MAC Merge is not supported Date: Tue, 8 Aug 2023 17:14:56 +0300 Message-ID: <20230808141503.4060661-11-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EC:EE_|DM6PR12MB4089:EE_ X-MS-Office365-Filtering-Correlation-Id: a37ba979-8995-476f-1e02-08db981a0501 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: u+7ZIDO2mmu8ErA2zheu8q6Flj26M0NDfEyICeDwrFWkSzmswyuktZQ+MlvPs0XJn+dJAme+h9/IFSYa+MJvqPIMXyuo0f/zwT0C3c8TRNLLra4aFxT+x28c9sWubZVTOuVCcfhvuv+94SsbzGdpZtDQIOqpdY0JJwjv5OJ6Rfmg1wVlBasPOPiRhK27pkkyjlRNo+FPKTNiGO6QrOwvjC/L9xG09HJoMGvs26L64PIsc+uu9vSjfKzuW2q4PC9I4gHEKDTTwG+pRgAWkQ/X3U2prTYkR3aBpLB6R3CcNK++RoJr5/nPYwq7SSGbEGo6PB/JxhhLokcPm0uD3W3NMFz8P8ZZbMNVDviz0lTcNifK/DBrt8Eel7fljzgIDCiVfFVwkhyxx0KpRWcQBEfmNYSqrqOBn4YLqtdcKzUqTs0oS52/EVKlgf8FFro02rNeDo6FxSSHgf385YWj0AdG4pSMq06lfMf6KFHKl7LzTsKOE0R2yRmuHO5/6NYnutkO2Zth7kE512O90NtSj7/nIYW+yn1SP61fO4FUAiTeHDVCAESL4UO4Q1ARl94fca5ZolfvheAs5zDJ5BAyMpAeLlEA80qn2jh6P0bZ3cZPXmwzu4vYUtcq3/NJ7Zt6sHCokStWXCfrB1c7wpaIY//NNJzQBIERJ5+nbY9KDPLSgoF3j7egn0Yxjb6pqwz7u2kh1g1HZYKE/eUppMPzrkttbup00Ekn/Bxq3T4hKTkucegWriM3Eu+LkoZuuSpIHiWGZc37q0OImtr4rPP4hV5akA== 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:(13230028)(4636009)(376002)(396003)(39860400002)(346002)(136003)(451199021)(82310400008)(1800799003)(186006)(36840700001)(46966006)(40470700004)(40460700003)(82740400003)(336012)(86362001)(1076003)(26005)(83380400001)(16526019)(47076005)(2616005)(426003)(356005)(36860700001)(7636003)(2906002)(478600001)(966005)(54906003)(36756003)(40480700001)(70586007)(70206006)(5660300002)(8676002)(8936002)(41300700001)(4326008)(316002)(6916009);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:12.2181 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a37ba979-8995-476f-1e02-08db981a0501 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: MWH0EPF000989EC.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4089 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org MAC Merge cannot be tested with veth pairs, resulting in failures: # ./ethtool_mm.sh [...] TEST: Manual configuration with verification: swp1 to swp2 [FAIL] Verification did not succeed Fix by skipping the test when the interfaces do not support MAC Merge. Fixes: e6991384ace5 ("selftests: forwarding: add a test for MAC Merge layer") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Vladimir Oltean Tested-by: Vladimir Oltean --- Cc: vladimir.oltean@nxp.com v2: Probe for MAC Merge support. --- .../selftests/net/forwarding/ethtool_mm.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/ethtool_mm.sh b/tools/testing/selftests/net/forwarding/ethtool_mm.sh index c580ad623848..39e736f30322 100755 --- a/tools/testing/selftests/net/forwarding/ethtool_mm.sh +++ b/tools/testing/selftests/net/forwarding/ethtool_mm.sh @@ -258,11 +258,6 @@ h2_destroy() setup_prepare() { - check_ethtool_mm_support - check_tc_fp_support - require_command lldptool - bail_on_lldpad "autoconfigure the MAC Merge layer" "configure it manually" - h1=${NETIFS[p1]} h2=${NETIFS[p2]} @@ -278,6 +273,19 @@ cleanup() h1_destroy } +check_ethtool_mm_support +check_tc_fp_support +require_command lldptool +bail_on_lldpad "autoconfigure the MAC Merge layer" "configure it manually" + +for netif in ${NETIFS[@]}; do + ethtool --show-mm $netif 2>&1 &> /dev/null + if [[ $? -ne 0 ]]; then + echo "SKIP: $netif does not support MAC Merge" + exit $ksft_skip + fi +done + trap cleanup EXIT setup_prepare From patchwork Tue Aug 8 14:14:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346151 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 932A214000 for ; Tue, 8 Aug 2023 15:42:18 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2060b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eab::60b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B57C4468F for ; Tue, 8 Aug 2023 08:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZCju19wXMraIgT0VaqWdKzML/hQ1x9+vfgAeaP3ZekYzeH6YHlGHyUKLCRq4nRWSyaK9LobM4F76uGiSpDJPbSQ95ZTsd44ynDI/nSUvi0y7rtKqB2T6UFJXUmKemG3n7IGx8Q48Q3BbAj18kWsXUrVWRSzWI8yYm7UZHZxPCT/j66WNWjlt5ftMt8DN6PwrRtigMuet/QLsx7keG0ad9pQBNd5GAlLbNRA/o3ezDQxVTkY8/jyP90IgB8LzgfW2Ciwyz8nwJQASFevON4x+D5fB4pqFj4EZiIfnNyXe0sjL27vYYNyWRk2UyPQRr/GwC5oqYfbxKzNp8r2ancTF6w== 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=ofDTqJ1O9BxqHiVUbA/OF3A4nySad5YAD+FpSUHT7Yk=; b=SCm8yH9+WpDHfOD4ewGEtbaUnM4v9YNV7zBDEQCgrljaVx+87s76tu5FuzNibTQ0ZMqU+99jLcw6kkPpiZ0cwwZd1n+930gaREBzphi4JtEsk/Y4k1N/0zaQ9FKRutwKy5qlPjfKjzRmj3aqKFFYT4vCFT+7H47wWD7LDlJ8XVWHzfVGA5H4yVjakRt+wKQVMGaIDSypze/+Lx6DOPTx03AMjgehINQmV4G2FUzkyGwFF4cZE9vlNTQWj1KluFVivcYFKoLyYVkw6Y1FjHvv1OCjyBky90VqK6lWgcWkkkS/5Bm/Th9Bs5XuaY/mNalprUO/J51U8IDhy7SLnrbwOQ== 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 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=ofDTqJ1O9BxqHiVUbA/OF3A4nySad5YAD+FpSUHT7Yk=; b=NsqF13FbMjrb0MX3si5Wc+49++RnlRGxRuJy181tTUK3ERTeYhEmH0yOhykpnWQQBwyR1n0/ziM6RL4LSdbg1SyBK7Udosb4kN39q5oUvZflMx7EV82uaeeqPLwlmyCarPGIhI4Dq6tEZdobnli8FuxPZI7JPF3an06OG6gDDCQjQZaT0zlXwAgQ5qKs5yt7AtZOQc2NwR7WTDrxvE+qwFehvBKyMYgIw40v6qqn8ooC1qU2rV95xZEQg0IQMsIitRRpT8uBq+JSHhpDrGgA1fi4Tn4aLHvIFrKfnSBlhhOABdIA+A879c4w0w6wWaU5WHOlcKNfxi8xdIcVj/pQow== Received: from MW4PR04CA0304.namprd04.prod.outlook.com (2603:10b6:303:82::9) by MN2PR12MB4336.namprd12.prod.outlook.com (2603:10b6:208:1df::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Tue, 8 Aug 2023 14:16:18 +0000 Received: from MWH0EPF000989E9.namprd02.prod.outlook.com (2603:10b6:303:82:cafe::fd) by MW4PR04CA0304.outlook.office365.com (2603:10b6:303:82::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:17 +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 MWH0EPF000989E9.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:17 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 8 Aug 2023 07:16:04 -0700 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.986.37; Tue, 8 Aug 2023 07:16:01 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net v2 11/17] selftests: forwarding: tc_actions: Use ncat instead of nc Date: Tue, 8 Aug 2023 17:14:57 +0300 Message-ID: <20230808141503.4060661-12-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E9:EE_|MN2PR12MB4336:EE_ X-MS-Office365-Filtering-Correlation-Id: cca713a7-0cda-49a3-2ce4-08db981a081a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pJcPDPFapPO9FTMnQmRSc6pbcXzotgvqkTsTO0al+JcjyUvSGd8Gt5kWA/tpVR5HRrvlTkdn2V4Vu4q5hsAbKb1qFLBm/f6McVTSPpUE9cSY5TT787YbrUR/nJBKJoe3Jo2UkgvK4x33gVIX6vKNRn0ksPdtrFTZe9roYpkaNazbU4mdR5IJnsD1g7MsHQ2Ej0JpsXLgjRZ0uMRF4DcuFDG3GiY5sgxxtai0UGIc5QRGrMj+FpINoWeknd0UUPH0QwOjw6gxEQkQyn6UdVtKE5DeDqDwUbpY++JUerM7yIbi561x3TK3DagsEWSs5ImiR9I9dhPMCk1EfI1vJD1h/7YoZRYFZQ8G4+eg1VbRVg9lUXuirhEreMpHC94VZVSfiDi4M6FXEm566L1HnErQf7BJvd1vwoA9NckP3Bkopn6gOZA6DcGVG+V+bqnuLk+4AZe5MFR4dI/mO8BJeGycDASYmfSPShvCyvBRvV4yDv5+EvPP6Uu9XEyJ1ic0X/wnW3lz3jSnNMR4l+bp/13yDXU86px84PRO23/EItLXQ7Mhg/EpYAXfETPAwydKL3CLmGKFPUPLFx6PtV/nmjndqJ5ekD66HPTLzECEq6nn5up9Uk4vIMCAY/i0ASkLJJp0i8lFZIJF8EZVVLobna4mJUox2O7EP2lcvqf2vAzbE7kZK1BsTke1rzWDhSsZcZVMliFJ78RYJYh633K3slu4bnFYIUlpdblg4cri/OeSo94loBYjkiBj46OleMJJ/bXXVNfyTuS9mzo+7vlOdJ0jNaixscPNGdT+426P6qiDkxk= 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:(13230028)(4636009)(39860400002)(396003)(346002)(376002)(136003)(186006)(82310400008)(1800799003)(451199021)(46966006)(36840700001)(40470700004)(6666004)(83380400001)(426003)(47076005)(36860700001)(2616005)(40460700003)(7636003)(40480700001)(54906003)(4326008)(6916009)(8936002)(316002)(8676002)(336012)(5660300002)(70206006)(70586007)(16526019)(966005)(478600001)(82740400003)(86362001)(356005)(2906002)(41300700001)(36756003)(26005)(1076003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:17.3999 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cca713a7-0cda-49a3-2ce4-08db981a081a 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: MWH0EPF000989E9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4336 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The test relies on 'nc' being the netcat version from the nmap project. While this seems to be the case on Fedora, it is not the case on Ubuntu, resulting in failures such as [1]. Fix by explicitly using the 'ncat' utility from the nmap project and the skip the test in case it is not installed. [1] # timeout set to 0 # selftests: net/forwarding: tc_actions.sh # TEST: gact drop and ok (skip_hw) [ OK ] # TEST: mirred egress flower redirect (skip_hw) [ OK ] # TEST: mirred egress flower mirror (skip_hw) [ OK ] # TEST: mirred egress matchall mirror (skip_hw) [ OK ] # TEST: mirred_egress_to_ingress (skip_hw) [ OK ] # nc: invalid option -- '-' # usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl] # [-m minttl] [-O length] [-P proxy_username] [-p source_port] # [-q seconds] [-s sourceaddr] [-T keyword] [-V rtable] [-W recvlimit] # [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] # [destination] [port] # nc: invalid option -- '-' # usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl] # [-m minttl] [-O length] [-P proxy_username] [-p source_port] # [-q seconds] [-s sourceaddr] [-T keyword] [-V rtable] [-W recvlimit] # [-w timeout] [-X proxy_protocol] [-x proxy_address[:port]] # [destination] [port] # TEST: mirred_egress_to_ingress_tcp (skip_hw) [FAIL] # server output check failed # INFO: Could not test offloaded functionality not ok 80 selftests: net/forwarding: tc_actions.sh # exit=1 Fixes: ca22da2fbd69 ("act_mirred: use the backlog for nested calls to mirred ingress") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- Cc: dcaratti@redhat.com --- tools/testing/selftests/net/forwarding/tc_actions.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/tc_actions.sh b/tools/testing/selftests/net/forwarding/tc_actions.sh index a96cff8e7219..b0f5e55d2d0b 100755 --- a/tools/testing/selftests/net/forwarding/tc_actions.sh +++ b/tools/testing/selftests/net/forwarding/tc_actions.sh @@ -9,6 +9,8 @@ NUM_NETIFS=4 source tc_common.sh source lib.sh +require_command ncat + tcflags="skip_hw" h1_create() @@ -220,9 +222,9 @@ mirred_egress_to_ingress_tcp_test() ip_proto icmp \ action drop - ip vrf exec v$h1 nc --recv-only -w10 -l -p 12345 -o $mirred_e2i_tf2 & + ip vrf exec v$h1 ncat --recv-only -w10 -l -p 12345 -o $mirred_e2i_tf2 & local rpid=$! - ip vrf exec v$h1 nc -w1 --send-only 192.0.2.2 12345 <$mirred_e2i_tf1 + ip vrf exec v$h1 ncat -w1 --send-only 192.0.2.2 12345 <$mirred_e2i_tf1 wait -n $rpid cmp -s $mirred_e2i_tf1 $mirred_e2i_tf2 check_err $? "server output check failed" From patchwork Tue Aug 8 14:14:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346149 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 8356A13FE0 for ; Tue, 8 Aug 2023 15:42:11 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20601.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eae::601]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7F7944B7 for ; Tue, 8 Aug 2023 08:41:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YQ3PynHgrjpat+ts5ncKdACnf/czteGeR5J+8zFNXwN3cgE5lAIsg3FSCnrG+4LT5pBA9NqAralnCKSGAFRe2uVoJl5t4CwdVh3zhq0v2UDW38+VQJW1g8QNPuea8L/IOjnmXHy/nbsFq3Z2jS7uiaWMojLYjPv2RxlGT678IgZyfEf1Iy0TETrtWd4uRNQGxwUouu1NcGaBFtEbM5BuyGgD/ZYRlRkTjSbpNR4pDtWO1cnEmsJxGMHer5q9JLYBVea0wLwDDjRnOFrzIDD1qYySyQghwK6sD5Dql7WOJtJNjxCi1d8cT4ZR5IXQKHSW4Qk6zXWmCuIlju7/haqt+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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rfREWyNO25yJIz7rr+cssbXOGkP9Is5EGsMxq9XjX5c=; b=N/lm6+nl/ViCz79im9Za2AZCLLk9DbpIbZUhf2QPsaDvUtYGm+vT+2OTn1u3gdTmqnYzOm4vec/4cXP2fLWwZV+DKTeyTK/Tf8X0WyvIsjp1Qin2ytMqS30pHX/bT7s2XgYgWEMW1L/0aAYlOUSzlahotkgl9ZrEi3Iit3KzXsLEDFPpEn+vs1IyAJCMWGyVwZB2e8KU2siX/o64kaEOvjiYRXVlXDlrehouRWTaz30Key/4fpKjv3RiX2xKL9SoQ0Zb+8AtwmdVoH30rFjs8EfnLGUS1JmbsXTsBCrI0cmNa3vJMeZb/IFWicsBq+xKRh9RnPMgPLoESyr21txoyg== 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 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=rfREWyNO25yJIz7rr+cssbXOGkP9Is5EGsMxq9XjX5c=; b=b4bH/VObuy5l82bZM0PfeQQtnT9AQMui7Qtr0+yC0lGNPyQKf8BPTiZzlzbmK27ChXVEhNkSxKCGHEQv853495ZjocphLuh1MCcTpBwAJS//j2MRTHPkDR84MbXWHHGvf261o3S/PyJlhDI8uqkTYVzSoN5//uV7uxgzJ0b7cYUahkc1jcvO4olgNnyUdrpfvrHROGsPGs5EpmE6H9TERPiy/BhpnqJIERnl66lBQkZNWcm9J4LOWXu/A3pW07o8UkAIH+L2E2s/NPDNK0+MTjiKWQruveMF1qhpvtCt3KERC+vGbsHN/0soqQnVcUjCXnMAzqpiApHNEaKRZ0FdOQ== Received: from MW4PR04CA0326.namprd04.prod.outlook.com (2603:10b6:303:82::31) by MW4PR12MB6826.namprd12.prod.outlook.com (2603:10b6:303:20c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.26; Tue, 8 Aug 2023 14:16:19 +0000 Received: from MWH0EPF000989E9.namprd02.prod.outlook.com (2603:10b6:303:82:cafe::97) by MW4PR04CA0326.outlook.office365.com (2603:10b6:303:82::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:19 +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 MWH0EPF000989E9.mail.protection.outlook.com (10.167.241.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:19 +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.5; Tue, 8 Aug 2023 07:16:06 -0700 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.986.37; Tue, 8 Aug 2023 07:16:04 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 12/17] selftests: forwarding: tc_flower: Relax success criterion Date: Tue, 8 Aug 2023 17:14:58 +0300 Message-ID: <20230808141503.4060661-13-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E9:EE_|MW4PR12MB6826:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e3ce77c-94a6-4c7c-333a-08db981a0944 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zk4c1d15oIQdTI9jZn+WGajlz/8SyisSpBcIDi38+eSN7Q4g+0Ymk0FcGLYy8XKGzujx7AZZLloukQbCummT8jhikR+H00+1ZFZkjk7ZZNQx9vUZrNQpH3ilifImOqfEPyfnuPCmdMomplTdS0jqMFbWWvipjq78oB9eykIPCr6JGvIx9nGnJ66d3FjhJi9LBPV7o0qjk9BCbf5ENxb42NPY074kZEzIfZdLeUDtmI1nvEx3+uhQFwZR8L/57QZigzh5rmmQm3jXH9WOijqVVrUDUFlWibk6ZtaJ5DCzmkGKrdgUSFZp3Qvryuv49DisaB0yp9QmrD8lhTBstZemdMmBOznBiIUqlEC7hbt+380347ZE2M9ntHQuYjJA5hzOOQO5uyh4YjfMBo4CU0SysdaiFC4KhgqHe1Bv7mYhV8+tQoWZ+atiHf8K3J0XqclkJp2ZEQ2DEbpdcNYXoA+wBUvu1KWLRc6+GoiRxq1+1iIem7AHWXf+DWtBS6/8sxXvj8gsiCXyRoQ77Tym7j2USjoqeS+ARGLzxAKMhHsT7eE3MIQ5fQyFM3Ug9y8gRT/ziqwtJmnGA44GLIo6sPYt711AW0LWzG8glLCysiy3rIDkykIQVdMcQeUrPs6EID9cXm6sN3W0dBPaAB2eLG91UW4lonrzszkbcHEGjFzv3ojG+R+Z6QSFPu+RZZ35nZdOeKpHVVBlVtCIL4Kg2FJHdZdoTN8MLaVY7LT5u2LiaHEROS6NLnRZTHoRj1fcah65rxGpgvV2gP1stG/fnoE+ERtC7F92ec7wZlO7SjyzRpg= 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:(13230028)(4636009)(376002)(346002)(136003)(39860400002)(396003)(451199021)(82310400008)(1800799003)(186006)(36840700001)(46966006)(40470700004)(40480700001)(40460700003)(2616005)(336012)(6666004)(86362001)(478600001)(966005)(82740400003)(7636003)(26005)(36756003)(107886003)(1076003)(356005)(316002)(5660300002)(8936002)(6916009)(4326008)(2906002)(8676002)(70206006)(16526019)(41300700001)(54906003)(70586007)(83380400001)(47076005)(36860700001)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:19.3687 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7e3ce77c-94a6-4c7c-333a-08db981a0944 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: MWH0EPF000989E9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6826 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The test checks that filters that match on source or destination MAC were only hit once. A host can send more than one packet with a given source or destination MAC, resulting in failures. Fix by relaxing the success criterion and instead check that the filters were not hit zero times. Using tc_check_at_least_x_packets() is also an option, but it is not available in older kernels. Fixes: 07e5c75184a1 ("selftests: forwarding: Introduce tc flower matching tests") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/tc_flower.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/tc_flower.sh b/tools/testing/selftests/net/forwarding/tc_flower.sh index 683711f41aa9..b1daad19b01e 100755 --- a/tools/testing/selftests/net/forwarding/tc_flower.sh +++ b/tools/testing/selftests/net/forwarding/tc_flower.sh @@ -52,8 +52,8 @@ match_dst_mac_test() tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" - tc_check_packets "dev $h2 ingress" 102 1 - check_err $? "Did not match on correct filter" + tc_check_packets "dev $h2 ingress" 102 0 + check_fail $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower @@ -78,8 +78,8 @@ match_src_mac_test() tc_check_packets "dev $h2 ingress" 101 1 check_fail $? "Matched on a wrong filter" - tc_check_packets "dev $h2 ingress" 102 1 - check_err $? "Did not match on correct filter" + tc_check_packets "dev $h2 ingress" 102 0 + check_fail $? "Did not match on correct filter" tc filter del dev $h2 ingress protocol ip pref 1 handle 101 flower tc filter del dev $h2 ingress protocol ip pref 2 handle 102 flower From patchwork Tue Aug 8 14:14:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346150 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 7110C13FE0 for ; Tue, 8 Aug 2023 15:42:18 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20601.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eae::601]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8533C469F for ; Tue, 8 Aug 2023 08:41:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UYkKgCe6v0fvnbPhsj2mzQZmhW7ANCQrkuIBCD6IVIR4T9K+PNUEGul9o/vxzBJVmOM5WraSZd4WU65YsE00NDoGS66/0GACaeDSdIS/uWg1Qgt1GxPs7miIG3gxhpx16m8ePA7LBU80G0La4fJyHn8wS27XV2Y256t4hsRMUzTbz+rhEahx9gO0zthSWW5JsqLtRIcWvm7WSOhC4nHEdzS6gg12i5sEM9hxMOvS8xNPmxkB0Qy06iFLC3/GvQ45ZU4X/CxiwRterzIp/g/kourVGnXDARaGCbZU2KaXpWiYQFqwuTaX3/JQs3atCzX8wgM9qV1J6Dp9I+jw7Ca4FQ== 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=HAyjaKdkkSi4w9oUDn5Gji23Sdd6NQwuJmfyh+dK78M=; b=NQ0TeW+d24BXF4YUD7YuYnlmV4Mb9M2HQeVGS12b/rwi38/bM6luv7Y7gBVsBR50h0WiawM+yea1sbcY6+7QU9M1Qj373mDi7t7sUxEb0RoLNH7+3agwvF2yYUhrr0fIGEoaSksZMqyypRpyLwKxad/DBCf2eK6HzzypEZLVcxP7X3xgQxs+QkUB4nbWL3dAvQA3jlh7SkWoSypjRY7xsa+heEnTwUxb0f72O/xT9TER4rHMoI5rjPqBcrJ1l37oShXMwEVWtuyIyS40qYe6EpEoUSF3ZZOypa446KTAK6zxm5GsQVmmBvd+0b6VlnCjgcKsmDfaqR49KurxRcNbdg== 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 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=HAyjaKdkkSi4w9oUDn5Gji23Sdd6NQwuJmfyh+dK78M=; b=WBA0C1jAYyM1PVoFEs/joWJ4dFEo2L2uc+6lcoLQ2wdzkIozOB5a4HBROcvwBA59tPYmBHKdFJZ3SQc/4ciwUURVWTlMsC9d1Zm6yri1N+D0GlVsajO6TtM63Cc/+1eU+nD7mkPWTw/0HmRPOgCmE6YsUipCV9Op+R7sKxSyHTjxAYEM/IKzAM9FuCWYE3kG1Oi4bw5EuQPen0uAryAaEMKjUJi5CV9EpVQb8ey2aiBCqYs2tbz5ccpm/fRrlIh0k7anBp40RVA8Mp4BCpC6f55P2Xrb1fXlxwj1sQBx5APZz7Ko2M8fwS+DuK0K8+DnWTpMcCIspPfazo2bpka53A== Received: from MW4PR03CA0237.namprd03.prod.outlook.com (2603:10b6:303:b9::32) by BY1PR12MB8445.namprd12.prod.outlook.com (2603:10b6:a03:523::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44; Tue, 8 Aug 2023 14:16:23 +0000 Received: from MWH0EPF000989EC.namprd02.prod.outlook.com (2603:10b6:303:b9:cafe::25) by MW4PR03CA0237.outlook.office365.com (2603:10b6:303:b9::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28 via Frontend Transport; Tue, 8 Aug 2023 14:16:21 +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 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.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:21 +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.5; Tue, 8 Aug 2023 07:16:10 -0700 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.986.37; Tue, 8 Aug 2023 07:16:07 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net v2 13/17] selftests: forwarding: tc_tunnel_key: Make filters more specific Date: Tue, 8 Aug 2023 17:14:59 +0300 Message-ID: <20230808141503.4060661-14-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EC:EE_|BY1PR12MB8445:EE_ X-MS-Office365-Filtering-Correlation-Id: cb0c3c7f-7b2b-4715-55bc-08db981a0a89 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AULA2DugIB3MOeB1RQFADx3fr2r5ywTe9fpHnS2oRzwwIwbGXqjwobqym5RGiEk0ZcAcOCYC4A+eTUh0EcgCpMQDXhc3dB4NbJieC20WCpGa9Lq1Nx2q3hU4w1gW3QbPqx+ltiQS89yijrMGKt4Hps3acPfpvTwCP/4jd5zBeSmiKvN3IoXDAT58LgWa0lvTQx+7A0y5r8Nw8PNMq7cfIwVUVauIB3hbbQFGOaLzJ+Ro+n21dJcmBiOfXw0nkJ6gmiUdB7mKTCEb/nkp+ymGfR0cnMRC/X0/h70w2LpERHmuc+526PhPl2QI/1MCTlM5rc7XBaLSKHBEHM0UevytIwOdQlDyuNwenkXKFB0XrVOajYR2SaQN16OtP1MB7yza13siRan3Mr0czY/C3rKcY+7umVbHq9lwUQK21EAiHKhDu0YyJz2PUpbQnlJGpzik6E6jo2O8zc67ZVwhwPNqGl9oLFglrabC5mleXU+mi7oNeJNV7KTAYn5y5nM2ZT2PvFUiZDlv7yR+LcuSAI8zvwrwUgsBv1HwwzqvFIRzRK4ovQGK6wwZrNPI5tQq8Mrm4e3v9jsDA+Ccc3aDhhCPgLCyQqdcGvXAKquxfX2vMFqNp9eqjDzjV4afyUSaDF7oyYdoT0F+zhuMXxgutHuaL0RJAC2ee1OlEvWDwG7kTT8AKZgKVKDEt7QUdEK4XYxQC1nzuWmM60P0uoyM9Hw4j2OhDgFCt23ArBEh6zQCgnc4oWjRa2aUNJ486hHaTfBMba+v3k0Kb/Acpr3tKDwQgLOGawue3c15yrNcbVPXlS8= 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:(13230028)(4636009)(346002)(136003)(376002)(39860400002)(396003)(186006)(451199021)(82310400008)(1800799003)(36840700001)(46966006)(40470700004)(83380400001)(426003)(36860700001)(47076005)(2616005)(40460700003)(40480700001)(6916009)(4326008)(8936002)(2906002)(5660300002)(316002)(8676002)(336012)(70586007)(70206006)(16526019)(966005)(478600001)(86362001)(7636003)(82740400003)(6666004)(54906003)(41300700001)(356005)(1076003)(36756003)(26005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:21.4838 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cb0c3c7f-7b2b-4715-55bc-08db981a0a89 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: MWH0EPF000989EC.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR12MB8445 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org The test installs filters that match on various IP fragments (e.g., no fragment, first fragment) and expects a certain amount of packets to hit each filter. This is problematic as the filters are not specific enough and can match IP packets (e.g., IGMP) generated by the stack, resulting in failures [1]. Fix by making the filters more specific and match on more fields in the IP header: Source IP, destination IP and protocol. [1] # timeout set to 0 # selftests: net/forwarding: tc_tunnel_key.sh # TEST: tunnel_key nofrag (skip_hw) [FAIL] # packet smaller than MTU was not tunneled # INFO: Could not test offloaded functionality not ok 89 selftests: net/forwarding: tc_tunnel_key.sh # exit=1 Fixes: 533a89b1940f ("selftests: forwarding: add tunnel_key "nofrag" test case") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Reviewed-by: Petr Machata Tested-by: Mirsad Todorovac Acked-by: Davide Caratti --- Cc: dcaratti@redhat.com --- tools/testing/selftests/net/forwarding/tc_tunnel_key.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh b/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh index 5ac184d51809..5a5dd9034819 100755 --- a/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh +++ b/tools/testing/selftests/net/forwarding/tc_tunnel_key.sh @@ -104,11 +104,14 @@ tunnel_key_nofrag_test() local i tc filter add dev $swp1 ingress protocol ip pref 100 handle 100 \ - flower ip_flags nofrag action drop + flower src_ip 192.0.2.1 dst_ip 192.0.2.2 ip_proto udp \ + ip_flags nofrag action drop tc filter add dev $swp1 ingress protocol ip pref 101 handle 101 \ - flower ip_flags firstfrag action drop + flower src_ip 192.0.2.1 dst_ip 192.0.2.2 ip_proto udp \ + ip_flags firstfrag action drop tc filter add dev $swp1 ingress protocol ip pref 102 handle 102 \ - flower ip_flags nofirstfrag action drop + flower src_ip 192.0.2.1 dst_ip 192.0.2.2 ip_proto udp \ + ip_flags nofirstfrag action drop # test 'nofrag' set tc filter add dev h1-et egress protocol all pref 1 handle 1 matchall $tcflags \ From patchwork Tue Aug 8 14:15:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346152 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 7DD94134D6 for ; Tue, 8 Aug 2023 15:42:20 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::61c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D11F34237 for ; Tue, 8 Aug 2023 08:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iZj8m+n+K1yCS4oC/uDhv9UtnvjrMYzwH/CWIzHg1vIwptfPfbuuJ1+7SUw5xUM//kaTf4i3XnP5kwpRqYdMV5odTeKzep585xh+jc5CS3OsGz2ZBJ8P+Wl1AChKRC85OcWqvJBefWHjCFVKdeWgUkDKzhTwklQXX/M3+IhNc6NCIcGlb/1LfE/Z3QYoVT8rLHTWWLJzXhzILSG9+k9r10nmsVmY33o3y0IY2RmhoCCu2sSrltjL8ElGqTFwh13JkJxxy5lZj6huYtbYkEJ914h8vAp4/vXC07QBNedteK3H67x4iVjoJNR0eUINAC8jjdd78NTCfKjgHmG4HUlQug== 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=q9wct6EEFEb7A4xLSHyl5ScXjsMYTfimhvIG3q9vHrY=; b=i0y2gtCv+h4vbx9gHi4P+8WIXZyWfI1Ul+tdmO+p+sUcXXmykeiRzAHP0I4KTAWsxbYhwfwRMSeYbPkBHc27RLoqloM//XQ9UYWotTIffigqjs9ghKhMM+Is88yxixE5IDNBtJ+G5suu7mHtUUEt1seWggILx3UpB2F/F+le9wGXT78wiu93OxFdNZifU8BXTdYYHcm53KFe+rhBRoKXYZwRLnq0EVyozIg9FbZWw+JkLNlaQBNNCL3ZfORKibeBce2B/uDEsN5vS79g6HVanp0o/sxCiQDnrMBPQa+1KuzvB9dRF1D/YzuYeCOvSJT4AX+fl2IHwpHZ5hVE4K26CA== 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 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=q9wct6EEFEb7A4xLSHyl5ScXjsMYTfimhvIG3q9vHrY=; b=Lf46Wa3iXDRTJHlKU9brdaruQfWrsxt7YAYz5muOpF8Kgz3nx3purUDs4ri2u+anjke4W9jkpiJnjEeE8sfDLsds2+PIIgo2hiE5RExYKQnR2zzu5YB3WknhTYWn3+FSZVmrTpWZyl+o4TJm2IUI1mRPMLKV8SjwZ+dkmz8YpadOtt/jeZI469hiU/YKHFlmTN1wK4uM8fbi6cUsRrfrNKifjNZilHjCStxihlID30DBPxDYA79EqpcuYN/hhgEYQDNXmWtAfUYo8/+I7sOvyOcX8SI09lytFDfV66Nr/37bgLhb/Cvpq7tuQ0GaQHBROIBE56iaX34D58j+v0rhVw== Received: from MW4PR04CA0339.namprd04.prod.outlook.com (2603:10b6:303:8a::14) by BL1PR12MB5803.namprd12.prod.outlook.com (2603:10b6:208:393::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:16:26 +0000 Received: from MWH0EPF000989E8.namprd02.prod.outlook.com (2603:10b6:303:8a:cafe::1c) by MW4PR04CA0339.outlook.office365.com (2603:10b6:303:8a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27 via Frontend Transport; Tue, 8 Aug 2023 14:16:25 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000989E8.mail.protection.outlook.com (10.167.241.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:25 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 8 Aug 2023 07:16:13 -0700 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.986.37; Tue, 8 Aug 2023 07:16:10 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 14/17] selftests: forwarding: tc_flower_l2_miss: Fix failing test with old libnet Date: Tue, 8 Aug 2023 17:15:00 +0300 Message-ID: <20230808141503.4060661-15-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E8:EE_|BL1PR12MB5803:EE_ X-MS-Office365-Filtering-Correlation-Id: b84927d7-6613-4a13-5aef-08db981a0ceb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qEa4usc8tTyICHoT0rV1Ip9cLVGwmkyp5zTdLJQdQKx/lOdLxtyFI9DOoDi4WSkBVgM+TSGgpGSzVH1o/E4qK38zeydPVPP30EkZrw48uP2THCPZEyja8iADOQsh1/2LrUvgWkBAqTs1ALbWYblwjKrXp7izotQvYJUCEJzeAiBK4tyk5cCrZklzJHwoUtojtUeQ7kLNcbr991RZFj44H4AzyQgI8Wl6DbF2rUpJ3BhuBf9zVhh/X+Rng+IwA8oIdYd7SEpNIpl2BdNHwsEkbzxe6tNp+jF89Qa5opsTch7ClJtZY9zEvtkFR9fIFZ+HjKcwHMoXcZrG/sCW0HXq1PD5aTCDl8cr0t/qXuD5y4sxVlU86+KJYO3n/c2QHPMoUhzoD35CWrapLppBB1P+r/aoQEjTkG32UvCaapNbFTlFoKTSKwgat7iOoIR8K5NHGGkO12uM+X+/51jX3xX1Kn1HiE1IVrrnd/8P0dtiPzqxxKv7ZNuxdYO5CmzgwJ/B0mPlgkZwilpERGkM6yjHB/KPP66aMZ0G7ZmHoA8Es16DxwXeYQW7hQPro8UEXSdKdRPUEvnP2CgNlKBiLjIdiUyu2Xi+OeEgcBb9ycc/uO/hxFLfTJMG7F2p2lYayQzXunCfxX3M9q2620aS29Xb2b/cwnQU5XMkmp3mvHS5vN+K8LkjraA6IyUz+TdVaypRhky3HZS9neVhLwnViD/fVlVBnscrpgcdtfbGl2wDe9jnHCKdqhaW8cjBImIon1l5a0RXtRgCmCxLh03ORtbbCyup/ytLN8gsnSHi88NTtFw= 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:(13230028)(4636009)(376002)(396003)(39860400002)(346002)(136003)(451199021)(82310400008)(1800799003)(186006)(36840700001)(46966006)(40470700004)(40460700003)(82740400003)(336012)(86362001)(1076003)(26005)(83380400001)(16526019)(47076005)(2616005)(426003)(107886003)(356005)(36860700001)(7636003)(2906002)(478600001)(966005)(6666004)(54906003)(36756003)(40480700001)(70586007)(70206006)(5660300002)(8676002)(8936002)(41300700001)(4326008)(316002)(6916009);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:25.4817 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b84927d7-6613-4a13-5aef-08db981a0ceb 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: MWH0EPF000989E8.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5803 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org As explained in commit 8bcfb4ae4d97 ("selftests: forwarding: Fix failing tests with old libnet"), old versions of libnet (used by mausezahn) do not use the "SO_BINDTODEVICE" socket option. For IP unicast packets, this can be solved by prefixing mausezahn invocations with "ip vrf exec". However, IP multicast packets do not perform routing and simply egress the bound device, which does not exist in this case. Fix by specifying the source and destination MAC of the packet which will cause mausezahn to use a packet socket instead of an IP socket. Fixes: 8c33266ae26a ("selftests: forwarding: Add layer 2 miss test cases") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Tested-by: Mirsad Todorovac --- .../selftests/net/forwarding/tc_flower_l2_miss.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 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 e22c2d28b6eb..20a7cb7222b8 100755 --- a/tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh +++ b/tools/testing/selftests/net/forwarding/tc_flower_l2_miss.sh @@ -127,6 +127,7 @@ test_l2_miss_multicast_common() local proto=$1; shift local sip=$1; shift local dip=$1; shift + local dmac=$1; shift local mode=$1; shift local name=$1; shift @@ -142,7 +143,7 @@ test_l2_miss_multicast_common() action pass # Before adding MDB entry. - $MZ $mode $h1 -t ip -A $sip -B $dip -c 1 -p 100 -q + $MZ $mode $h1 -a own -b $dmac -t ip -A $sip -B $dip -c 1 -p 100 -q tc_check_packets "dev $swp2 egress" 101 1 check_err $? "Unregistered multicast filter was not hit before adding MDB entry" @@ -153,7 +154,7 @@ test_l2_miss_multicast_common() # Adding MDB entry. bridge mdb replace dev br1 port $swp2 grp $dip permanent - $MZ $mode $h1 -t ip -A $sip -B $dip -c 1 -p 100 -q + $MZ $mode $h1 -a own -b $dmac -t ip -A $sip -B $dip -c 1 -p 100 -q tc_check_packets "dev $swp2 egress" 101 1 check_err $? "Unregistered multicast filter was hit after adding MDB entry" @@ -164,7 +165,7 @@ test_l2_miss_multicast_common() # Deleting MDB entry. bridge mdb del dev br1 port $swp2 grp $dip - $MZ $mode $h1 -t ip -A $sip -B $dip -c 1 -p 100 -q + $MZ $mode $h1 -a own -b $dmac -t ip -A $sip -B $dip -c 1 -p 100 -q tc_check_packets "dev $swp2 egress" 101 2 check_err $? "Unregistered multicast filter was not hit after deleting MDB entry" @@ -183,10 +184,11 @@ test_l2_miss_multicast_ipv4() local proto="ipv4" local sip=192.0.2.1 local dip=239.1.1.1 + local dmac=01:00:5e:01:01:01 local mode="-4" local name="IPv4" - test_l2_miss_multicast_common $proto $sip $dip $mode $name + test_l2_miss_multicast_common $proto $sip $dip $dmac $mode $name } test_l2_miss_multicast_ipv6() @@ -194,10 +196,11 @@ test_l2_miss_multicast_ipv6() local proto="ipv6" local sip=2001:db8:1::1 local dip=ff0e::1 + local dmac=33:33:00:00:00:01 local mode="-6" local name="IPv6" - test_l2_miss_multicast_common $proto $sip $dip $mode $name + test_l2_miss_multicast_common $proto $sip $dip $dmac $mode $name } test_l2_miss_multicast() From patchwork Tue Aug 8 14:15:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346153 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 DF5BD1426E for ; Tue, 8 Aug 2023 15:42:23 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20601.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eae::601]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A00A46BD for ; Tue, 8 Aug 2023 08:42:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=H9SgD2RSx/9jp9f9tkL1c4zg4fVfWvMGQYkem52O5+i277q8HLTKgf4oHyZD2wYuj8pU+Ev6pMvhL3BjHr0q39jyjqz7w2R4WP5lRCNtMOOMVvRcXCogSs08mpaoUzorHofVt85FvpK990GBEBvy7AdO9y7cgMFbYNUUvoLjkkxMazAOhM7qFyxHl8cLpREO/E3QV2CcWFnWWeAD5vW6qdpXYGaTFICqMcASrFZjhoNWk5ZJjv+EtGrllp93EqzagYZ2fTffj2ydBfchZsdOf8juFn5gYDncnIXLWd+TnA6YWr93pBXqCuS8lMYDDyWcgeQCE/iNb5B9VF7nb8iLFQ== 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=Um/fADwQBmuOmmzS8/Tpu2zAh9/Wb9BF1IdjvIAIGaU=; b=RwQbNs1AbqsMf5T2YYlc/eAA5pSRD9DE/AR8O2koAGd3wzBl1rHGvCjgww3Edgzvrx4XOYrQ20Is0oHzDBVx3ARfmyQFtxKxU7h+3hwfHBBaYLQmlyeP8uqVJ8wjrw+G8OlKrSKz7ncFU/FIRF83s4RU3YBkCWYLoPESfqaJ/nSZihM2/hR9TQyIXd8oMU6IVb8BwoRBpe5vtBcnQmhIuLJOEFgyoTGhlI/pIpaqx1bRmhS8Gc8yTEtkhAbKhTiuYDYA/+WLJoHWDhaJlFw6A1c3CXW1uT/xTxWKhxXPITBURPm1CczidPiQIRqnfaa1XlyTk2vXQJ8izpQEZZ/Hdw== 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 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=Um/fADwQBmuOmmzS8/Tpu2zAh9/Wb9BF1IdjvIAIGaU=; b=Hb9JDVUUdaA7MW0nuM98maNr2d1w1w+UF/ErtozMdB9fWbDt2eSbuck9LvL9Pg359submnU+U/+2QGTjj5AFv3GgroXe5Afem9ki7IwTwW4ZyWpWHNx8egKuOSA9/PDboF2IxkItHMa5Ff9ZoVGIB+SxNqUYLXYiCa67DAuW7SpSqz9sqBwCzNzDwWHoNZDnHFCf1RUvyqERSzcUDWk6zBXZJZ/xCDmVcIEWuNpBDeEgfigatBOq0C0AzhOSQRKYn4Pzu4L2HCauXomCngOqM2BhYNJMgNaopCe+3FLmIvq1Jh6E1/sHnoCkSKJDpBQJ217XWLX88fPl7H4LcMV8Iw== Received: from SJ0PR05CA0143.namprd05.prod.outlook.com (2603:10b6:a03:33d::28) by SJ2PR12MB8925.namprd12.prod.outlook.com (2603:10b6:a03:542::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.20; Tue, 8 Aug 2023 14:16:28 +0000 Received: from MWH0EPF000989E6.namprd02.prod.outlook.com (2603:10b6:a03:33d:cafe::73) by SJ0PR05CA0143.outlook.office365.com (2603:10b6:a03:33d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.17 via Frontend Transport; Tue, 8 Aug 2023 14:16:28 +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.6652.20 via Frontend Transport; Tue, 8 Aug 2023 14:16:27 +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.5; Tue, 8 Aug 2023 07:16:15 -0700 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.986.37; Tue, 8 Aug 2023 07:16:13 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 15/17] selftests: forwarding: bridge_mdb: Fix failing test with old libnet Date: Tue, 8 Aug 2023 17:15:01 +0300 Message-ID: <20230808141503.4060661-16-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E6:EE_|SJ2PR12MB8925:EE_ X-MS-Office365-Filtering-Correlation-Id: f8c61740-565a-4cdf-117e-08db981a0e48 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6sNKShPt4lPaW6QCs+6+BoBlxOWKCFUSjlg/CXz9/5obu7roWD6BW9NWnkwRMW8xGEkWoag4cO7sMCgHbSSILO1zoqh+MCYEGMNkIojL9KOf9v9sXss04u/bdQrkbKolTe7aED/WN6rEiiwFHns+TtSvrLRebtzMAF0CBAgZoQqWGthAg11/Q0IJfl/8rXt1EnknNBT14CthAmCuyuOfBV4J5i259WakLm9g8MjELdOiBiqeaRyoSVm3jD4w+qhuQpGjJrMzmGG+43OaTehQRjiLhD5ZotjxlmN0Z0IJw/jliutKduU2fKoGb+1c4Mx2aTJMFowP+6MWgwQX4Hz6TaRRYD2VCTtiXDj3/DiypaLtzyTjoOasP9g/BvEgU5OJNelSVZaHqVA0U6pSkRSTmoNaTyWtoW4pAhvRpr97d+e2ChBx/636SMMOBIZMdFS2um3xhJCRXRVtM1bxOQECZO72y7SkbZFyoJ1SO3s7tIgc4/45xI7pXc70M3QU5kEIEAQQy7jTOpfiZgAlYRB5XwxRWlNhQCHPGAZ/n/L1JKgFRu5DF0QqLJTOdBMa61icofiweTM5fJOSzzZhccWgYItMW/nEE1TsQsFMDZT3+azGTo/w//VJnkIyfG3EBfW6q6X269oosfwTfSwXItr3JBqmJMn+lSh93aEt1cjslWIs7lDAJzG1Q4GV73BVuJ+kEfr4K/dITtjo9c38tDyjcDIqulbQpPCY4cFMHHqy95hyQUqPKhnBLORDuZDDjiVA0jqVTrSuKMvpjaa/CyVSfFGC2FM1pXhvMiMNcWi4ViY= 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:(13230028)(4636009)(39860400002)(376002)(136003)(346002)(396003)(1800799003)(186006)(82310400008)(451199021)(46966006)(40470700004)(36840700001)(4326008)(70586007)(36756003)(6916009)(2906002)(70206006)(478600001)(8936002)(8676002)(5660300002)(41300700001)(40460700003)(6666004)(316002)(36860700001)(40480700001)(54906003)(2616005)(82740400003)(356005)(86362001)(7636003)(966005)(26005)(1076003)(16526019)(336012)(107886003)(47076005)(83380400001)(66574015)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:27.8295 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f8c61740-565a-4cdf-117e-08db981a0e48 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: SJ2PR12MB8925 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org As explained in commit 8bcfb4ae4d97 ("selftests: forwarding: Fix failing tests with old libnet"), old versions of libnet (used by mausezahn) do not use the "SO_BINDTODEVICE" socket option. For IP unicast packets, this can be solved by prefixing mausezahn invocations with "ip vrf exec". However, IP multicast packets do not perform routing and simply egress the bound device, which does not exist in this case. Fix by specifying the source and destination MAC of the packet which will cause mausezahn to use a packet socket instead of an IP socket. Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Tested-by: Mirsad Todorovac --- .../selftests/net/forwarding/bridge_mdb.sh | 46 ++++++++++--------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh index 6f830b5f03c9..4853b8e4f8d3 100755 --- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh +++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh @@ -850,6 +850,7 @@ cfg_test() __fwd_test_host_ip() { local grp=$1; shift + local dmac=$1; shift local src=$1; shift local mode=$1; shift local name @@ -872,27 +873,27 @@ __fwd_test_host_ip() # Packet should only be flooded to multicast router ports when there is # no matching MDB entry. The bridge is not configured as a multicast # router port. - $MZ $mode $h1.10 -c 1 -p 128 -A $src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $src -B $grp -t udp -q tc_check_packets "dev br0 ingress" 1 0 check_err $? "Packet locally received after flood" # Install a regular port group entry and expect the packet to not be # locally received. bridge mdb add dev br0 port $swp2 grp $grp temp vid 10 - $MZ $mode $h1.10 -c 1 -p 128 -A $src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $src -B $grp -t udp -q tc_check_packets "dev br0 ingress" 1 0 check_err $? "Packet locally received after installing a regular entry" # Add a host entry and expect the packet to be locally received. bridge mdb add dev br0 port br0 grp $grp temp vid 10 - $MZ $mode $h1.10 -c 1 -p 128 -A $src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $src -B $grp -t udp -q tc_check_packets "dev br0 ingress" 1 1 check_err $? "Packet not locally received after adding a host entry" # Remove the host entry and expect the packet to not be locally # received. bridge mdb del dev br0 port br0 grp $grp vid 10 - $MZ $mode $h1.10 -c 1 -p 128 -A $src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $src -B $grp -t udp -q tc_check_packets "dev br0 ingress" 1 1 check_err $? "Packet locally received after removing a host entry" @@ -905,8 +906,8 @@ __fwd_test_host_ip() fwd_test_host_ip() { - __fwd_test_host_ip "239.1.1.1" "192.0.2.1" "-4" - __fwd_test_host_ip "ff0e::1" "2001:db8:1::1" "-6" + __fwd_test_host_ip "239.1.1.1" "01:00:5e:01:01:01" "192.0.2.1" "-4" + __fwd_test_host_ip "ff0e::1" "33:33:00:00:00:01" "2001:db8:1::1" "-6" } fwd_test_host_l2() @@ -966,6 +967,7 @@ fwd_test_host() __fwd_test_port_ip() { local grp=$1; shift + local dmac=$1; shift local valid_src=$1; shift local invalid_src=$1; shift local mode=$1; shift @@ -999,43 +1001,43 @@ __fwd_test_port_ip() vlan_ethtype $eth_type vlan_id 10 dst_ip $grp \ src_ip $invalid_src action drop - $MZ $mode $h1.10 -c 1 -p 128 -A $valid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $valid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 1 0 check_err $? "Packet from valid source received on H2 before adding entry" - $MZ $mode $h1.10 -c 1 -p 128 -A $invalid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $invalid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 2 0 check_err $? "Packet from invalid source received on H2 before adding entry" bridge mdb add dev br0 port $swp2 grp $grp vid 10 \ filter_mode $filter_mode source_list $src_list - $MZ $mode $h1.10 -c 1 -p 128 -A $valid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $valid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 1 1 check_err $? "Packet from valid source not received on H2 after adding entry" - $MZ $mode $h1.10 -c 1 -p 128 -A $invalid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $invalid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 2 0 check_err $? "Packet from invalid source received on H2 after adding entry" bridge mdb replace dev br0 port $swp2 grp $grp vid 10 \ filter_mode exclude - $MZ $mode $h1.10 -c 1 -p 128 -A $valid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $valid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 1 2 check_err $? "Packet from valid source not received on H2 after allowing all sources" - $MZ $mode $h1.10 -c 1 -p 128 -A $invalid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $invalid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 2 1 check_err $? "Packet from invalid source not received on H2 after allowing all sources" bridge mdb del dev br0 port $swp2 grp $grp vid 10 - $MZ $mode $h1.10 -c 1 -p 128 -A $valid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $valid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 1 2 check_err $? "Packet from valid source received on H2 after deleting entry" - $MZ $mode $h1.10 -c 1 -p 128 -A $invalid_src -B $grp -t udp -q + $MZ $mode $h1.10 -a own -b $dmac -c 1 -p 128 -A $invalid_src -B $grp -t udp -q tc_check_packets "dev $h2 ingress" 2 1 check_err $? "Packet from invalid source received on H2 after deleting entry" @@ -1047,11 +1049,11 @@ __fwd_test_port_ip() fwd_test_port_ip() { - __fwd_test_port_ip "239.1.1.1" "192.0.2.1" "192.0.2.2" "-4" "exclude" - __fwd_test_port_ip "ff0e::1" "2001:db8:1::1" "2001:db8:1::2" "-6" \ + __fwd_test_port_ip "239.1.1.1" "01:00:5e:01:01:01" "192.0.2.1" "192.0.2.2" "-4" "exclude" + __fwd_test_port_ip "ff0e::1" "33:33:00:00:00:01" "2001:db8:1::1" "2001:db8:1::2" "-6" \ "exclude" - __fwd_test_port_ip "239.1.1.1" "192.0.2.1" "192.0.2.2" "-4" "include" - __fwd_test_port_ip "ff0e::1" "2001:db8:1::1" "2001:db8:1::2" "-6" \ + __fwd_test_port_ip "239.1.1.1" "01:00:5e:01:01:01" "192.0.2.1" "192.0.2.2" "-4" "include" + __fwd_test_port_ip "ff0e::1" "33:33:00:00:00:01" "2001:db8:1::1" "2001:db8:1::2" "-6" \ "include" } @@ -1127,7 +1129,7 @@ ctrl_igmpv3_is_in_test() filter_mode include source_list 192.0.2.1 # IS_IN ( 192.0.2.2 ) - $MZ $h1.10 -c 1 -A 192.0.2.1 -B 239.1.1.1 \ + $MZ $h1.10 -c 1 -a own -b 01:00:5e:01:01:01 -A 192.0.2.1 -B 239.1.1.1 \ -t ip proto=2,p=$(igmpv3_is_in_get 239.1.1.1 192.0.2.2) -q bridge -d mdb show dev br0 vid 10 | grep 239.1.1.1 | grep -q 192.0.2.2 @@ -1140,7 +1142,7 @@ ctrl_igmpv3_is_in_test() filter_mode include source_list 192.0.2.1 # IS_IN ( 192.0.2.2 ) - $MZ $h1.10 -c 1 -A 192.0.2.1 -B 239.1.1.1 \ + $MZ $h1.10 -a own -b 01:00:5e:01:01:01 -c 1 -A 192.0.2.1 -B 239.1.1.1 \ -t ip proto=2,p=$(igmpv3_is_in_get 239.1.1.1 192.0.2.2) -q bridge -d mdb show dev br0 vid 10 | grep 239.1.1.1 | grep -v "src" | \ @@ -1167,7 +1169,7 @@ ctrl_mldv2_is_in_test() # IS_IN ( 2001:db8:1::2 ) local p=$(mldv2_is_in_get fe80::1 ff0e::1 2001:db8:1::2) - $MZ -6 $h1.10 -c 1 -A fe80::1 -B ff0e::1 \ + $MZ -6 $h1.10 -a own -b 33:33:00:00:00:01 -c 1 -A fe80::1 -B ff0e::1 \ -t ip hop=1,next=0,p="$p" -q bridge -d mdb show dev br0 vid 10 | grep ff0e::1 | \ @@ -1181,7 +1183,7 @@ ctrl_mldv2_is_in_test() filter_mode include source_list 2001:db8:1::1 # IS_IN ( 2001:db8:1::2 ) - $MZ -6 $h1.10 -c 1 -A fe80::1 -B ff0e::1 \ + $MZ -6 $h1.10 -a own -b 33:33:00:00:00:01 -c 1 -A fe80::1 -B ff0e::1 \ -t ip hop=1,next=0,p="$p" -q bridge -d mdb show dev br0 vid 10 | grep ff0e::1 | grep -v "src" | \ From patchwork Tue Aug 8 14:15:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346154 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 775CD1426A for ; Tue, 8 Aug 2023 15:42:29 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20624.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::624]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57B3949CB for ; Tue, 8 Aug 2023 08:42:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ze2t/nWbE518RinpzwFFV4qiLgfCQJ2PwBkI3vd2q1tPrYTblKyXF9Q0McGs1xQSQb7haPAlUXE4/uc7ZgyjcnCjM6V5TOz6UGgSaMECq+Aj3swUkm2WRzYCZEOPRBQeujv06MTGQNm4L0HFYWJ+WH8JiEYVJ588lneQOuuPXR9MRtWjqPMOGlcWujNYjxBe7nCuDJFeRKcOtM/dUZj1Co2K9wX49Q8sN6ltsseMKmOq22WVrPuryn45cmwZHaNI+0Df1e7wXGl7imQLS32v3U9yf1ZGZspp4JKpWm+XLMilTt14jAIkFUcVY8UyRnutIrLZjbDMyGqi7oY5O///Kw== 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=ehIchy6ee/mMpqzkQ1NMYacqJj0bAWFZqY+uFIqdo3Y=; b=dJQ726vyYpK3SUtByNYg+l+BXxNEARwuxBuyx+otFuPG0VqVZHU65u2XhWmXllJFgF3hAjv6q4EJY5t/A8AVyQsaqQBaqY1WZJ6i54szizUGkkKzKCEwAP3VajOWrpjjA9gBd9jQy1ql90tenUDjIH+jikXzE3bQKsSrTyyIbpMXtp1zI7swQeS3cA3vJPdZ2jmRh3V3tmELKo6LrrNUWyDhMmirWkJCJifXPDx+PKy+3VOGZ6yfKIKDshyu4t58eZaz6g3hXpUrSdkNvaULSIBKNyQ6FqYcveukJm4YwSTp09qLzPHu8QQS5TtumbhGUfYROH3XIpIqbwzsgBsFoQ== 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 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=ehIchy6ee/mMpqzkQ1NMYacqJj0bAWFZqY+uFIqdo3Y=; b=e6C9n6csbDx9b8GZcP6x2XC7lFSZZxMYs/cOcywpPCjr9JnxGbP3u/2Hvx4gZ76g5ZF0GQeFyy1oM9pL8FAt8XUthE83E+rik5ICWKmMhgQmGbkEvkDTeYQ+rJg1ikvIBowAiwM1cijfwspEF2FYOr50CJHJri720SFKskYWxRHWN1ErtxWTdG8zV+yLfH+vs2u9LRBTpUBlhzpgMYf+/khEHy/9YdUyNBd7yDEI1xY/8mhqiD2JlXx7cW/Tido8uBij1kHBbbGtzvY5Y1t71SIYXsMB4aMleXSQPCSXVGN4cLeGrre4zZw8fuUTa4aQsERByj5VAg6GbHfxkv/gAQ== Received: from SJ0PR05CA0141.namprd05.prod.outlook.com (2603:10b6:a03:33d::26) by SA1PR12MB7270.namprd12.prod.outlook.com (2603:10b6:806:2b9::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:16:30 +0000 Received: from MWH0EPF000989E6.namprd02.prod.outlook.com (2603:10b6:a03:33d:cafe::25) by SJ0PR05CA0141.outlook.office365.com (2603:10b6:a03:33d::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.17 via Frontend Transport; Tue, 8 Aug 2023 14:16:30 +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.6652.20 via Frontend Transport; Tue, 8 Aug 2023 14:16:29 +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.5; Tue, 8 Aug 2023 07:16:18 -0700 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.986.37; Tue, 8 Aug 2023 07:16:15 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 16/17] selftests: forwarding: bridge_mdb_max: Fix failing test with old libnet Date: Tue, 8 Aug 2023 17:15:02 +0300 Message-ID: <20230808141503.4060661-17-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989E6:EE_|SA1PR12MB7270:EE_ X-MS-Office365-Filtering-Correlation-Id: 1eb82e1c-7581-4c63-c80c-08db981a0f82 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C1kVoizVbEs8119VeloCrQ7Vt0+AD2wZIy7IW6gieihvKCVWIL+67BogcInHVzZ+woF27CuqdFIBRclM/CXhAPN9X6SKGsVAxB4Ddpi+mVgZA8jVkn4iQKde8HhPz73mD0maAg5jsUoco65PHM8CSiDeAYbiM/Y5dlgiVA9sJLPv0iYy6/JTI8c/gVpUKyJkz6OE/CNb852hSxLVhr/l15BZx6NfvllhPseTkvQIUpUmn+xZF9xsY6rhVoY3ao7xRmcojJAsWPAp6HKyIjEjABCf1rfhZUjLMMXhSluG0MclrNdgsEhOKM3v67F1X9fsC0AuNQjDoSRQ1SH/csrPSsFU66YcVx3b9hwsVEfKrPxi0xpCHkt7w4I84W8M6B0xYuNovq7/bIv9tfWJ4hUEDcEL+Yf7CSKMg+H/hRgqji+XmygosAGDzSqftCBZ4BnnrORh+dKVCWktTuJj9sSGNtPYN+bjtR8x0rjPJ8GsOB467Y1zfOioYaGbL1QDjo/ta+27nguFC3xPxbljvsgoBkN0W085ILdgJ4voX+itfXbDgHkjf0/IPZLcLjRGDvVzZqh/MUdwn0YQbOlSYm2i3s+mO6zRuIprT/E15kiacl2bIjrF7Pj0XB0xaErg9aJVfLev2ydJmeLJuup+ApOa4ghRbuIerE+9Ukix6woIBRe3Q26Op8V1x6wUj343ErrltAIn1OC2Cx5/abFbyHbZlBaklXo3zfNB+rsRvd1KUj4Dm/bxHFXHdl0qXCL9rnwI2OymxJjZa/7BuN5k4Z94ZAesGUlVwyoV3+cun4P4xU8= 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:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(451199021)(1800799003)(82310400008)(186006)(46966006)(36840700001)(40470700004)(40480700001)(2616005)(40460700003)(6666004)(966005)(86362001)(7636003)(478600001)(82740400003)(26005)(107886003)(36756003)(1076003)(41300700001)(356005)(316002)(5660300002)(8936002)(8676002)(2906002)(6916009)(4326008)(70206006)(16526019)(70586007)(54906003)(336012)(83380400001)(36860700001)(47076005)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:29.8920 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1eb82e1c-7581-4c63-c80c-08db981a0f82 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: SA1PR12MB7270 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org As explained in commit 8bcfb4ae4d97 ("selftests: forwarding: Fix failing tests with old libnet"), old versions of libnet (used by mausezahn) do not use the "SO_BINDTODEVICE" socket option. For IP unicast packets, this can be solved by prefixing mausezahn invocations with "ip vrf exec". However, IP multicast packets do not perform routing and simply egress the bound device, which does not exist in this case. Fix by specifying the source and destination MAC of the packet which will cause mausezahn to use a packet socket instead of an IP socket. Fixes: 3446dcd7df05 ("selftests: forwarding: bridge_mdb_max: Add a new selftest") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Tested-by: Mirsad Todorovac --- .../selftests/net/forwarding/bridge_mdb_max.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh index fa762b716288..3da9d93ab36f 100755 --- a/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh +++ b/tools/testing/selftests/net/forwarding/bridge_mdb_max.sh @@ -252,7 +252,8 @@ ctl4_entries_add() local IPs=$(seq -f 192.0.2.%g 1 $((n - 1))) local peer=$(locus_dev_peer $locus) local GRP=239.1.1.${grp} - $MZ $peer -c 1 -A 192.0.2.1 -B $GRP \ + local dmac=01:00:5e:01:01:$(printf "%02x" $grp) + $MZ $peer -a own -b $dmac -c 1 -A 192.0.2.1 -B $GRP \ -t ip proto=2,p=$(igmpv3_is_in_get $GRP $IPs) -q sleep 1 @@ -272,7 +273,8 @@ ctl4_entries_del() local peer=$(locus_dev_peer $locus) local GRP=239.1.1.${grp} - $MZ $peer -c 1 -A 192.0.2.1 -B 224.0.0.2 \ + local dmac=01:00:5e:00:00:02 + $MZ $peer -a own -b $dmac -c 1 -A 192.0.2.1 -B 224.0.0.2 \ -t ip proto=2,p=$(igmpv2_leave_get $GRP) -q sleep 1 ! bridge mdb show dev br0 | grep -q $GRP @@ -289,8 +291,10 @@ ctl6_entries_add() local peer=$(locus_dev_peer $locus) local SIP=fe80::1 local GRP=ff0e::${grp} + local dmac=33:33:00:00:00:$(printf "%02x" $grp) local p=$(mldv2_is_in_get $SIP $GRP $IPs) - $MZ -6 $peer -c 1 -A $SIP -B $GRP -t ip hop=1,next=0,p="$p" -q + $MZ -6 $peer -a own -b $dmac -c 1 -A $SIP -B $GRP \ + -t ip hop=1,next=0,p="$p" -q sleep 1 local nn=$(bridge mdb show dev br0 | grep $GRP | wc -l) @@ -310,8 +314,10 @@ ctl6_entries_del() local peer=$(locus_dev_peer $locus) local SIP=fe80::1 local GRP=ff0e::${grp} + local dmac=33:33:00:00:00:$(printf "%02x" $grp) local p=$(mldv1_done_get $SIP $GRP) - $MZ -6 $peer -c 1 -A $SIP -B $GRP -t ip hop=1,next=0,p="$p" -q + $MZ -6 $peer -a own -b $dmac -c 1 -A $SIP -B $GRP \ + -t ip hop=1,next=0,p="$p" -q sleep 1 ! bridge mdb show dev br0 | grep -q $GRP } From patchwork Tue Aug 8 14:15:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13346155 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 20D6F14AAB for ; Tue, 8 Aug 2023 15:42:50 +0000 (UTC) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060c.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::60c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2FADA1FD2 for ; Tue, 8 Aug 2023 08:42:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U025Sk+wABoqGlJHoi6Iu7mLBxLVxQkhVijpS6UqoPj5xo6oGPxag2f8QiGM7cr1lPLtu37SoAb9FDJ5cDu68ujZpfaHvdYH1bkY3PrX2WcCjLS21PQgc39f8if8X1xfPrIrtEAedvJ3vXxaUglbYceYqvSGEZV49yh4Pj+DtOul5NVPDDHZljQ9xaZ7GmiKVKgpzBP1i3/drvkA4ZpMJTNtpEHWO5VkiF1P4RKIa6/GEV2EtXJd19haxxHnRancgqOxiZwOtu1macolaJjFK/HNXpxD6+fYPNofvN0SHcah2FVDBc7uuWygWZ8hbY4vL1YImK9zCbRI/rHO/IxG1Q== 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=hY4LdH3HUJjXdfHMOCXvQlivPPQzWf2Vzu6e96uaQ48=; b=JewKV8dBu45v5hByJnRiCl7Fxi+EGf35xSDZASoYnhZWm7paBkfkuuVPeehOjt2CcXxuw5EyYvWQ+Zia58OZ5P9/nkz1RD6ufrKPuFmWFyIHEhkK8X99ytnrJK6GUtpeVKJo5LqXZ0F9Oqxw513fgOLKfmFDV7SDIrKuCy6croyUnK71p2z1peYTsFxzFy07GHJzM7Ce7/xXXoK+T5Fo5Ecp3vcpfuUZB7aKPrK+tpsLcsMwFbhaFHmY9mO9Cft8ZafmTrNpJ+SgSILUaeMS15qQDDBfYuWXoICp31e0OLthEqBfcOtXKnSUZ+T1z/FsQ1utez8bPdcB6gnfVW02NA== 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 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=hY4LdH3HUJjXdfHMOCXvQlivPPQzWf2Vzu6e96uaQ48=; b=eCa/htmDqvubF0gcgM3wADZRhFPIrDnSZaTcV1PyejMGLQ4zaViBYrF4XUp9ErSE6EUHFQd6fGat8TCN8vkKCO85NyN64qKbhlQAMJ6kd3pJCuamRI0iI+JsRJE7z69ZXvh/1x1tWPRAKfcnNjcwnCH0L4yo7GjENQepiUQ+K+JH/xlXcckFaPHIM/Lf0WBYJP8hl77tvvuzaaLyMvSkRI4sUDlVgo7DeLb4wxdNJ5Yx+gkwBaWcj69zVWJU2JrWYWz1NfK96a7WUYvdYVY6gROLpc+lGif/toNay7vR4LWUcMpYMxewS7GfYFuUcrDr9ooqL84NLPm/3EdpyhfXtw== Received: from MW4PR04CA0359.namprd04.prod.outlook.com (2603:10b6:303:8a::34) by CH2PR12MB4133.namprd12.prod.outlook.com (2603:10b6:610:7a::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.27; Tue, 8 Aug 2023 14:16:34 +0000 Received: from MWH0EPF000989EA.namprd02.prod.outlook.com (2603:10b6:303:8a:cafe::a4) by MW4PR04CA0359.outlook.office365.com (2603:10b6:303:8a::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.28 via Frontend Transport; Tue, 8 Aug 2023 14:16:34 +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 MWH0EPF000989EA.mail.protection.outlook.com (10.167.241.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Tue, 8 Aug 2023 14:16:34 +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.5; Tue, 8 Aug 2023 07:16:21 -0700 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.986.37; Tue, 8 Aug 2023 07:16:18 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net v2 17/17] selftests: forwarding: bridge_mdb: Make test more robust Date: Tue, 8 Aug 2023 17:15:03 +0300 Message-ID: <20230808141503.4060661-18-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230808141503.4060661-1-idosch@nvidia.com> References: <20230808141503.4060661-1-idosch@nvidia.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000989EA:EE_|CH2PR12MB4133:EE_ X-MS-Office365-Filtering-Correlation-Id: b01a41b2-ef83-4787-4ad2-08db981a1236 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hkMumO5Tzm+MmdFCO5FlANVk6Q5KA+kt+xBlOtalerMh2uM7nx1fvuAnqAPoCKZS5zlG/OkAwwSEmQBNAxwDfiy8cLRzsRRQHyGTOtuSRW/R99eRX4MvPco4W8WhP8h0vg+duNusZ5RV4+idaLda7mrlUS8OpbgiBWkZu2FxCmJqJtsyHL5APiym19XahIzqVZrjfR7pDG/h42Jgzp5Xxa8xk+sLtOV+Kgb8S0RsvaThJ9JLs1s30p6NuYtCznshrWj9fowjaN2z9yChttSRAlnHkXInDd+whNHHIOhLaOKe4iESc80RJgx4VblZuHGr2w3QSPxXEf349u6sG2dCUD3bi7btAicOul5rt7C3eEI0MMcG9LMGfDJKQM2MP+NFPA+SnjKJWXzZEZQFTwFYUknG1rbqz3U5JeTNXGvATBuEdKZ1GItVCILa7P3KP4QdJErjZkKcqCxH6lzfzslzU2bksEBwKN6d9vd8/24toFNwfXqhCRg+XYLxGRwUd3M4+4Auf0uZSNGEFT6llrrxo0IMUmLXbWPVXKckFzgSb8bkMhd857yNUfAUOSbMw/J7a4FKis5hnsthSvX9mARB9yE+Zs2aOjzSp7RI3CwZHvA4cRFE/QLwub2kJG+P6qZQ5JA8fTLbwlh1M/sy/hpdgD9712oFUFavz7zTw5lRhnrqGuT8qomp/Lryc1Mi45nltalMfYvN3/Du+HZIgGh6/iHZ10HC8MsCRLSNnYKLaAqI1x+ZmmsfD95b5aVLKF5ddRLAdvplhTPNrTCcbXvQYl43zP1LCS3Br3Q9VQygris= 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:(13230028)(4636009)(39860400002)(396003)(136003)(376002)(346002)(451199021)(82310400008)(1800799003)(186006)(46966006)(40470700004)(36840700001)(36860700001)(36756003)(86362001)(83380400001)(356005)(7636003)(82740400003)(40460700003)(40480700001)(6666004)(2906002)(966005)(336012)(1076003)(107886003)(26005)(16526019)(4326008)(41300700001)(316002)(70206006)(478600001)(6916009)(54906003)(5660300002)(47076005)(426003)(2616005)(8676002)(8936002)(70586007);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Aug 2023 14:16:34.3614 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b01a41b2-ef83-4787-4ad2-08db981a1236 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: MWH0EPF000989EA.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4133 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Patchwork-Delegate: kuba@kernel.org Some test cases check that the group timer is (or isn't) 0. Instead of grepping for "0.00" grep for " 0.00" as the former can also match "260.00" which is the default group membership interval. Fixes: b6d00da08610 ("selftests: forwarding: Add bridge MDB test") Reported-by: Mirsad Todorovac Closes: https://lore.kernel.org/netdev/adc5e40d-d040-a65e-eb26-edf47dac5b02@alu.unizg.hr/ Signed-off-by: Ido Schimmel Tested-by: Mirsad Todorovac --- tools/testing/selftests/net/forwarding/bridge_mdb.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh index 4853b8e4f8d3..d0c6c499d5da 100755 --- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh +++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh @@ -617,7 +617,7 @@ __cfg_test_port_ip_sg() grep -q "permanent" check_err $? "Entry not added as \"permanent\" when should" bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \ - grep -q "0.00" + grep -q " 0.00" check_err $? "\"permanent\" entry has a pending group timer" bridge mdb del dev br0 port $swp1 $grp_key vid 10 @@ -626,7 +626,7 @@ __cfg_test_port_ip_sg() grep -q "temp" check_err $? "Entry not added as \"temp\" when should" bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \ - grep -q "0.00" + grep -q " 0.00" check_fail $? "\"temp\" entry has an unpending group timer" bridge mdb del dev br0 port $swp1 $grp_key vid 10 @@ -659,7 +659,7 @@ __cfg_test_port_ip_sg() grep -q "permanent" check_err $? "Entry not marked as \"permanent\" after replace" bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \ - grep -q "0.00" + grep -q " 0.00" check_err $? "Entry has a pending group timer after replace" bridge mdb replace dev br0 port $swp1 $grp_key vid 10 temp @@ -667,7 +667,7 @@ __cfg_test_port_ip_sg() grep -q "temp" check_err $? "Entry not marked as \"temp\" after replace" bridge -d -s mdb show dev br0 vid 10 | grep "$grp_key" | \ - grep -q "0.00" + grep -q " 0.00" check_fail $? "Entry has an unpending group timer after replace" bridge mdb del dev br0 port $swp1 $grp_key vid 10