From patchwork Wed Aug 2 07:51: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: 13337794 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 94FCF539E for ; Wed, 2 Aug 2023 07:52:54 +0000 (UTC) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2055.outbound.protection.outlook.com [40.107.101.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7C0D3593 for ; Wed, 2 Aug 2023 00:52:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hqqIp9YJpd4HhhPuOb0/cIxhVpdLZYb5ogpYRRqd5TfuOVjNTgmBLbY7MmnDPdtWfrA7tnEgs6es+8NWQzsdyXJcOv4Ck08RRhq+xQO51g1LEKkHdskZZBQ05IFF2coN94sGVnK9O/WIy28xcre1kTgb46jFNjbx5LtHChUe0xOO+WcCwwPBNadP+u3pPSCrWx5fz1I1nRL67NfrJt15Q6kSGfrBQSAmeWa1z85C5ikrAbNfo7hBmkdhSTuZil850BCcXZdDyaOi9tqkoVF6OB4sfzhC/vnQmivkODDSOZdHyEyWxyMsWk7Xm5XOvWLc0lgBkxQDcSQUBY8RzM873w== 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=IiTq7OrPLkHY0CnaRCon7kgorGBMSaxWd2TygIG+Lf8CYcXo+9WObpkuzmBROaDo/BiS2NGjKXV4rQnIBqYkjc33pASSLan1eZF+cE8Klw+gXc27I3uofwuGQmNobPujkSxP/rCW0iICIZF561b6EGfRRrO2YM5bwalXcR3nDMqNjhUpHFN+ES+c+uKXAAzAxs/RxKXwy0WlLtoEfkBPtCa8ZFkQY6FGKhoLxSdPoSS621hQrAp+r6h3g0D55Xsd4qQT85jTMYqi+hXm8VS1dSi05w1lcJMe+Gqp2IErTxRKpQbJsxPZusM/FYbh6uoigJZTngmTNvPB/3UybmZIEQ== 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=gwgRqpdSL/ICEN4nx078sfEVZjEKcVeEXYdn9IGtlZ4=; b=khrs6pX3lhmn47rop9IZ42tH7QhVYtno+9CoSe87VvmQV1pxi+XkXNdgUVWEDwFM9bIPtloD1kRpMfEwYr8ayED5OATc3WMbbqVjPPNno87bcTFO9mtvGdj0Co3oaRuiX8lqn7mnujmLKENK7oBua6pQs1P3ZmGeO53X9uho9Gm+57w9WltiiBiBHyVfS4srT0ytK8cW3X2fIgoL42LRUw/5QvBCuxNagkdqz6Wp4+WuLlmHJhmxKJWmjeyLbySAowLyaQh6BtO1gh/srZhNzC/bSs4/UmGpN1dqQw2aU+tXJzhiyFY5kdJYjS6/cMsfL+gpjirp4dVOCTDh+QsfLg== Received: from CY5PR04CA0027.namprd04.prod.outlook.com (2603:10b6:930:1e::17) by PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:38 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:1e:cafe::1a) by CY5PR04CA0027.outlook.office365.com (2603:10b6:930:1e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45 via Frontend Transport; Wed, 2 Aug 2023 07:52:38 +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 CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:52:38 +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; Wed, 2 Aug 2023 00:52: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; Wed, 2 Aug 2023 00:52:18 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 01/17] selftests: forwarding: Skip test when no interfaces are specified Date: Wed, 2 Aug 2023 10:51:02 +0300 Message-ID: <20230802075118.409395-2-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|PH7PR12MB5685:EE_ X-MS-Office365-Filtering-Correlation-Id: 932d6379-867c-4b0b-573c-08db932d710b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AyFSl6B/ASMcl3neJN/Nm6/afoltK/GkoC1fU5AFwyPJ+lbkW/fs7rbcAM9LhtQYA4kvURo9Sh6wPyiFlEJSaF/bHX7tU9PGTPW23I+ooCTuD5Bij1DUhEs4uoS0eg+Aae14Fxn2NfDwURr6tOyL8GSTsf3RCaEWNXk016tviySrx2l4R4Ync6ZCsKIczT9JrfUJko9DDRQsQNiOjBzer6siBa1aHb5f1DSPBrnLDNlCydUzAQvDRhJzGLh7zwR7oLepUXiZ3ja6yBE1qb1IPpGv9SG2K/tiOmXq/QVG0rDW3nWLmghh+BEDbLALMLe1+dLhHNvjPuVd5j+uvC3m1zHsxa4CQkYOqWtevHARpgidpeVF2qug9HujMXLm3EVc5fRMeXzBs2AzFyYy+EzN3BDm6qDLJcm6v3K0VL/TKAlUmh3i3R+6Jt+Rwtq8YIoD15FWJOAAogDXu9Akn8/y1ba9F2UCUt5IGsOg+kJcz0U60ROKS9sXZxBRnd/fDi8AgxnzDCXqFqYFeRZsgJwSuEKJzqvTMsuiZO1X0c2UXgLJXozLGiYGt+bOxidKCuMMeZpnQQX96OwTLisVNP8JpGa6Qr0wiYWJcaiimMhNsO18QBkoNu2cBLmXIwhCnntH0GBiwK1XZv3epdeH3P5/jwO6eqmVtvPvtEKaSvB0MA6AbkncVG2+Qk8j0bPfHxqKpop2JOS8PZm26iGWXTRP+klS6YGRm7b9Cm0DRclCihu/G/Ut6TKDcWRmz1LjhfLFZce6tUjZZ/IOvNOsQLVqrg== 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)(396003)(346002)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(40480700001)(336012)(186003)(16526019)(40460700003)(2616005)(36756003)(966005)(316002)(86362001)(7636003)(478600001)(54906003)(70586007)(70206006)(6666004)(4326008)(6916009)(82740400003)(356005)(26005)(1076003)(41300700001)(107886003)(8936002)(8676002)(426003)(47076005)(83380400001)(36860700001)(5660300002)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:38.1030 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 932d6379-867c-4b0b-573c-08db932d710b 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: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5685 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51: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: 13337793 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 99605539E for ; Wed, 2 Aug 2023 07:52:53 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2078.outbound.protection.outlook.com [40.107.223.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 215DF3592 for ; Wed, 2 Aug 2023 00:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=epJC7sDK9nL1+DCSjwxl9emGBZ4zaAIB/MG+/5ZZ3DFt36oqjHO0KQdtSJyw21vcWWhwLAzJ1/OUQ6YdP2mM04bdXHKtjA9AEfDrzFtuiDJWGlVOgoJ39mH6ota1oSBbIqJz/aGrezqbKbGXXpocPLvPS9pp+d8gdwRuGF2AeZsMlaU4NY9SYT/ogx4B6lkJRTojTDcn/BIqY1waUBZ2Xx3NHy69P64V48sSKgpBX0wTAhz8hEqKr4mGMxJNXeh1qidjLx2IUEWSEIjZZjSvxkwDR0HQKD/G+KURF8zN3VE4GXuKOmZ7U5s097cnAIMW3bHXGwRv3C2Lba6ztUBotQ== 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=NgRKt+pbKp2RIS61sZiNNsexmqMFb1+qjb7nlbiBExA42yLg4ZxACVWXDlXhRBY/M+8OXBMB1DcY0HUWMRwvAIrt5T9YsttBDqC3qRvBK8Xe0FepsSqRGFiRdWKNXeUOlXlGLxbQ2yP2rbToSG6nJrlWRrz5kVLszkHP4Y3khM24Co7EqgMZv1TigTYKPJVXbLLQyuXH/O9K4Uo7d0qXCKTtMpOGx8tdX3MNIcVH6F81QRx6q7xXs6vaywWdKSufGMocrfw34MG90/qONZG3nU2T04V5408NETKTUETNsK0oQcDGCuxHELqFgttLI8R5W1dAUlkW9J5f/wkJJWtg0Q== 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=xZmsyxattMjLt/Gppiqx7yvwYdKp47rC94asz9Wwv0Y=; b=mawWK62doUGnwILYeQWCbJqla4U7N10/EW22VN7gCR45NxwNjFNEB4ifea6a7fpN9bewV4bGRLaLu6D9IMEPSH8NOMC0gLxU5ucO4z0jWIpvpkyMcqVq/cKssQHiegTxTIm374UAf+5gKbTyu6EbAhIm4fxDfIF15ObH4yXxYKp6on2ZHhcmVs+vJfDcE/2m4QzIiZ6ZydLXKlD8qFVAqYP78Io2ZdDGq5tkRKRr6nL1rcep9pDnvqKWgL0wn1ibRxNvvG7tlHEZafrPHrH6PjXqP5oO3i7EGx4k6HGvwnd/o4uwG3R0uLyg6xEEJB4YDG7O2szBk5tke+qOYhdK+Q== Received: from BY3PR05CA0012.namprd05.prod.outlook.com (2603:10b6:a03:254::17) by DS0PR12MB6607.namprd12.prod.outlook.com (2603:10b6:8:d1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:36 +0000 Received: from MWH0EPF000971E2.namprd02.prod.outlook.com (2603:10b6:a03:254:cafe::e2) by BY3PR05CA0012.outlook.office365.com (2603:10b6:a03:254::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.18 via Frontend Transport; Wed, 2 Aug 2023 07:52:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E2.mail.protection.outlook.com (10.167.243.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Wed, 2 Aug 2023 07:52:35 +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; Wed, 2 Aug 2023 00:52:23 -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; Wed, 2 Aug 2023 00:52:21 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 02/17] selftests: forwarding: Switch off timeout Date: Wed, 2 Aug 2023 10:51:03 +0300 Message-ID: <20230802075118.409395-3-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E2:EE_|DS0PR12MB6607:EE_ X-MS-Office365-Filtering-Correlation-Id: da76e8dc-3cc7-4571-302e-08db932d6fbd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iF80wxx0crEpSVzrGKGjDG0SNeZg7legJa0q0gb+u3RVMWWIn2e/9j6rC5g3ra42JTk4RZLMtykDiAVy62buFa8YZWys+6WvaiVjaLYaiyrFXGzZ72h1XahwKhx4cf7owQ/gPeLcx1PKju/Vv4LqV/uUZIHMh0zqzyewvKa32FZnN4lIZTJqn+HLEe0Q6AWz6LU0Ct5wtcnAtKlOdwLjk4lCtgbDNb9guJDVohDvNYh8ri1QC4mRC+y5Mn1i/tNav5oADGm0b1NhVDf75UKylC5qLKu1itg7gpcGX+UzGbipdqZqwvhE0vxXk0vR5rJ2zl6cER/A0YJBll8n3VmkIFGsQnzr3deXHu1/O3FXEb0qtQdAdnH5ztm2Q6iGf8A1/4CR7qveR/XX1rwTJ1yhA3OxVrl6GiReI95pR+klvMghxQt1O8kY17S5f6JDt/hKAZh0l+ow06BMzhglQCsSMAErHc/a6YR2xXEl6sTC2dak/4JqaRaCfEEbm4f0Egi5PnHzk66TPaXL/1/UgI65sXvaglFw87JqNK9P6Y9KAukaQ+OISZS4ZgS/22rTxYDmhPCmLXbPsZrZ2zbP7wa6ulKCakinQbSC4w/rT2kYEkazRRRwG5BtQnii09DxdommOuUDVugLX2hXAFaa5L6rBfCHBZg8WuBUTl0VdDtp1/3ShlUI5lFghyJxENg29qCTxAPthyfrVUqEIOLig5CD4XbVCwml6drKGOxMlLbYpMJGDg0AaANxFNUhx6jIyVLgySlYxPpY92hxVWo23hUNS7gz36YZGSkWX9maP0I+w2k= 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)(346002)(39860400002)(376002)(82310400008)(451199021)(46966006)(36840700001)(40470700004)(6916009)(4326008)(40460700003)(70586007)(70206006)(2906002)(426003)(2616005)(82740400003)(356005)(7636003)(16526019)(336012)(186003)(1076003)(26005)(83380400001)(47076005)(36860700001)(54906003)(40480700001)(86362001)(107886003)(36756003)(478600001)(966005)(6666004)(41300700001)(8936002)(8676002)(5660300002)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:35.9756 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da76e8dc-3cc7-4571-302e-08db932d6fbd X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E2.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6607 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337795 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 29DBF5663 for ; Wed, 2 Aug 2023 07:52:56 +0000 (UTC) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2061f.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::61f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B27D810C7 for ; Wed, 2 Aug 2023 00:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LBjrAPqY+8ALSXAc17qHr+4YaruUR4zevgVDtCi4QIktOKY+SPZ22CBImvJPx9ynr5v8sqF5FHrixHlqMzpuyOST4K9NYYfMh8tcJ4Iubf6WyCVzRxUg/no8b9h4VoohCJcawCw9GcqioWjSiPwNwg46nUCML6B1fT1dnm5pLZiOyWP5FWzNy+74SOXVRtf9oWjlD+91g0QtyxFtjH5e4ULTUxXqvxEEzsrKajygFuz5e6YwgZKZRidd5TgfqpIeoEnUajq0d/QSd3ARNheYdyhtvUayftWHx2tfjQxLyE/y6mMt7ODiN0kMOXELvS9sLxD92y2gLf5BSpPlziGn9Q== 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=SRtP5k+rUIa7IG/Zip8ayylFjbR0ZPViG8qlx6EZjQd2AeASnnBuovTAcysk3S8aPhJo7Jc2wkrTrZyqTSpZQtxknpfwmD1u5zWt//hpZ33goA46yXzLKWEIHQQhBwBz9/dmB/GvqFTD35WkGh8e/nv0W08U+rz651vHGs7TGQKAAIGE7l4YmpAIBtIGAck4K6e1beHdZ6kcC+ucF97zFsYw2hchq3BJr7tbm49C8Mtm85BkGNZOQdxgQMvRVj8sdTvHPBQgwc1FR1WktVLYgyu6MUQHGoHa7Hk13HCm64AWmORBcDCdtpo3+2Tp+vFmbJEQsIFDbOuUVHwRNwgqtg== 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=eueLGk0RhrCOosWXR1wN2r8+GscuwDPOVVgs5RLAhu0=; b=uVbDWQwDHaw82FVAzJYAFqxrvDuqy1HORQWZ/lWoFfl28ZxFHukXayLbxWHjuaQ06MgUXvgvv/qGhdPawewACJylB1Au0vNv5MW63lymoxfDwP/zD4wcm2zgXovqgjph5jYjnfCTcHKAnx9Fi7hGOTmwJUwjnNwgDDiRLK27b0V2f+RAFkGxh92UR/yu+MqAQHp4qiR1o3bPFYd/1jb60OXLQumrJQ1ULFdURHerXC55rKoSwVVUFvwJPtldb0zcDifo7lhbnI3mxhVxIdeGWIW1QeaeUFlzeBuQmeDv2+60HhOefGmJDsc/uASNboxNBvkvcSHHGQuiuoVg8NVlVA== Received: from MW4P220CA0007.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::12) by MW4PR12MB7482.namprd12.prod.outlook.com (2603:10b6:303:212::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:39 +0000 Received: from MWH0EPF000971E6.namprd02.prod.outlook.com (2603:10b6:303:115:cafe::76) by MW4P220CA0007.outlook.office365.com (2603:10b6:303:115::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Wed, 2 Aug 2023 07:52:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E6.mail.protection.outlook.com (10.167.243.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Wed, 2 Aug 2023 07:52:39 +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; Wed, 2 Aug 2023 00:52:26 -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; Wed, 2 Aug 2023 00:52:24 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 03/17] selftests: forwarding: bridge_mdb: Check iproute2 version Date: Wed, 2 Aug 2023 10:51:04 +0300 Message-ID: <20230802075118.409395-4-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E6:EE_|MW4PR12MB7482:EE_ X-MS-Office365-Filtering-Correlation-Id: ad8e58c1-9ae3-421f-f99b-08db932d71ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xRzylU22J+GE55ElSXDnxM74oT612op8uhFxMOptLk6X6sy/82yTaVvVYA1pLSwzrvPzq/cg9CAI62US4vU0PcnlH72ep8JZGAjpE/aB0rcQHvjU1WcVfZxWjAg2YQF/1lz8VYgXtpum8gKL/oDUUHfn/b6raVjp4dPhryJJ6p/Q0BXin+j10xrTzT8KEtdtNXcWVbcUF0opmIEWyEIa4VGSYtUqAtOCjHvB48TqCDe0ZnI5dv5ZXhjfFfeEMUK7eafoB23ZGez44crQiTlKmaP5iXcczPFtj2jlFbM6qk5zqw75GQeLSX9qpnJnMOM+MO7DOQkc9AIyg0hVJGfxbQ5zY3y4wT2lwllYoRwaSo1JfY9L5inOxyiMKxkYCYQCfCZN07u89onb5+1KhbNxzzY8cFH0NvEXUvSr6THRD264J9mEfCzNRQ6B3U65tK029STq+gdjyq3CrPY2m8ccV1iqoma19ShxuaZNzCZfx9Gr9bzlmglMcThb5XYsoYyNVPXZBV/OYIMyfk85GyDqmeaC66tVbF2v8jMdWSsM7WAAQwAhyh2pGod2I+DWffJeF9Qc0zh3XGp88Rl2drMf1ve8xJxHr/tjlxLoUi50xQFoCsIiv2kIOw8jXy7fWPU2GCUSblic7nYNxYUznRSUb12KO1OxRqeO1aTgCZpkU/IMa0Ul1Uln4tEqdRwvPr5yP5udQF41AOoutvmnC1DeEQkwWKTsCIpeZl1AJyDt7nALz1Xy705YVekLJCg1mahuA9jOzPo5K9hMLNHUu/3jIgeFldXQofvPH+i26c1lErU= 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)(376002)(136003)(396003)(346002)(82310400008)(451199021)(46966006)(40470700004)(36840700001)(40480700001)(336012)(16526019)(40460700003)(2616005)(186003)(966005)(316002)(86362001)(478600001)(7636003)(54906003)(70586007)(70206006)(6666004)(356005)(6916009)(4326008)(82740400003)(36756003)(41300700001)(26005)(107886003)(426003)(8676002)(5660300002)(8936002)(47076005)(1076003)(2906002)(36860700001)(83380400001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:39.6352 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad8e58c1-9ae3-421f-f99b-08db932d71ed X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7482 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,T_SCC_BODY_TEXT_LINE, 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 Wed Aug 2 07:51:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337796 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 865BE5677 for ; Wed, 2 Aug 2023 07:52:56 +0000 (UTC) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7ea9::61b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B7C52728 for ; Wed, 2 Aug 2023 00:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JcumXyvyg2Jo3dz9bi5zjV+0aFJfHh2jS2/TKNbs48gvrngKVEpPOq7UUK6nY2WOb1S1wmq8zWRG5DXs7FJf1hNGMniwnu1eUbdWcymWHkvyYFu3O1vzAEQVuRdzFWhW2r4rGKQ3Y2fR3aifxLEyVqdLQ91EQoWihHyYQJb/PFrr6oVyM/aFHKruBkjT+TQlLxt1FL2V2lrgwNpzzOFEE/HoR1s/5cLTWlFLmMR7N0wPKf+yzL8WA8nErMXo4LFsXaadehgs+jp4vwAx9yp8mbIzu3JvLm9EkWLIjdjVrhoHD1pnH+KBajjjDxgdSFdfqqH/r8/NK9G9BUOsDiPx0Q== 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=O8876uf8pMa16t8e28Rj+M4BvGOJRv24XAla88m4XpkIHNcUqGJ7KHAOlnTnIUU68DaRc2Wg/X+1UGKooIB583YCtihshnsrdfFBBW8UtvGube0eT4Rp0CsAIXsU61YzCdXC6r4g4QDbvpEHueR7njcjv+yy/KVFjbgLpZ3ZTDzPuJm3NSWF5756fJ8fvrzSQJfxWelhEahJaHNIuKRWkDSa2giWPBiYjTvef43hYyatuRY3W4gLwL9MGeLMmieUa3tyaQVFUe64C292mEtL84MO32pAFhDusnsia00AXlixodrtoRl1Ze/UhJVVTwYbASKHXTsNGf8wuWW8RUZlpQ== 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=fwui4V6lny4hCaRSO1eoaMDqsw09Kd3jVkz9hjfp4NHcDQTtNs87ow2XAiE5LmX1AHtER2yUMNC9XCdvF9DcW0wt3GOdspjipLctsoX9dZffU0X/nTGQcU/SY3NU/F3elrv97g9ijWYH3q9FWNQTzMAchxcxSvj3YbfU2xYOW08CUI5MwKUnIHrlYWptNr91RlEA9EO/75JAzU+7ZQTNYJHVyMHl//uJe28DpQCI8ypmklAIAI0qQwoZXEP2yX85Fq621BFzo7w67fcIGwkiuK19mKZ8UTQoIYfAdapn3Bv7m4fb23EHcb3BFlXtIixid29kOp/QfUsoulj4+fO7Bg== Received: from MW4P220CA0022.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::27) by CY8PR12MB7414.namprd12.prod.outlook.com (2603:10b6:930:5e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:41 +0000 Received: from MWH0EPF000971E6.namprd02.prod.outlook.com (2603:10b6:303:115:cafe::bc) by MW4P220CA0022.outlook.office365.com (2603:10b6:303:115::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:52:41 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E6.mail.protection.outlook.com (10.167.243.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Wed, 2 Aug 2023 07:52:41 +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; Wed, 2 Aug 2023 00:52:29 -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; Wed, 2 Aug 2023 00:52:26 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 04/17] selftests: forwarding: bridge_mdb_max: Check iproute2 version Date: Wed, 2 Aug 2023 10:51:05 +0300 Message-ID: <20230802075118.409395-5-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E6:EE_|CY8PR12MB7414:EE_ X-MS-Office365-Filtering-Correlation-Id: 3add8578-32b8-4037-77a2-08db932d72ef X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xoVgxqsDtMKVMRtdKCoyyTOGGndh5SKdcOCfnaATBNOkfVjqfQW4A2l59L4t7QPS/XV+ip37rQcPkmaWmsnTS96FyzZpO78zSxt2rbm0bVpw9Flg5iNVtI1N+S9xEe14ScOT1ADbs7vUWpn4gVD6l/Rdn5qPslvZI0PnAD2ooTNFEqOYuNxBhEnJTwmnIddnbZuN5z7SQRUVsgCfGYMPNpBsCtFv84MW3h6psNsWJ6ko/9cvPYXAGGTMP7vqTkoosEQwITPEKDpHkve8aOggZtH85biJskGQ91XWG2b3sq7rFzcHRJyZpzCGSagTc9EyCLxROHApY6i0OPuxMSjdMmv3Mn4n3onyNFoznSXGQJW40TZu/LvN13imzk6pLhsVXrwFWSDKpQVl4MgsmV3A/AKJZvT25H52Kn4+K3cb/Ahte3uybcEp9i98+cSKzWWO7YP89N1h10uN1CMEU2I/kOwGSDnRcoiPw7wR/t9IgyusrKenHRXK/Y5AVHXVMqHMo5GJOCmlkwE7YZUS5EveZN74Vxlo43AiSm+AoJRWGe3SvArx+IXyI+p+vh/jtMElIF+/KQDnGgB6tTis55CvQ+7LdUmGlAiPOvK2K91T59zo6UfkMvb1FJIfmzT9qTDOGhUeuc7SgoWHWe8QQa1xvW+UyXSUVSmSKgd7v4Rq05zgIhQbwpIryD+gnWlod6gHbeIDsgM28AhlEdHCsI1FjVVsc8oP8hTY0q6JPzR9GY8ybUjvYNEyATzyZX4l5ENebWhV/nODjyTnkn9wRrOHMM4y0GRZvMFBxwKbk2rh6e0= 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)(39860400002)(346002)(396003)(376002)(451199021)(82310400008)(36840700001)(46966006)(40470700004)(2616005)(5660300002)(426003)(8936002)(186003)(336012)(16526019)(36860700001)(8676002)(47076005)(83380400001)(478600001)(26005)(70586007)(70206006)(4326008)(54906003)(6916009)(316002)(107886003)(6666004)(41300700001)(966005)(86362001)(1076003)(40480700001)(36756003)(40460700003)(2906002)(356005)(7636003)(82740400003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:41.3227 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3add8578-32b8-4037-77a2-08db932d72ef X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7414 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,T_SCC_BODY_TEXT_LINE, 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 Wed Aug 2 07:51:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337797 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 2C1D15677 for ; Wed, 2 Aug 2023 07:52:59 +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 724E55273 for ; Wed, 2 Aug 2023 00:52:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B/fcZ0RU223gt/kjFlL/2yUwoM7P0pQLmgTHmCeiUg37dcFOrCmcQBlAroQvZPC8BHWz+VxvQ1mbCEHfGhRWiuK9BYYEyUdJKLBuPLSVQ3Ls6Uq6t/l1Ivo6a7A0Wf5ggl0cr3xPHtdTAKz4m+XUOryxMHs3lG81Jv2L+Q9xWoZZsKmqhr5BHvPnwl96TgOP2tqE8Dpo4qxCLXSvlsFlBkLg1hP85hS2zKB5GN25l3mkVtyCuX9ramkIwYwcmFIx+4vuomg9RrBxQC8+DJ60R1wTahX8xNPQW3mlUZf6niPF4d2Zr12H0m+hTdmttIfLonwsxSWbz4g7Cwdnc/FbkA== 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=VfGeVf94WK7EJjzYIz2GDYIpXpkj7x2Gxgp9s3t0A3EekONh6m5dRe5tVeFG/qsFToEaAAb1a2SFs2thGx6FgurOhPeu+UqV2ndhwtYf34+4OF+zJQv+p6kQ0GZa87TV0YKTDy7L7YEj01b/RWY+q7Sw9815JERBbmuO0LNrhQA4YfswG8T+AsFMeL9uWe9tjNkypHoy+8PY9OoYT3MyyLIl5SpC3MFQT6H73N0Zcbx7IF+gD5dyFV2Nr4W50z8yF3BskE71tyf06mevhd+4V/CMYfHW4LEuAJAwsLJZehgSq8tqi2NmS4QSivsfvYsEsenp7Hvmyc5ed050eMO67g== 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=RwU3f+N9b5nV8MPxjZtiLiaVFRsGuNbhCFtY0adCYmn/nEPmW9jtZqecfrA8x3Pyrw1B34RV8euNMpoDSkEu9kzVip0ezugK8B9Gx7Z1bHmOrXOq5ioV93pU6WySWSDZygWM7B9/ZGIEwJCRjDZ4SnZfzhioEIj8iBXaH6lBEM1UQXzfus6CfafTCwvVbVd1/G4Xfqt4SY52J7eLGXcaji915cIc5SzTi2oSNMXCPEqnudBIJVd2qbfnEel/3sJYh6m0CUOEgcvFazU9n/r9z+4LOoalnuQ+TXnS/R0YQGg/wIw06gQ6TSAC3X1dyhBT1o5QgFvNpwl9QgNOJ3gH1A== Received: from MW4P220CA0024.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::29) by IA1PR12MB8555.namprd12.prod.outlook.com (2603:10b6:208:44f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:45 +0000 Received: from MWH0EPF000971E6.namprd02.prod.outlook.com (2603:10b6:303:115:cafe::55) by MW4P220CA0024.outlook.office365.com (2603:10b6:303:115::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Wed, 2 Aug 2023 07:52:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E6.mail.protection.outlook.com (10.167.243.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Wed, 2 Aug 2023 07:52:45 +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; Wed, 2 Aug 2023 00:52:32 -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; Wed, 2 Aug 2023 00:52:29 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net 05/17] selftests: forwarding: Set default IPv6 traceroute utility Date: Wed, 2 Aug 2023 10:51:06 +0300 Message-ID: <20230802075118.409395-6-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E6:EE_|IA1PR12MB8555:EE_ X-MS-Office365-Filtering-Correlation-Id: 68bca429-6faa-43c0-7168-08db932d7530 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vu3H76xd+ywzNKkbEaexjX/+XRJmJWnFI+J4zOEaHcotcWrfPPNqXvlX3t1f8sETKtMopU59+hQ1DijLWJRvVgYwPemZ+NyBLl3OtgFss5zvh43ONY9xCBDz4fk/hUb61WkhgMdZKu2ScOr2hwOzpYh7Rvdiun4howJol0/aigtK9PemcvM9mxMEw8Bf/kqVAO4c8IPsDHNQOpveRwZgUEIMqhLYbBqiC8Z5QfOBRYEXrq9GuCUvLcljqGRvaTPzvO2B4FbOnejbw5XX/JQ4nEJh2DVq7oreDaej7TM5jmbQc6TXqmFw/yitA7yM5ByBPfTm/DGDnRExQXxvDr7lHkek8kHKZSNtt9ocrHxsa+eCe45Ie9gimoROXJigZCTtZaWyTIpIMINHFJRXx65I4BwPPJi1bCWif0qyf65vaKaa/zlV6wYJpaWBk9sXY9FjLVl7sp0jvNdRbe38dIxxF82FATZCWu4JYRpRW6bQNtW6JRSNEj2URPPob5OHsnFU56K+HPTjV9bhSW6JglDJnQ9nY6nXtyi7LrDeWvLOxmApPki+VcBxPlR3AbTn9jiErIVn2n1ph+h3k407OzFk5R17h+Shbt6ZO5Oez7voklJsJBMHta297BnedH0W9aGBlW/XBlYLlj3FK77AO8l098lo9TaDUDKkwjRKlL97fQXUjsu+io8opC+gVXQfIWNH96ZeiytT0CTHmqBMSKs69bwviMSrh9Mhb0swGIM2nOshjD+o1yLBGAi0VtfzX58U7Kv/l7W1ptCYMzb3dKKKkQ== 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)(396003)(39860400002)(346002)(376002)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(26005)(1076003)(7636003)(356005)(16526019)(82740400003)(336012)(186003)(426003)(2616005)(36860700001)(83380400001)(47076005)(36756003)(2906002)(5660300002)(8676002)(40460700003)(478600001)(8936002)(54906003)(86362001)(966005)(40480700001)(6666004)(316002)(41300700001)(70206006)(70586007)(4326008)(6916009);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:45.1040 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 68bca429-6faa-43c0-7168-08db932d7530 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8555 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,T_SCC_BODY_TEXT_LINE, 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 Wed Aug 2 07:51:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337798 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 48D0B5677 for ; Wed, 2 Aug 2023 07:53:07 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2049.outbound.protection.outlook.com [40.107.223.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 707B93ABF for ; Wed, 2 Aug 2023 00:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZjzSOChzQuPYQOlRfv4Ueq6OJmfxVMJr7cR4QG40Wp1kWgP62bOPJzyCMMpct/EuPpWM345X5bfrdbsR0CbRjpJVkWK6RjUcnxYmxKk7LRKKZOl6Ydhp8gH5y9gSfa2UeLUEtS8zx3nY1EWxmmtk4zRk/hf94qiCZ/I7RSa9hrJI1/ROewp9K03LQiFdZrRQBDDEpzSaLQhOiSJgLdWQyZAlEpsCqiMR+6MxXN2SB3AUj3WqrKLM93xiSA23LrncKr2HFAZ+pXFilkZBxcViI03S55Sy+1JVN0wrTkVYnQjTFBfK+G2+SfzoZWn5jgaNVCTocSlFzoHtoUAyFU1fKw== 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=m/Co2v6fjON7gyf+VRgojz2/owftjhaSDkX00QHHeCVescdR5aDVzYv3SlaE95bd8Fx7XZJYT2OE6R+gKPc5InGcIB6VaBsZgvjSz+eRvEVybc4KG80ys7Ul2kN0imqEyDpvkf3boHcKCbxTgdN3gKjIy75dWVgrRxa0FVlSPS+qXHqhZUNwrzCFgf5ETDGwheHChE00VO2I96Ilm8IiLcOAHV67nqXGr9YSeKm9YgNBhB7c1Wf8JT9RUXdTP2aIPVcol1bdR078Zwqldev+1BjyLg9a4PB2KHka1ZeEVtEEREkaonEaPXMugLJG0qlS6WUSNfVKf/CdA+EBKAtdzw== 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=eRLomG0JL7nPaZaT8JxYmMiQkKDpxZWMvpBNX68XX/OCQrw2AiTAk7yt4e47gT1UmNkHA7oqogccv+Z3INTbjJJvc9SB5vRogEnrBjupa76apDWUiekMalEMTQl7bEtzyWkZ53h6Utsmwo/CV5otgK6686HB4s4ZC7u4NmtL5i9K84uB08QbZmHEvPyLbHpxQl+LczuJsN/oOH4dZELRR4NtyJlW8Yq2ZhYk2FjJE9ukW2hBt9vtybGLMs9swah8BsP7fFHxYfxiOaehPtw7uQT5OlBNNnV9EYPxtLo9kk8tv3fBvpGjRxQaZI6ZbRa0mfhRv94ZyfBIEVwkElk6iw== Received: from CY5PR04CA0021.namprd04.prod.outlook.com (2603:10b6:930:1e::12) by MN0PR12MB5978.namprd12.prod.outlook.com (2603:10b6:208:37d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:53 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:1e:cafe::7) by CY5PR04CA0021.outlook.office365.com (2603:10b6:930:1e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Wed, 2 Aug 2023 07:52:52 +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 CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:52:52 +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; Wed, 2 Aug 2023 00:52: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; Wed, 2 Aug 2023 00:52:33 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 06/17] selftests: forwarding: Add a helper to skip test when using veth pairs Date: Wed, 2 Aug 2023 10:51:07 +0300 Message-ID: <20230802075118.409395-7-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|MN0PR12MB5978:EE_ X-MS-Office365-Filtering-Correlation-Id: 77d1ab47-bb70-4a92-1981-08db932d79ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C/W0+MWwEWdZgy/Ayxk/dVYAK3G3Ukuf9UGlPUGpmsbyxwkmNCNu9BHZRZfVwUCTXnXP4kv3r9R+XsfmpH2sfpfoAbv1JIXqEk8E5zA95+Sirs9eKNTg2peXl/lW/juL+ZrnJ4lJdrVNA0WoruHP4SuUe+A+KjYi/y9to7ptu0ligHL/ULsFC7JuHPv7yyRXieSIld7SOmGk039TTqdLwvEwUqYz805vr+1hGtCEEH/w7mpnz4AR0iWFeHu8b6HkLHsHvPn6QUkQxS2MLOz6U6oa8+uReN4Lp7E39sYJD7+p+eIKNxgUwhhHHTzHj3JPYeB16u8xSAhYVgM3DcynSVYBywr2OqpnLpo3YUgOGIsQ5MxT448My0M1BQaLobSKZhZMIdyP6SW6VpNom+rccTPxeDYzQbwQNYcPeerQW33P/8vi6zVrroKi8zioOErqBuP9ZUKMq40r96LH8CAFEDsfxEWB3LFFYjTuuzFq7vYEqDG81Y3JYQ07zBrXCkmbZAa3rqUXCvyCAyyCNNvcBvUwn/jK0pPAfCvotvn61KYeBQjtMYAN2MigQVE6FBnGQf9JRsDbc1DinI8kY54jJYE+tYzfkNYK1HDS0CXRpsMHanbFdSfqSYsv1btIvSsbpVD371ZUVyXMpFY6u2pljDOwVNPUjArgsqy2QiuGtxoRoHFMrdVWyKfiv9snDbvkIHwQixWIMzSFoU07QgQ+ooPY9SRlHB6Qfwk2aRHx6ZcDOq2nj7Bhzjs31V+uBhPT 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)(396003)(346002)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(40480700001)(336012)(186003)(16526019)(40460700003)(2616005)(36756003)(316002)(86362001)(7636003)(478600001)(54906003)(70586007)(70206006)(6666004)(4326008)(6916009)(82740400003)(356005)(26005)(1076003)(41300700001)(107886003)(8936002)(8676002)(426003)(47076005)(83380400001)(36860700001)(5660300002)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:52.5718 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 77d1ab47-bb70-4a92-1981-08db932d79ab 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: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5978 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337800 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 D364263AF for ; Wed, 2 Aug 2023 07:53:08 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2083.outbound.protection.outlook.com [40.107.220.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5247D10C7 for ; Wed, 2 Aug 2023 00:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NPErPjbwRXto8NeDQ3gFEhYbLJ4hxXG2a07J54qRJuGvV00ByZ1wvJjSMARc1r/eSc1/oqovreQBpIE0uzv3HtbayxBNQybfVdHe7uNlSH6DGZjDic+ysorCr3HyCNohXR32yUrccuYrdFr5uIGGNlVjrzPJxHeGv9ua0OkfMe0UgM1xp9YAujnrVIdpPGfPoxllDH2R7sMW9Onnr0EF/CRMaWPpkqHOx2/TW5516BOdP18BmxR5fCU3bJICPeN4SwDa80sdTweR4KZgTzpMBGpv0/X07gA5KLdKpbIPHi5K+6AwoKnVPtZRyWxAOxJwwVRxrG47ADoJyEA6wzBofw== 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=ZUMY6oCmD1aB9t3sLsTwjDZ5I09Ak/8IYQ76VnfelsIbZv3BXuzlpJmtkI3VjK4qN2SdfAEZygp/gyLQF5nCzQNr2J0n4AIQPSnyWqN+ZPQI8sgORmb1OOxvcs+IWVM/tFFUMz6WqdldwjPOrRdV6z4GQ8vG8doTiEOV2H4okfQnfyBtZzgXOVOmxtHPWOg9ksrKtmF/P4haL+o0Muu3XCJKyUqx1CCE+CyuOBQJ+2vFYGcufMqSJ+nhjldfPT6G0oVMgct/dX7+LXd8eHHEQnoLSaB5Wp1c8oOucpf7/pni+b97rSBCv78jlcrSJBQh4+qpgpk+jEcM0N1oDRZGqA== 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=FMj/epV3tCNjfYQ8wYwqVCOsGSb+mKS/0AyZduT/v+A=; b=T+oGXmrOu8ZTK3I0qToCacgwxUsQB4VwVbcg3IZuZY1nhV4Wy33DEp4pxlFKoH6EcYD3lqKca9WHmpNTvYWTyAFd5uA80YZj2MjxJm3Jts+7K+GbOE6sm0Q9dqKRwbiFD0KdHhiTGyQ2u0qsRhUEflindrxdkYmqg6KPEerPnN3XD8s6HzMYXxHvO4JwsE+jU3gCB0aakU8JI/PkY6ktS+YchzVyLbVXOMj59Q6J6JL8ci1hicR3Mcx+rhvaKe56HNtruABTVus5snF7gxu+JhbZZ+Yqr4JVskntn6n8fjKWcL1eXmtyvn0ZtqmAsAkaP9ZiSSk5NYjZh/MpvwA92g== Received: from MW4P220CA0013.NAMP220.PROD.OUTLOOK.COM (2603:10b6:303:115::18) by PH0PR12MB8150.namprd12.prod.outlook.com (2603:10b6:510:293::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:50 +0000 Received: from MWH0EPF000971E6.namprd02.prod.outlook.com (2603:10b6:303:115:cafe::aa) by MW4P220CA0013.outlook.office365.com (2603:10b6:303:115::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:52:50 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by MWH0EPF000971E6.mail.protection.outlook.com (10.167.243.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Wed, 2 Aug 2023 07:52:50 +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; Wed, 2 Aug 2023 00:52:38 -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; Wed, 2 Aug 2023 00:52:35 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 07/17] selftests: forwarding: ethtool: Skip when using veth pairs Date: Wed, 2 Aug 2023 10:51:08 +0300 Message-ID: <20230802075118.409395-8-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E6:EE_|PH0PR12MB8150:EE_ X-MS-Office365-Filtering-Correlation-Id: 88007b1a-82ab-4cad-3b60-08db932d7824 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r77hUhV2DRH2ZHYmX6anCnrCFnT81tn3N3Z023PwHCQ09HesNgPvIB6yHql16z7ayuKF9gseVfOcIH6fRnMEo7R7XsXFroSVKq4r2WNOpeQ8pSXsZkPYzhNTKUdlJ1H2SJv7Kpvm8LIZNQbvIUYnUbkvJMFJxYq/cAXqq1QK7GbcIgTjfb3ZAXkbFSpcli47DJTKWCQZMqSaiaoOEzA7L2o7rXDfJcuRAMnGJ+Jg1izU5IbpevkjkncvO//zARNKhJjCqUMFt+wpgTxkTukccgAhrH06//Mq9CsAcWbBIsIAl340d7mQCtG0FxW2mApX7yh18c9sC2PxNHjZwen1atShuMSYijfhAMB9jLYVOnMZmhuKJd+MATLqUeeIg0dtvmFMq0I/TYEKh+XKeq0FhDX27sp6AbBWuFPP53LRq1fdXqbRJi15q30+of8tckhdK/+SO36oyTDmYlL9zc075FxEkRsIMu2keCs5dUOPhXz1CyMAQ9ToQbHzLIyWKmNXsF6cnbTlLIGUnXW2vfIL/iJ7+1mvy9rB74svTtvgMLbGHA/evCscKDs+oyP7u0HRa4S0RPuPOBrWOU4KWXOGjGT46Ch8jrfeM7e0VvWiy/JH8YgAmberME241S8xkYlqVpCZnw1ovnKwnsCiZYw7l7oG0tEBXTafwwB9i45YSJX7WxHCGdkP2mk2pBof0j4VmYnyGDRhqOZzzfvs+AIejbSp+LNVGn2nAdPwA97kTJIdtZnvTAQsF2JgY2QcohE85+kBGImNx2dAZH2qxUBZwg== 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)(396003)(39860400002)(82310400008)(451199021)(36840700001)(40470700004)(46966006)(40460700003)(2906002)(70586007)(6916009)(70206006)(4326008)(6666004)(86362001)(966005)(83380400001)(478600001)(36756003)(426003)(336012)(186003)(16526019)(7636003)(356005)(82740400003)(107886003)(26005)(1076003)(2616005)(36860700001)(40480700001)(54906003)(47076005)(41300700001)(8936002)(8676002)(5660300002)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:50.0571 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88007b1a-82ab-4cad-3b60-08db932d7824 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: MWH0EPF000971E6.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB8150 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337799 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 510705692 for ; Wed, 2 Aug 2023 07:53:07 +0000 (UTC) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 273C73593 for ; Wed, 2 Aug 2023 00:52:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QvO7UMWJGlLnnUquEbogqfgGY8qmKnXnXkji28IxEHGtNrFzDyBA9KzQVgrf6WibaQjPCinwh6y8gdetXN8TYcj6G0/FZyKCW1Qia2aiHn9yKD0/oOv09WA5L35vguHKSakj5Qsi83Ybt92SLlxtcLOVE6RppHit29Fyua2rXWPfMp/Cg+o8d/1i2zgRRhuvFTWceVKiizc/N+X1xtCfcw8EP4qM21hwSqjWrIO0k5U4JZag2NaqQVE4qa/QpISDKPRlCf1HlLBOA9d8RjdUa+9ZhgreohyDZ8DoMhZCbLz9JSWiJQ37mtgHnmb7hqSdoTr+ryaBjevKJhqcnm0YPg== 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=ORW8VJDf4hUMavgAsVq0u7oD1fesgAmJCybj3/uOwxEyrSFswRtYp8UpzukdSDMqZIvw7zwlR2gZOIKoJX3/fwCpssVrg3NnFKl3gtg6jwqrkWgnZWW2feQZj1jSOC+2IUuPtPV2PhkpukxR6aTehNGb8jztsa1C40HIDnhGBbNmVUi6YlB1T9YulBo9hewmGql/YvlZMoYmBF2Ej1ZtRHQJkETxlh5EyXi1UWUXRjTG738DomHCfBD/AUbO730D1gHb3Lw5+sGn3rmkrnSMzJL+3gTz5YNQ7j/NvBueKoWMurbfoVpyl6K9sF4IfvMWdSXraVYRest9MwTMuhahYA== 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=jJljX2GrPouWvQQ2SIShN7vJzo4WOJh3NpD7joTStITXOgJWAL7cSJTnw/zQys1dhhwyhiHj5rfYQmHvpCV7xP+VijEbo+bX8L68wOkIt+fpTDZhPBMfEQrQNtBfxeUSjNpNe0l10w3ZyM1L900qANWy4skKqdTBxjn6M1ZdG+d/Ld7zH3cOS8pmyXs7s8LhuvwUFZP9RPYGiOpsWSc5oMLjMHavmpB7wSUvZkAbbCD5feIeOCkmdvcN4AKTnzFXh3DixQZkKQewPZ/OMav2qzJ3fYmcIwAJCCXJ6S5zqPS2SqJy+S7mABchQp3YtTY372TNveej4SCd44J8j+g2GQ== Received: from MW4P221CA0003.NAMP221.PROD.OUTLOOK.COM (2603:10b6:303:8b::8) by SN7PR12MB6792.namprd12.prod.outlook.com (2603:10b6:806:267::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:52:52 +0000 Received: from MWH0EPF000971E8.namprd02.prod.outlook.com (2603:10b6:303:8b:cafe::69) by MW4P221CA0003.outlook.office365.com (2603:10b6:303:8b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Wed, 2 Aug 2023 07:52:52 +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 MWH0EPF000971E8.mail.protection.outlook.com (10.167.243.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:52:52 +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; Wed, 2 Aug 2023 00:52:41 -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; Wed, 2 Aug 2023 00:52:38 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 08/17] selftests: forwarding: ethtool_extended_state: Skip when using veth pairs Date: Wed, 2 Aug 2023 10:51:09 +0300 Message-ID: <20230802075118.409395-9-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E8:EE_|SN7PR12MB6792:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a473b60-4f9a-427d-ef4c-08db932d79b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vagZYYhDBcYK4lgKr7mRI2LR8W49RWl1FVz64Gt72iZijZkJ/e4t7KCk6r6mlYtaQmvxXchMILPXsxSkSuaslGcWMAEvjhplFcL7Es6yaWxi1rZ2MTp3S0/XXLGC5oT5A44yqmnSL8s+w0hE3LAw+QBaL1StiFwTtW1jmWVtBPvnIRt9Y6E9/vK4au+81ULuNLFNOPDIk36zzm26m2b9hOsXJiIxuGUw1D7g2rJwyAfvS+2pHVUn7cQOvc6G7u3buhLMJ2jL6yM0KWTZJT1vmipM3BadPfDho3LPey2MLXU5b4uDpNb03PCzkdtvjwpL2HiwwJGyhU4TGOKcRQQXSMGiAy5O0VIwvziHLGdME9/1zd36ASHe1o5AftMspEUy3areH6CTJiW9+XF1FVo/twmXEU9wvEy6EUcQfVSYf80QSmjFdKuEW384QoE/MuDcOyXyUTOIBiIBq+ZBX1JqH74So3QQA1lOA9JCv5LJLj2Pfu83soP90vuWPcygOwISlWxScj2wNPg8ZJnvsmMaI32XsuRavM7TKq4QvySOduOl7Rqwy5JV5zqCUsfw4bH/eu+WTKrqMiaZyqc+TuwSYVr/h+8suRnLFFdUmTYymRxSJMzjWQcgg69dAp0LRMijosn8+PEGBl64d1nh5ZyqNoKEeUfI0PO31Gfbjbuoa5Yhk5HgkOhDLKnT9WO2CSXxclwiLhk2uXrgHU3lj5TfKmNDltoRoct3eIa54s3srkYP/pTfCr2/UJeVvm+5LKeJgNAsRSy1Ltb4r2/ndxlNo3wZblfuW5BM8hx9WobTDsU= 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)(39860400002)(376002)(346002)(396003)(82310400008)(451199021)(46966006)(40470700004)(36840700001)(7636003)(26005)(1076003)(356005)(82740400003)(336012)(186003)(107886003)(16526019)(2616005)(426003)(36860700001)(47076005)(83380400001)(2906002)(36756003)(5660300002)(8676002)(8936002)(40460700003)(54906003)(478600001)(86362001)(6666004)(966005)(40480700001)(41300700001)(316002)(70586007)(4326008)(6916009)(70206006);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:52.6897 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a473b60-4f9a-427d-ef4c-08db932d79b5 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: MWH0EPF000971E8.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6792 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337802 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 890ED63CD for ; Wed, 2 Aug 2023 07:53:10 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2082.outbound.protection.outlook.com [40.107.220.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D10FA3C13 for ; Wed, 2 Aug 2023 00:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ju+xatSFgU2n7P7XYFVMhnhlopQgjkaKKdt/iy+BacLUVz6SWcKHcStkQwEgQixiTcm5DVlAK9wAlIjEb6+NdyvNCQwpyqKycBa6LVbeMPH265V52rCgNBMdRZHLcwA1baF6P/nkgwRv8SzDiHDI9gf1up8sAMtyzOCaW6SmVNxEek4e7iAxesFJQe5bJCnCHQ7smUK6F5tgBYgOVhwWvNAve98dXllPTk8CPNaViSn0eNGjaivY2vWL6MPZw2Bb1Fd1oHPjQXfSg5gh7UCSvzuap8dpxbq9JWNCD/HXkPahkJqO3Rh5+7HMC2CCkzdkw+3HR2ndZobbFz/mLqTT2g== 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=OUepYOK2tAVxbYeunDybmbMUNm61/O7S/UCTdQ/OBARtE+JmSzy7fvTGhLoQ2bGjHaJ4gRkUbH6DCjk+CPmXBZhopJH49gSSumsWZQz7jqfqGjJoi7Vk6kH6Mn6WuRTbX6SVetxFBkCQw/KVrmflNdjVEVLDsUuZ9lnSHw3j9ndtTXAx1tOp3PFnp7qhJmDzdqF7I5iJ0RpR6wklYtQkf0cAvtRquXZsL1oJiR9iIzhiNKjMG3zvmbC81FYk0R3lOMRtbwUdI7Bu+RjvqpmLWcVrE+3fYhjlhISQvt/bnzGwWhRdSkWr1HzyidSzaw0iISoiZYACgqCdHh6WG3tb5Q== 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=20hcQEs4AJlQ4qu3E3eqcfVdprQsTfkFNjrOMc95ENQ=; b=sZ1ACtzpfk8rZ0nKdrK5arxNJ1E8DIjDiOQ83kTqbmpdXYB76N7wF4Q2VvmK9hVYQYCDDauXoKFUEC50FEC5mAFW3frfXK3+q8gfh1UPlR9IYLDV8fLxp1Mmv5sQJTxMjCi/JuT7hU7AvbYYD84qxssIMkBgAyvH8XeqOO0OprvHK+PSOdgLy5GorfFydXGavIfhSlO8th5ZYgMxmo0csQ2YWrtxYCld0+LgBmTLcSHuDOU60KpbKj5gBEfI73CC2rOAXyNI6wNKKrrrJ2+bugMeNArvpXNwTKaSF07x8AzTDE7gtKuwspPz6nAzoqKhkplu/8j3K7LxgC6eziRcmg== Received: from CY5PR04CA0001.namprd04.prod.outlook.com (2603:10b6:930:1e::6) by SA3PR12MB9157.namprd12.prod.outlook.com (2603:10b6:806:39a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:53:01 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:1e:cafe::48) by CY5PR04CA0001.outlook.office365.com (2603:10b6:930:1e::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45 via Frontend Transport; Wed, 2 Aug 2023 07:53:01 +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 CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:01 +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; Wed, 2 Aug 2023 00:52:44 -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; Wed, 2 Aug 2023 00:52:41 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 09/17] selftests: forwarding: hw_stats_l3_gre: Skip when using veth pairs Date: Wed, 2 Aug 2023 10:51:10 +0300 Message-ID: <20230802075118.409395-10-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|SA3PR12MB9157:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b1dd130-b767-4a4a-9fd1-08db932d7f03 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2k4xpJSbKpp6GCf1taSTkpE6nKDEtxMVi+GBd2cGudbqeYsmgbhyy7wgdGa2eyo/Fhwh1/qpfyQ70qR5EuZqr3TREc4GGofwHjxoGIL7vJ13tk4iMmDXI5id2WmUXA/NSGhBVIDGcbx2cHsaB+pRD+Jk6AH6i/3JYh4IWSbi+52C/ZxSewf6qbR30RoiPrnKQUNJcB6iNvRyA3Onirmv4b2pgt0BWh0bERZroDqQkOsimKDxspmmLBGKKpIYEL06cLLyQ0BsSBBwuhOibfn0gK9SyJ1h5nAmyLX2IjBQ+IxmM/U6HB1NK1E9Dym6Yy3LmJq9E585dpjB5HK4TgVTU5Iq6/ohLDxs6xsfh+wsDM9Z0Rsf5kV5uHOT76t3sGQyBbfed8hXfYAGQKLbZ6PTsQCqGsrnzapHluRVqZ8G2Rjh140sdTzf3Hf14G5MajaF7MGXaFFGILwSJZnLCqNr8+a8Hq+wZDXyDIMt+ghRcsDa+CeErosFbKvphePhioLKiPW7WjlGLIos3GXzny0mvMwkdK5dadxyoaaL4K2tlPmDaXL91zaC5DqSatcyBIM6Xa1FoGe2OGKCIXxHvSyENswEqorcqPWDXVX/VuJJ9OCVj0GXuHAd11kopUaeKFq6Kh/ifrgiExZAQppMG5988G4UdagLCHPDZKw/GstBE/5LWC+VXf9rBmYGUVHiIBytHV9Y1xwJ9pBbVYlGJR42RKQ3P4f32TA4QaePJKi1z7j02+KtHje4MseucnSkdJeUC+f+hGulHWmeRS65H2NkXWUAhoPrsdjnou2frR0A6UI= 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)(396003)(136003)(346002)(39860400002)(376002)(82310400008)(451199021)(46966006)(36840700001)(40470700004)(6916009)(4326008)(40460700003)(70586007)(70206006)(2906002)(426003)(2616005)(82740400003)(356005)(7636003)(16526019)(336012)(186003)(1076003)(26005)(83380400001)(47076005)(36860700001)(54906003)(40480700001)(86362001)(107886003)(36756003)(478600001)(966005)(6666004)(41300700001)(8936002)(8676002)(5660300002)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:01.5406 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4b1dd130-b767-4a4a-9fd1-08db932d7f03 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: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB9157 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337801 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 587FF539B for ; Wed, 2 Aug 2023 07:53:10 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2062e.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 312FD3C10 for ; Wed, 2 Aug 2023 00:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O/OCvS/GNT8acDush4t8dfD9YSFucJkncMJ7tuKxUT5G+NCbG8fJqezI0iwGOB1M4v5d7GuFA3fqQ9izG9SqS+U2Mt6nTg24dNMjMNxV9CozPaNqADt16DnUd/+Tzzo1cKZxgy7tdw9TVgkvyaThEaNSbdBuN6UvC3VYT7Iw3PWR8tXSfq4myoBArbDZk4gTYmPf0NDbSp/ye3CFozw8j02ZTXKU/rjUDb/B3Vz8gJArw1d8Xm3p4tToTbXVJYhHfYq0z2ZBE5QNOWJkg8xWcCYCY9Gih5bYQpu3GIuzRWKZhzzdwwJX6HTJABqX3dv61AGOdzLmv+4azHHEMjV64A== 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=hok+nm1fXdaKhuAYPYL6JVCMAh6YRJfLHbgFr3unjws=; b=IAoJO3ELvyXt2ed0m2jr77u6iXqzl1JXP6xDWtAqXvpn5P3Ab8EbYnvsWVfoS+9UsWInb4AhOf/tp6Vn+DzWzFimaOEjZRJYpds2bffhZtL9E9Rme5Yi3Sr52Vg9Rk1TG+YtIYJd8kwYe5M1r+/W0pfTeMd3Bs5O76ySj4wwBsb6DMhPGR9/fZsw+fUS/wEY1pHsCNN2DNBQWg1SZEjTKDq0OWsF9iNJEwk657dW6vz6P2O8l0A5NjqzVOiCvtgdlzVSDt8SZh4oLAzr1Lbrnn+eV0jUPOG5+YLAdHCalylHApYxDGkFmU5TpmA6uQ3taSzSWhFiFWObAVvYYFYMog== 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=hok+nm1fXdaKhuAYPYL6JVCMAh6YRJfLHbgFr3unjws=; b=THr0S5HK2mKFrPu3Lt9tLleIXzkgeTe+IcBk+MdGyauDh3aLmpWjec/xkd9GrDrBT2rWZ0iS87/G+XrCR6Z4A16pTjFeQ2ebig4Q+a/XcHe5DmQgbSzgPVaoDDFK12DihPf0atWUAQHJCZopMwBLYsZS5S7zr+GPyK26W/aOFZ2G99fHymTgNvY9W6xq96ve9ryvHMUQgnOJm3Qxxd+XPERZCr46kbZaEjYlR0ChI1gvPVjAtis2InTW/NuX6lMTygf0vKYr0pzSq9yPEOfxe1ICaGWBpM8KB6wgoR1edCBDdDd2XQC2wfnnN2G/CEIkoAva1a261RfUD3jPBxEYqQ== Received: from MW4PR03CA0109.namprd03.prod.outlook.com (2603:10b6:303:b7::24) by DM6PR12MB4372.namprd12.prod.outlook.com (2603:10b6:5:2af::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.40; Wed, 2 Aug 2023 07:53:00 +0000 Received: from MWH0EPF000971E4.namprd02.prod.outlook.com (2603:10b6:303:b7:cafe::99) by MW4PR03CA0109.outlook.office365.com (2603:10b6:303:b7::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45 via Frontend Transport; Wed, 2 Aug 2023 07:53: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 MWH0EPF000971E4.mail.protection.outlook.com (10.167.243.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Wed, 2 Aug 2023 07:52:59 +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; Wed, 2 Aug 2023 00:52:47 -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; Wed, 2 Aug 2023 00:52:44 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net 10/17] selftests: forwarding: ethtool_mm: Skip when using veth pairs Date: Wed, 2 Aug 2023 10:51:11 +0300 Message-ID: <20230802075118.409395-11-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E4:EE_|DM6PR12MB4372:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a3ff94c-0629-4647-e3cc-08db932d7e04 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7hUf40adY5SfbSEg7nvNvM/QCCFE674xb6Bt450gMkRjU2J9LHmPtL2QfGu+ClHs0geHi23w2AVBRmG6NcP/sVbF4IurJniBwbsXVFe2uLpbxWHmyAbPFiu8BFt1DXCaemcvambUTc4zw576UZMMkywU1iAzhGU0Y7H4ydpvx5UdKYI5KiAjzWqhf6sh+ZiLRVH8ND8jghWAZIYOgYJ/V6jW4S3sp1W12/ElYcj/0WEqZIZ2NIbcWcUS3b+4OIC+PMNxqrGQa/WG62w5RmhL4UtuDjdVlczag+JyA8pvP2WfakKIB8tgCRfVOkSRcUXxbZnI/t1E5rmIvTFRMhOC+PIdQ+1p1uv0PtBNDrLVRQUJIgDZ8fuJkMNa8FAmKw6+huvlguoYC7NudBx6YlPg6v0f+0UX5ifAdJxQwlB0CuYYF8Fyk3+mhtuxzy5zItzp34NiSCEgYizjdZQNGKOSFr0RBVOB4GIcmV1R/5Fvz5q0alF7+zEMULoqB8dU46+lalozpM8M084Y6nj9kKAap402+QsbYzZxijMyWLhO4Pt5QhboUQN88grQFvvEOpmVWTPJM+jCrP6g/01InEH+/rY6WIisr1AvOnpGpqonLdGJ2ACurUDWYpTN7k3MZLQH+OiWXJ7wztpB5DAfl7XIE1od7UU++dlR2v/QwffvKau6nxumTSrKt1wOp3dW8S3mmt43rb1B63aBTGJz5nFgQTNLkbWZcsAw+JEqcxy5exFcDSMxThlwCSkBgg58kSoiEtB0naS/XApPbqSpvS0i+i6bxPWGEAzAUVXVhBrqv7Y= 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)(39860400002)(346002)(136003)(451199021)(82310400008)(40470700004)(36840700001)(46966006)(86362001)(316002)(8676002)(8936002)(6916009)(5660300002)(4326008)(54906003)(356005)(41300700001)(7636003)(70206006)(70586007)(82740400003)(478600001)(2906002)(6666004)(36756003)(36860700001)(47076005)(966005)(1076003)(26005)(83380400001)(426003)(336012)(186003)(16526019)(40480700001)(2616005)(40460700003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:52:59.9180 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3a3ff94c-0629-4647-e3cc-08db932d7e04 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: MWH0EPF000971E4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4372 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,T_SCC_BODY_TEXT_LINE, 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 used with veth pairs. 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: Petr Machata Tested-by: Mirsad Todorovac --- Cc: vladimir.oltean@nxp.com --- tools/testing/selftests/net/forwarding/ethtool_mm.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/ethtool_mm.sh b/tools/testing/selftests/net/forwarding/ethtool_mm.sh index c580ad623848..4331e2161e8d 100755 --- a/tools/testing/selftests/net/forwarding/ethtool_mm.sh +++ b/tools/testing/selftests/net/forwarding/ethtool_mm.sh @@ -278,6 +278,8 @@ cleanup() h1_destroy } +skip_on_veth + trap cleanup EXIT setup_prepare From patchwork Wed Aug 2 07:51:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337804 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 286145255 for ; Wed, 2 Aug 2023 07:53:12 +0000 (UTC) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20601.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::601]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD4053C23 for ; Wed, 2 Aug 2023 00:53:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AOGQ/ho3Z/wNuLFYmXsstnLTorrYL4DvMjQRAejYXZm4iqTkc1ob2SDjc8YU8nxsT5PHQtbEIgtfL3kYqgVS9rJ2pPzREEetBZe7ixsNaIc2/y0RVyLwpkXextm/c+vcYpfK6SVdNVEr++J7eA/Xz/z5X/fONfUPl711BsQNvXK/DkVn6aQHdxSO+9xsJO2rIuFmr+jIUN6+sMc7J+x4eozMV+eyf3gnm6eQx8C6f5iM7+CSnKSUl6OwLJIn5jvyGmxXdrR2cfkBjlXRiHacEkr22tew6xVRZJ29Ph+c9o3aqrukA/3BMCos8qXRRCUSnrKmLcAlJ0zAzBCIbcKi9g== 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=NkkSSEVJSahk2thIrLJ5bBxLfBQJ544rsAyVzFxH++/90kf31TK7luOnr99KgwzD8YytweeqxW4YK2vby4mvf+xpdGNldTVSycwyLrukKvaAB72CarvM3WF6oQ1GmIjx/eOwjdoZ5E+pwPwFq1hm26HT6j1zIdDI0nDL1jJM/Ikz0jUe2yibntdKuT09FKzbkrM6PP8qAfML+NmbQp5dki57gNJvvF/G1wQqid1vZSBuDT46/mLx86EljcoqBGScksZhrqMy4U+CxOjhsxCOfydWsIvVBLsJHuKuxlXIsCU/RRxWSdL6ocjxAlpUOATgRDMa8skBZPhLJUOyaHv62g== 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=ofDTqJ1O9BxqHiVUbA/OF3A4nySad5YAD+FpSUHT7Yk=; b=GkkfkpHItkjkDm1k1nVQ6P7IjH02dDDUoEeGNYVDZSx5QDMGaY/nk+wguLC7a2ysBegv8OVzMT/ahozD5pMwtt+3QbZMdt2BGBpWtwAUnCcBKN2cns2BTNUgwll8zf6DfB/f6hGC6do3foTBczqgDSUUPnp93L0uNfFzDwEWbqnt0m7nTUI5rcifs7tayDdYO+/ZLD2k7UsV4WLAkQ37dAu5th2Ro/Io/BVWX1gJCiyVVEV7jveLAm1FUUsQ9g/HanmgYqlqAI66jpougAmUOKjEank8R3q0+wvNpJ5U7irFDTsh0lValPZFrJUk4ZprgzhT94wJkevbDm4vFYKe7w== Received: from CY5PR19CA0124.namprd19.prod.outlook.com (2603:10b6:930:64::21) by LV2PR12MB6014.namprd12.prod.outlook.com (2603:10b6:408:170::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:53:06 +0000 Received: from CY4PEPF0000EE31.namprd05.prod.outlook.com (2603:10b6:930:64:cafe::ae) by CY5PR19CA0124.outlook.office365.com (2603:10b6:930:64::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53: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 CY4PEPF0000EE31.mail.protection.outlook.com (10.167.242.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53: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; Wed, 2 Aug 2023 00:52:50 -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; Wed, 2 Aug 2023 00:52:47 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net 11/17] selftests: forwarding: tc_actions: Use ncat instead of nc Date: Wed, 2 Aug 2023 10:51:12 +0300 Message-ID: <20230802075118.409395-12-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE31:EE_|LV2PR12MB6014:EE_ X-MS-Office365-Filtering-Correlation-Id: dd7138b1-2757-4c88-5d0f-08db932d814e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8fyo1J4rTbtljIVG9MbTarFss5AmHA25w1qzhImAwUY2dvq5/Fsn6EdI3OXJ3GZrVn8FrU3zFScEoG+SPbmKkbW48Q+qPLkVG2eXznQY4UmL44Zv/F3bPJChSJbacSWJL5mUqvIYbdF7iBKuYwD04sCe/DqpjphtD6b/otGNrqtNpFtqGLQc4gL5HEOOisnvsqUdhLRvZGcm9D7LqJ4mOrkJ0FLjlg98+Cgx10lMH9WuJ6pqecnPmXyMqgoPFiF9e/Bx/qqWBuCM4swOUX/oO6rfbpt+ZMWiSCNyU/a1GQPtOCEdntuCXwvYxEX7LLc2pmq7XcFMl/MJuvjkqZEmTh2hMflEi+ZwpmwEe+pQoWJVfTtWxQq/8nZHhpd6QzUWK1nRDy/q3//5FPe+gRgniJdZPhpyyDOYZKAK3RLGy5skBzK2XooEXzi1g921Il1VZx1+iOppmaS4SVn49YEWlFhK9I44sJtSwtxRSRK3sIeYaqs9VrhMte7wZmBqQxmcf4pLW0QqvBuE8RnhL0OCgyCL/hIPg0FOgeX2acsi2ruXTc0h3Zz1Qy7G0zmgrWGkhU8FtIsRo0adhFrF9RQuHDYy69cVDTkgvfPuyeV/+/afCmqlVhMih+xuB7Det4VXF0A5KLTRyenP78yyMGm4xiag1yAjzrze6cOmnHCp6ClRALmCZVp/BYQPtRNRXtGPRGrseUc78BKN2b2wEMG5qmSvw11CuCxBgZdlAUKqo8Equdhp7VFHDeS6xopJP6ya68lthDdVMxIVyUINFz8xQjmrXp13OjAv2iV3f7jBzNo= 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)(376002)(39860400002)(82310400008)(451199021)(36840700001)(46966006)(40470700004)(5660300002)(83380400001)(36756003)(16526019)(47076005)(426003)(8676002)(8936002)(36860700001)(54906003)(966005)(2616005)(2906002)(70586007)(6666004)(70206006)(478600001)(82740400003)(4326008)(6916009)(356005)(7636003)(86362001)(40480700001)(316002)(186003)(336012)(1076003)(40460700003)(26005)(41300700001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:05.3858 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dd7138b1-2757-4c88-5d0f-08db932d814e 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: CY4PEPF0000EE31.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB6014 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,T_SCC_BODY_TEXT_LINE, 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 Wed Aug 2 07:51:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337803 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 142FE6D3F for ; Wed, 2 Aug 2023 07:53:11 +0000 (UTC) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2069.outbound.protection.outlook.com [40.107.223.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C65193C1E for ; Wed, 2 Aug 2023 00:53:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bPdRfGtWETHSh2S1TubNhOoqAscchvgyEKAK9IMGdp5hipWepUepJuI26lcLAGu/RAGVbzAiVIjKwy+aZHk7loi5dfnQwRdaR+BmEaHAUosYaeUlb7aWAqDTOTc++ZjJU7fpzj7IzvX3t32vY6akWP566hSEW4uOYODREkweJDdyVwRLBo1S5bNX207CAIAF3Og/fpiUHYjaG50PDcAtnv1QwKpkBnR+KQa1TOcIlfVxhdbGWS0JXSKpwzMXQl9Eujra5y6JC+ilAKrZ6iXdC4yx+lqlhuM5kXX2GbMOPeNvFth1bFUOGZZDrmFf5F+yamfh3UEhlJ6vm9AcCbsXsg== 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=FNrY20cwZygUogKO4McVj5J2d0j5FrIHHbc9LjNLc9xOZoTD3G66sD4wq9VBKs3rV+jIvdBSLGZpe1QpGstEdycs+FsqVOcl804EMOxqBszSN3hLHTsGFfUatHCR7LrACJ3SHPGkCqz5ohEdNaiwpxu6RxKLFutuSnty02pjDbqyMOTpW96tmh4xylLUczCf5UPtuxRRC4TatAATTKkt/XRroh/63C3eo2dA7ZqSU3LdElIsS1AzzU5CFZ/3Ke6fTyjKE1KUjhajc05h5+8za84KHSMYamD3YM5Tj265wTpG55vYEe9rSEgaP1dyy2ZvQamSUESBRbNdLOxFKuxGSQ== 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=HkEKGM5URrIHbZ6bkOV4NKpURlzSUTXobkXD62OVBnRsViSCPoi/e8lGng8MoeRdUhqF8XVlkaBYbcDlWbNCmh5BgNgYGSWn5G4WyMUhhJyRXJc3Q1Vo71lSQM+RXzL/QKLSNXKzGurwHlQ50E/D4B3L8XsWBW2YfJ/RIK4qXlh1GIRdJ3lii5RCAELBDMma8MjPvufD16hy7yzBWO82QvAR5SEEY4+tHm98FBX0WxioJyf0T10iJjg79fTIh8hjHpWnh1fU85zGiXl/6Oq0sAAFkKxTBt6/90fPBxMTnST7OrQJNdsRsmeiU6Prbc863ssrkTZUyIShvivMH8dQHA== Received: from MW4PR03CA0093.namprd03.prod.outlook.com (2603:10b6:303:b7::8) by CH2PR12MB4924.namprd12.prod.outlook.com (2603:10b6:610:6b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:53:05 +0000 Received: from MWH0EPF000971E4.namprd02.prod.outlook.com (2603:10b6:303:b7:cafe::f9) by MW4PR03CA0093.outlook.office365.com (2603:10b6:303:b7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45 via Frontend Transport; Wed, 2 Aug 2023 07:53:04 +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 MWH0EPF000971E4.mail.protection.outlook.com (10.167.243.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.25 via Frontend Transport; Wed, 2 Aug 2023 07:53:04 +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; Wed, 2 Aug 2023 00:52:53 -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; Wed, 2 Aug 2023 00:52:50 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 12/17] selftests: forwarding: tc_flower: Relax success criterion Date: Wed, 2 Aug 2023 10:51:13 +0300 Message-ID: <20230802075118.409395-13-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E4:EE_|CH2PR12MB4924:EE_ X-MS-Office365-Filtering-Correlation-Id: cc530351-c086-4ff0-ff7f-08db932d80c8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ydAbLbYgxBcrlWbXNUb3fKZ0AwRRHG83V1AsZ7lyxBAu0xvB7/dk9hhFxSkjCgHq4CM6meS3QFLTGxTyvT0irMsy3IS/1I4zKc6h3HbhFLFmLwBWTgBroFs+jm5EHWepwS8ohldxzOTdneUPF0RlYNBvjOG5qGCTxZlMscj4CzVYWes8unwrXlGsnR0yVLI72SrWfURwXJMlmNvUCLboLrGiP79Yg1YrwSf6SEAdzZ2P1z/ErT3s4Lg+cZPxdbzmhPn6HGvfLyFom3cTskHZ+uI2wRUw5RWWQ69xug4pGSg0StBcaWySR78i1IDfGGkWlvD1PyOfXh6zP9JQMudRg6dAhx0FwUwLXj9IBSzI9tn1wQMcsPBKmHYntWZe/oY0M79XnEE+Jx5XQaS3D8yqjOCzYXAU7X8AoFaM3uOwVRx3s9h/C+NTSEBRLdEfnMtVYlFuwxXp3DM/YA3h12XB1RPOjTcTxHyAgkNTw3nX6Cp3vjGf93JeapWBqpD8YJzacPSF++sHHRy+OYSbPlqlzqdefImAl8zFx/P7gWhppscol/yQ++SAJdYT3m7ZJWkTqy01GZbV6xkFf+osN6/5lP1kwEsZnbQfM2UVa9ab3KZBfTWWMPeRIFyYQD+BfqaRbugbeJK/Yczv5WJHq+xjpJPqosZvRx+JGG8z2pBeLcfwDiRja2eJYqAKJ5n1i+NBYDjfod/6lyGu0dDa6NkTRLN4XkhTzetRwJKalD7rsFwr8tgZAx0C0ZWyvEFLie3OzOAc4VNH5m5X/jVt7VPuK+GLsSDXKxDmj4Za+rH0eqs= 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)(39860400002)(346002)(136003)(396003)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(82740400003)(4326008)(6916009)(6666004)(70586007)(70206006)(478600001)(7636003)(86362001)(356005)(40480700001)(966005)(54906003)(2906002)(2616005)(40460700003)(41300700001)(26005)(316002)(107886003)(1076003)(336012)(186003)(16526019)(36756003)(47076005)(5660300002)(83380400001)(36860700001)(426003)(8676002)(8936002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:04.5743 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cc530351-c086-4ff0-ff7f-08db932d80c8 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: MWH0EPF000971E4.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4924 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337805 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 E0BF56FCE for ; Wed, 2 Aug 2023 07:53:13 +0000 (UTC) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eab::61b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47C653C26 for ; Wed, 2 Aug 2023 00:53:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eXasv/xRNqXcPnUvxIBiz4iYAc7eM4whMKFZGXH4BbxlhjS2V7Oexoh2fqYL02f62GqIOQdl2H0T+ccS3PvtopqTF/qWR2rMjGq3eZfhxctXooXeyMFtCKdNnByB6awaSkguCpV+ewkbYy+vdja/DVMLnaVWuNEhQAbU9P4moZe52HO2Q+N3kujwdggFkkyR+FeuI7nWFM3QtJ7V4asPeXHneMlmyQVcqnwnAlapwav8ChRhnxhyGyalOmLrmWkrut8DRC8Qfr09IY2BRCK3WZKbsdKMYTRTm7m/NqAyO9DFAbrRhHNcJBGmFd/ZzgjuDHYzasiIy+QtUXlMpXDs0Q== 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=lVE5uJDdadeuYWsbduiSi9MZMIprPtLV9TpuN6/G49k=; b=I4aXvfHBOqBJX0iF7Oi6VOtbXLJbj5MLRTVf1Amyt2G/OjSqCrn09fyCRKwJKoa7kgGdoLcxXE8LxvvxMtS+UPiuLwC24Y18mRhJOXqwu37FyMZujpFwYKtpqBY+kUfT7Wa0vBnd26sWl7tI7cwwfuF+kPy/4dTerGljRULYeVYqB6REJEtpYVGHw9hoK8wmE9a47jU+CfrhL8J+udR/juz3HdQ7jpcvqEZTb2HTf5YdzcxDsOjlIZ7jbn0ZAqkb4IBD/rK3aYEc87ovx944l/P7NYcAA3CkQ5E3ySJYXj9x0K6XgZXsL9Y6MzEv12+XnG0o8NsE43cHN3DdSQTZKg== 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=lVE5uJDdadeuYWsbduiSi9MZMIprPtLV9TpuN6/G49k=; b=CGAYDBhDCvD8wc+11asQCpW/uzrT4I2rCxfyh7Rha0H4IQ3E7Zzhuw3JA4nZ/hRLYVlDp1IZeFbReM8ynFBGi5k0wgqtD6/P5x0rvyspMnpQBTITrGWrYfKgP1/r/n8yGhtE+p4pT1REmJt2P6YvYsS9je3++dk2QOrAXfFCOTjyUuXLUUdS8kwFEorDl9ZF+jeyJ3oPBgU56VY9EAO20yIEMpVlAwPhko5UsCvGFkO70KSSsR6PRIJCg+QS88VLmp2vmoBTrFy4Hc+qiBiNn2sd3uio7zTuLhUbmk/DrXUYJZWnr32o8v96NJdob0t9GU8DisnlUkvVhIhcqh+Q8A== Received: from CY5PR04CA0029.namprd04.prod.outlook.com (2603:10b6:930:1e::20) by SA3PR12MB8440.namprd12.prod.outlook.com (2603:10b6:806:2f8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:53:09 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:1e:cafe::3f) by CY5PR04CA0029.outlook.office365.com (2603:10b6:930:1e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45 via Frontend Transport; Wed, 2 Aug 2023 07:53:09 +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 CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:09 +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; Wed, 2 Aug 2023 00:52:56 -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; Wed, 2 Aug 2023 00:52:53 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel , Subject: [PATCH net 13/17] selftests: forwarding: tc_tunnel_key: Make filters more specific Date: Wed, 2 Aug 2023 10:51:14 +0300 Message-ID: <20230802075118.409395-14-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|SA3PR12MB8440:EE_ X-MS-Office365-Filtering-Correlation-Id: 76c44af7-b97d-4d8e-a674-08db932d8379 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: reT2mWCoj9dFLoaU1VgxbcdCKOaMdApIKyKB/+RtWXPy8K3leEG8z/OqfGTzi5u0cGzNlTI1RknjvbEi9UBOoEYexSqItLteNgIbWTRrIv6lIt3rpbiyOrgXMLHIP3ZR3g2OJVAQmb8oizp8/Ew0pSaZh/G+1KFLWPnRvM4Gxqie7ZhcEOk0SN5h1FkjfUBegmznuP8jrtLCGbaWmcb8mchMCo46uOnO/Ttd1VHoh8pG3/eXAoGrSUptQ27oMJN6J0AKO+6jH4F5No7oEWz7d6zdSHB8jeCsUXgxsVe3XNv/aUvaF355DWDPhcmGmBrcjJBv/Y9uQdiSTbjTvdYQSCKh3LSWqbAb2vNEO4t+LjeJWPadBdo3I41afgwCw077PircGHZYYP+8k7gfcq2rjxxeYwnJWROT4sQ+mOSCaOlpdNAZlh4JNTfluovX9YLlW1+Nt96Xem5lKvx6P5ZlsRhIm5jn/ctRC36Ke7LE+1LlkHPAmswGMdLrEhlU/PlUV0yZSTy43mhios/dbi+f1RWUOCfmcHSFvu1NNdUjeh87H36s4jBO7nfnTFeW7pIiHw7qXQe0pfvE2TgXQC6Mjm0wvhDlYGSLUE+YadvdNrscoXOgE4BAxQmNpWJYT3bL0TiqrxAzqvZbJtvlVUnqxlprR3eLJT231iOEtUDWuCL+nnvAE88DckLmg8nJdj/C2LTRwh5VGIbPxa8Uz73y3LUIUWOtXvqdjBRI486Vs+8AM3cjibFdnWjFyagSSPBFYE1BPspP4sIAnqCRpyPZzsSCYFZuuDgxs7fY2FisDRs= 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)(136003)(39860400002)(376002)(346002)(396003)(82310400008)(451199021)(46966006)(40470700004)(36840700001)(7636003)(26005)(1076003)(356005)(82740400003)(336012)(186003)(16526019)(2616005)(426003)(36860700001)(47076005)(83380400001)(2906002)(36756003)(5660300002)(8676002)(8936002)(40460700003)(54906003)(478600001)(86362001)(6666004)(966005)(40480700001)(41300700001)(316002)(70586007)(4326008)(6916009)(70206006);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:09.0093 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76c44af7-b97d-4d8e-a674-08db932d8379 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: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB8440 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,T_SCC_BODY_TEXT_LINE, 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 Wed Aug 2 07:51:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337806 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 314D26FCD for ; Wed, 2 Aug 2023 07:53:16 +0000 (UTC) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2051.outbound.protection.outlook.com [40.107.96.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9AC23C26 for ; Wed, 2 Aug 2023 00:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q/YBLiwlQwUQEdAzT82EVbh3UIxusJq1gGaHiERqDRl2X23+Rg6Brey1/IjqYcNBkCpiySjPvVFfO1MKiCtJPPXrzcpJKzqJ43Q8aMfgrXp+Njjr05Jv59Gn8cNyGvRrWxPkB7tvzvijJsD1CSj5A6hQT0RqDFwhlcalM//hfckB36O9lp5X67Hcye4emJH4VFD391T63DV9mv8mX5itAA8zkYytIYBr96bFlTHpkCeiNkSqysWvpGviCeZw5VunPvRBBBOW496mh3qLWJS7OJKEh8osqKTQyslmml4v6xhpKBqbAPw1p/7m3GNan7w0HGI0MHhFeh7DU+2CwKdZNg== 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=XvuX6C3bj01+GH+iMthOWTqCp/FCkxrMtHbvnhPYlczpTYUMq4fSdhvJi9dKZXSkGkOcDVckn1XDBf7pumrMMlZC/CZ4YY9l5AQcQ2wvGwRtQV5H9jSsiLv3n5MR8gvqXxVRjZAS+1HtPtkAOKbWrc9EoyKWlRBjhyS71MXrWSAe7X/blQGl7zquY7xFBI6ufZm9yhbtHnNZgnEJ/AamUChMkm8rxucr8yx04CEy7LLu9MqCJ2bubJMiV6/BL0zaL1ifrVytMzcXXvKEfQLn0ZkRGejpcD7lq5APqR1rtHmW1oxnv6QMNySHtmhK4OR5LdD6aQtHWjhK7F4lg7oS3w== 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=q9wct6EEFEb7A4xLSHyl5ScXjsMYTfimhvIG3q9vHrY=; b=lygWFl4jxols1XVlWImk+eBUO3O4JfUTDN1KhBQGObpPhKT5IIcvNSY3n3uJuv2aZeHyEga0daYYFaYun1u3DEdUunOhfAqAH8RlDorc/xk/9KotyiPbvjqC5xdDtw7gYubnQo07+7EMSOR23l0Dt9xhS7iO/TJbvbURoyEyyJ327w0o55RMbKI4zks9a4gM7T1O7F46OSuTrF+/M8I99WOD4apXcV90GNw5MH5oSnIZGiqRqXB+pMpu5vkhwv9+G+g6+Z9DiTidA/fk/N3IysvxGiJ64StHGvYAtExcxi8qRwdx8+3MV91krOGJIZw3bAi0XSFnTx4wH0NA79VhtA== Received: from CY5PR04CA0019.namprd04.prod.outlook.com (2603:10b6:930:1e::22) by IA1PR12MB6481.namprd12.prod.outlook.com (2603:10b6:208:3aa::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:53:12 +0000 Received: from CY4PEPF0000EE32.namprd05.prod.outlook.com (2603:10b6:930:1e:cafe::a8) by CY5PR04CA0019.outlook.office365.com (2603:10b6:930:1e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:11 +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 CY4PEPF0000EE32.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:11 +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; Wed, 2 Aug 2023 00:52:59 -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; Wed, 2 Aug 2023 00:52:56 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 14/17] selftests: forwarding: tc_flower_l2_miss: Fix failing test with old libnet Date: Wed, 2 Aug 2023 10:51:15 +0300 Message-ID: <20230802075118.409395-15-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE32:EE_|IA1PR12MB6481:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f72d8c7-f47b-4cb7-6b7f-08db932d8524 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fH8w76Qb58h0OK0aqwSMay8ddXJORjOxm7cb6UAqSebsCvS9BlLD1/9R6o7bxDY/sE6Md2A4i3RZWZILwzZpGuLb1QbtQMn0YvD8Rpx5QC58UtYQMDP3N0opYjH0+PlbQo47DNIWsfRUHB6UDaIa6bO4XUkIdoEbMCCf58/LuXrpeSlGAvXbtsxCiX8Wt0SLhj2fxQJ/6VKANdmI/vt4rJdjRe9D0ZLN2oDs3Tk0JTfiB+KmCkBgwLFFLphwlE5lgNsd/GH726xFAV17ch2OPsRTOtOx83U+UT6qIcfEztl+Nr+Zjud2mMC5eymBI8Z3Nd7R6w0QFgwu3la3GI2zG6V+D4XTY1lnS7HGh/+hBjH5AbdCle4p5YfYxxNNjTPvGOxjo5pdLMoCwwXmGM+RG5vMme2VB+Oh5BxbSUwynAg+dv/m9IyNRbeVACnBvLvnxQ7ZeLJ/fHrUS52yPQEAZCWRQiH340fVassQhZAyXtTUhWtmLXNa/ev6ocoFISiS9FOdy3EKlUv3jInuJVJsYI31gE3aZtP5538lH9HGj7pwxl1Wk0IB1gODcp0J5hs3WGc/JaOz3GAmJ8oZR7qzCaLlj0funRrCLt7UibhBzWeteFG5/XiaUpXJl5U+BSje6JCn32l6C9QmOPl+ZRhCRMB34WTgVB+KqRi36kaPkDKZlHF8VgRLUhB3gJwL6TqiXr4UVrRs6/eurePuRmqbzIbHrM0eCTPsuXWXlGW2wflZlM7LFQ4vH6KwlgBfEUuUSttnkbIAi8IOJMBJ3pgAzVN7hyNRNvmMtG6IfLkWPkU= 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)(396003)(346002)(451199021)(82310400008)(46966006)(36840700001)(40470700004)(40480700001)(336012)(186003)(16526019)(40460700003)(2616005)(36756003)(966005)(316002)(86362001)(7636003)(478600001)(54906003)(70586007)(70206006)(6666004)(4326008)(6916009)(82740400003)(356005)(26005)(1076003)(41300700001)(107886003)(8936002)(8676002)(426003)(47076005)(83380400001)(36860700001)(5660300002)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:11.8218 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f72d8c7-f47b-4cb7-6b7f-08db932d8524 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: CY4PEPF0000EE32.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6481 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337807 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 C0392539F for ; Wed, 2 Aug 2023 07:53:18 +0000 (UTC) Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2062.outbound.protection.outlook.com [40.107.101.62]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3EC213F for ; Wed, 2 Aug 2023 00:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NIfvFDW8tjWX0004Ui7LwsnY93mRCFH6kKfDedQYNVbYsXLjgYqXUah79qAcxICsyBqnj7OtNDKgq+5ktpXsNB3Y8hfanzUpNJgbrX9OaheN8QrjMIzOwHzNyuGu1wSmoi1d0BBxThIwCpWPFplW7EbYf7XpLRIpIaewGoLenrHREiTB+qUCejRbz24u4EGGYFMBTnz0FeCea+ha9/DctRJ491t59LmFhGKeMjTENNGJU+r1j6aYUlKqkSz6wtbCBTl7nIpDrELXxhGDMjjBjlj1VbELct49lpvIHQkziRkMw3T7plWcmxYMBNIrQdJP0JP02dQ+0QNEnjARpWNTQg== 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=iq3fvho7Zh61TCpd8UfAjNbg91uizFvR3lVQoLqf2eZyRlU5bT0GNoD85zvNBu5f+eKmkLA/JlPyZyE4JPWAKe77T9o/HVWs/uiypWEdb4HPPFwA6HOjfoNJdihd8g/RwNeFZcp3bx3Bts4CX/yLebG5AxAbWj2EcHkhGI6HCnB5o9nsrwzuFZOATkLT3s5nR6+Boa2lAHdDCXE7JlUszY1XGfTPqnyR5hPWz8qaht7hqQ2kZ/ioFSZMjF1KsOPgzk5T/sdwcp/yo/Wtk8NzorrDWG9MzejTh8VoBcE6whPxYRHlASMR8Xck5xhsnzSWdpJFG39fv7bRisHiiz2LWg== 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=TUcsBWLVCImDYdNFews2hmDXLvwyqoVxaWYfdaf74YcwgDsSaj6cMU+gAUJ2QC/7xsHdPK/7JL4Qp8LFWrIbBhWw3Z29SIbii6v1h6ucJlYiIaHgybRvf8OWHdGUlfc/Hcdy0sypi5Va0yrmagPIYADyhZzcuzis314Eafv54rLepZmX3uROU1aHXTdaOo14UziMaM0DWjOboc0ZOxSAiIWXJ0JgMdlSRRDyRPPyTqT0gbUheV/NPteRquyF3QUecUaXsdAcda2cbkdLiMO3GGcFlqyFDlw5GXWZuCrC5WUTxAYctW+ScjCgTng/7BD875uLMmhB0oA+Jwvw0Xd7IQ== Received: from DM6PR07CA0076.namprd07.prod.outlook.com (2603:10b6:5:337::9) by IA1PR12MB7496.namprd12.prod.outlook.com (2603:10b6:208:418::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44; Wed, 2 Aug 2023 07:53:14 +0000 Received: from CY4PEPF0000EE30.namprd05.prod.outlook.com (2603:10b6:5:337:cafe::72) by DM6PR07CA0076.outlook.office365.com (2603:10b6:5:337::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.44 via Frontend Transport; Wed, 2 Aug 2023 07:53:14 +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 CY4PEPF0000EE30.mail.protection.outlook.com (10.167.242.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:14 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Wed, 2 Aug 2023 00:53:02 -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; Wed, 2 Aug 2023 00:52:59 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 15/17] selftests: forwarding: bridge_mdb: Fix failing test with old libnet Date: Wed, 2 Aug 2023 10:51:16 +0300 Message-ID: <20230802075118.409395-16-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE30:EE_|IA1PR12MB7496:EE_ X-MS-Office365-Filtering-Correlation-Id: 2ff6f53e-24a7-4e24-cb4e-08db932d8695 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: apJdkFf9tVcZEQ6BujGAkJmFTxTdo4uAF0LGdl/TYP4YYdSoUnypPHdR7iWs5/IKoKCRsoZpLCtSQza8pxF4R3zBG0mqiCNLUaBKWPY0E/pj7fbgK1eGDHL2Xb8AGTZ4okpVUzCP5hl2drvKMygWZ0UCOlwNYNVmMelQ/6QFUyS19Ja/CsTojcTYjixK5M3BOokWdCC7MZL7t92hsHgvzpdyIBFigS7+55Y4YyVHR59HIc23rv0CwvVOjmeIR2YXg/LOC4mfx1r2brsZO3HxM7ysbH7OwCsgqXZYsUnbzFiduc/9JJVXgU0thywEizEfou7XIkPDmxfsEQLqGAW8DivB0ishNZp6ag4Paujma6jsEuTKV9Kj62EoWVrwqtdeznbJCw80JTcqe8OG7LVitTIV1cc6P+O1nVmfbq8CrmgduIjZDFaPSigskh+2KZmvk+NLhUf/+O+E0t/Tnih5xdzdkWVfQekWJe/qYqMEpReCdnep/enFoD/t46Px5UWRR5tRSCGzPoljI2A8/ClTmxUEYKvfaiwb9tQw++U1ONuUvH55XZUzuu9Q/uhgvutlkF9Psop7kibnlyAaAbbfEDgIHw8sr9SMRPJBGUaeVnbrCAYawBCHt+EMLMp1BTN5WuuiZrpAzzq62JfqNssTdk0x5vfLIuuqK9BxfUvkRfwzCU7gkcpm72yrlIfkXk8f6mck1hTrjZNRUfxU0AnoWIuqw/6aWYyvGipJmWd5GRefBm07iMYYG4pk14iKl+mwFc3A31eaG0PMSbdXCy5hJ3WZSELk1WHn5E2ZP4QlLoQ= 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)(376002)(396003)(346002)(136003)(39860400002)(451199021)(82310400008)(40470700004)(46966006)(36840700001)(36860700001)(1076003)(5660300002)(70586007)(70206006)(966005)(4326008)(6916009)(7636003)(107886003)(40480700001)(356005)(40460700003)(54906003)(82740400003)(478600001)(426003)(66574015)(2616005)(2906002)(8936002)(8676002)(41300700001)(36756003)(316002)(336012)(186003)(16526019)(47076005)(86362001)(6666004)(26005)(83380400001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:14.2426 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ff6f53e-24a7-4e24-cb4e-08db932d8695 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: CY4PEPF0000EE30.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7496 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, T_SCC_BODY_TEXT_LINE,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 Wed Aug 2 07:51:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337808 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 3528E7476 for ; Wed, 2 Aug 2023 07:53:21 +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 123493C26 for ; Wed, 2 Aug 2023 00:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AG3AbP2ByW20ZBZnnq/3EgKZGMUVpXbXdviIwYbYM9knfEj3lUlRSasdB5hFZsQWB9M3rJUGjiUK859CG1SDEsAoVvqIgSvmF4i1ZQH7PcifQrt8Bx2usFrERX7GSVTJEizU93EY+hr/YIbw3JkbNA0Hd3rDYBG1s13CDtdOVpskoC2kg1B7lrN2tJx1JOzdSqU1jYa0bHKWtnnzJohsefoJ/MvNPewvpJko5oUcGDVItStMMEnYRRKFaLp/I2Y5mibav8QYiAmOEFH7zjnFoGUdNnYeN8/P9u0OC8KFhhYtseoDyG3KOwA4bdASvLNpYN9iOT+pGQFZxVc5sdEsJw== 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=Pj4AoCqQkThSoWeyfMXYO2bizowdUSSiYeKqIDMFFPQ2AdlEV5B29QtARgqtYCTvF7gy0G13V1FMsL0l/YuufrNPaU6FeUCq1c3OTJSYBB9tJMgSzd1P/CZjRvMF8bjFTRsZ6Q3mcY7+aHyqEm3w4U5HaafoYTqvwT1Wub8fsk5e3e1k5Pfdi0mwmyNC89WeduZhnWJS2/a67MjKgjA6LGWzQPfWA98D/b2Eu9fuQePSxwhRns2aecMFIDfxBRwCYKOx2rlLSgmXFaMIBSumWEeeyvlZGOYJw16L3HRRamKaiZvW7OlHYgRoGtvXhBt9b05CD9vAGPGH0rBI8MXH1A== 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=ehIchy6ee/mMpqzkQ1NMYacqJj0bAWFZqY+uFIqdo3Y=; b=TmKu810K/YbjHDl0HBSTuhyaRPSPJvZaSrKmNhtuvx4LyW5v3HXZACGTfumQxcZ7AerCKNzXVtciltracrjVh0Gmg8la0zHy2cgRmBKFdOstMXS8Y4nSw55pIZ82suG8ysZ2wGrHAdAmZ1xu2cMWLkdH1j8Q57dDU5FcVM3RHeWsJbtkffgz2lmYy9Ukzvl0LOG7WEwKQhRIc+TA2A7bLfh7nqrW20KzRXiZCx8bCWrEI3stmyF/NH+BQFfwlLXMGdgxCdpIEunaZ4GoiO8gZ+UCCv2VapRt3+s5oThW+nJhwXO+ixlyD3jmfB4EMmi9h+4EDelbjsXpHR6Ooj/7QA== Received: from BY3PR05CA0023.namprd05.prod.outlook.com (2603:10b6:a03:254::28) by DM4PR12MB5133.namprd12.prod.outlook.com (2603:10b6:5:390::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.45; Wed, 2 Aug 2023 07:53:16 +0000 Received: from MWH0EPF000971E9.namprd02.prod.outlook.com (2603:10b6:a03:254:cafe::1a) by BY3PR05CA0023.outlook.office365.com (2603:10b6:a03:254::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:16 +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 MWH0EPF000971E9.mail.protection.outlook.com (10.167.243.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:16 +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; Wed, 2 Aug 2023 00:53:05 -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; Wed, 2 Aug 2023 00:53:02 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 16/17] selftests: forwarding: bridge_mdb_max: Fix failing test with old libnet Date: Wed, 2 Aug 2023 10:51:17 +0300 Message-ID: <20230802075118.409395-17-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWH0EPF000971E9:EE_|DM4PR12MB5133:EE_ X-MS-Office365-Filtering-Correlation-Id: 3c03eb57-d9fb-4d9e-59b1-08db932d87e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: U3hTy5fOM/XsX5aBUOnkD8ItPc5+P3WAEv9Qn22On7PnOqyA95PWnytMkj4DkqSZxQK0Irfy5vysS8L58b82de9r1ZCZF2DqT05oOgfWvaYVXNOJrXtK9ziYFRGRsVuvaFx3rcI9ZHA/eRjEVMfWKxDZzs7GCPeaTptOWKrhRdqEu0cgheHLXl6dRUPNsBtib8K1MswjFzo6OfO8Umqm4gffye8ycHP76UWsnQIH06a/5gUOlzj20RESlv0e728iiGvOlEYr4xc2OL32ohKShWnY5jO+HhB3V2eQ7MSV2Jas9Ug9evX1kL4I9CmXxdvg+xTRiS6mGeAUkvULucVspdVgrhs6XKWkYH7JpB/ICzA+DXehw9vnivinAMkiwVdNsvxgqrNbvklkFK9fMsdHf/ymqQvWpzka74c9Kt/XZPT5xHRxh0uyRrkFf02fP0fCgN0rFytnUhfA6Ghx4yzYg2ixm6ZkM2mULu9dTwTWnqfpcv3adrnjmHNJ4n9/gmzkQ3uu+BKA2Qs8/HRAJv/qXZTdVOB7xVLl5TQ5vY9E+RyodNKcxOjLrohbc7+M7Norc9q/gdgLsfloPeIhF2wOz0YCicXRYg0py3kp/pF5egluIdHnlOe8DeJHHXz8drK8uPDo+NdCgotzcUpLnFmveY14VriSZG7DUmYpHiELyVZvttl2BgSB3jpVZHrvLUO1XKNyyTnCI/YasK8QMRPusxi/wLIXKfi4yvyy9ibFI+9lS+ic4CalmRW/RM3Pb58bCUrfJaxgZh0B4s38Eq05LZ1FDEhPh/fbnysO0ZDGJns= 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)(39860400002)(376002)(346002)(396003)(82310400008)(451199021)(36840700001)(46966006)(40470700004)(40460700003)(16526019)(426003)(2616005)(336012)(107886003)(1076003)(26005)(186003)(83380400001)(47076005)(36860700001)(316002)(70206006)(70586007)(2906002)(4326008)(6916009)(5660300002)(41300700001)(8676002)(8936002)(6666004)(966005)(54906003)(478600001)(40480700001)(356005)(7636003)(82740400003)(86362001)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:16.5148 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c03eb57-d9fb-4d9e-59b1-08db932d87e9 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: MWH0EPF000971E9.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5133 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,T_SCC_BODY_TEXT_LINE, 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 Wed Aug 2 07:51:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 13337809 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 962BD7476 for ; Wed, 2 Aug 2023 07:53:23 +0000 (UTC) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2057.outbound.protection.outlook.com [40.107.92.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86B4B4483 for ; Wed, 2 Aug 2023 00:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KfG4Oh66OY6zeUYX1Prs2abh1EHnZL3DAOzHRvc3c1SvCPjR/r7RPogZJKSI3e4n6ZPOEMlxIhoOJrsxJrhiDlb4ujJZaHzdgFXR13wJtB6/jW86Ufjvb3nLVR2cIfU8ZPXpieSIxWU6OsuAnAR7NJ027KtTVPaL5FD5MMqdCSFIpYrgncXtjig5AQLCW3X8EAg/xbByUlfe4X+q0fkwbPWd9UPtNWsxMyohZRZXA7FYWdF3YS+GK0TaPbgjz1xsio8yYelnt4SBqNJbalfeSVc//NqkJ02w0CJ/YfJcRGbQqHKzUcAep7LrdJviSFuVrXNGBJP8F4NXi7KSYyX7xA== 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=FSc29mzCBKL/x5/gr/YnTCVPbSU8YrtBnh8ADLzs3SkxMo4AM3aAC1jCDCqtMhf9tyMSXpBQJcSKnU3Ncb52PHozYPlegv60/MyajmthKjpEZZOA74NdyPP6jb7fBY3ty/8JR7vhHn7Htrpn+b7lHHbq8k/KI8a3LR7bXSjCnkVQrDwZAPCzpycObYV5eBUoDiMfPbAldr6vqopOIQf0ApCQG3gxVR/cl4FBgELeF3Ex79S7N4VpacXnoCwt//OQDfKh3ZLX3DzWcpvkAnLROU3wBMrMk3lebbSxjth5BzNShmWxMQed3I7zEXH28tm5OC6F27dATmU9XChcF0HFwA== 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=hY4LdH3HUJjXdfHMOCXvQlivPPQzWf2Vzu6e96uaQ48=; b=R5ruXfGJITrPIiHpMSg56EOCWDqqaZatYFyqkSelhL40tJlLDlyE3AnEC9cXO2x2BUu7Xdi7mbU/iQ82pspdoOW7XLjRKY49KAcY54FuTv/hKg6jVC7awU7x1mE4fxFpgR+Gz/6vFu+iYFZQ/pJRVDDIPul5bTbYhlGNNL9BwYI6ht67yhmmAbbK7O6UpMqSIQM5Rb5zao2WrjlDqGApyhEhMIb46e9XIShyW0V+6I8+Yk3np5pYawJUICx+opaObbXcJ+YrWzYt3JdGh7waLKhi03lOCvExzlBAA0BY6QnjzWueWMEQUbCGL2rt5ZbesIPblmD2faR2q+xzU91Riw== Received: from DM6PR07CA0090.namprd07.prod.outlook.com (2603:10b6:5:337::23) by IA1PR12MB7733.namprd12.prod.outlook.com (2603:10b6:208:423::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.43; Wed, 2 Aug 2023 07:53:20 +0000 Received: from CY4PEPF0000EE30.namprd05.prod.outlook.com (2603:10b6:5:337:cafe::79) by DM6PR07CA0090.outlook.office365.com (2603:10b6:5:337::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6631.47 via Frontend Transport; Wed, 2 Aug 2023 07:53:20 +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 CY4PEPF0000EE30.mail.protection.outlook.com (10.167.242.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.19 via Frontend Transport; Wed, 2 Aug 2023 07:53:20 +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; Wed, 2 Aug 2023 00:53:08 -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; Wed, 2 Aug 2023 00:53:05 -0700 From: Ido Schimmel To: CC: , , , , , , , Ido Schimmel Subject: [PATCH net 17/17] selftests: forwarding: bridge_mdb: Make test more robust Date: Wed, 2 Aug 2023 10:51:18 +0300 Message-ID: <20230802075118.409395-18-idosch@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230802075118.409395-1-idosch@nvidia.com> References: <20230802075118.409395-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE30:EE_|IA1PR12MB7733:EE_ X-MS-Office365-Filtering-Correlation-Id: 3f6d5761-baab-4f05-666f-08db932d8a3c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IEc2hYnSQRbD1zoOMbNdGOLhQzVv43YGS2I30rYt+0zUod1VuHUs8AYHSEdS1tdEO/o2V+84+1aXC4v2WE1VOMcbTZM49KGV6wGO94eeqsLgOAHq6l+Z7z64KoAZO0qI9CzrN1GYh4LuKpzwwD6IKeZZvYlHzuMXG0jWJe/LsyMqLYDw5z5fFDjh0Zs1YZwokoUeDJohDEpyvUfGROe20MRrpalHU5/Di4HUqCGxXlOAGqx6NVf+A3ZSAv19G6nzRgk1nJzaPS/GzcCx035Gls2blBeev5ysQ5obUYH5MV8TSiz1dXi/djpSk9lsmhp33/HpE6AoPH20yKOJrYOWn8vpPE+yTwMpwYMECKwT6R3q4VQTynQ830YXiIm4QnDiRIK/Elqn4OjZXiIq+H84u3PJAgqoI/1p0Xf8BVDFnNILmsd75rYtlxaGR42K7OFouc9z5SALi5wLvE5a05on27yPBEaga5RQ3oEqbSC4xc/46jaOQqrEAP7dUDrYok4vyaWlrrwzUS123Ai8ZxB2QNwJap/Nud8a9Zndb0sWvWtWFY7tL8+Ri/Pqa+CFuLNXTXDJqay2MfYdcNNZgg8mBFsWUaHgPZTtIcQxJZ5lJKS5WblaGnjCCc0eMUKvwHYb0fwB+4BP1FHbwM4mWOb9/JH+jt6BarIh94nTp7z3LscyIXIJbYyZeRQjXz+Xi6naWKtUVN3PTOE3aRbxZ7KDP8bMyd3lhmZXKhfFP/DZDjHNfNJbK16G8oXvI7lHYyFMWoj5+5qK5QE8lgJ9u8c5fT7pTVcx1gjqvA75shYlZWw= 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)(39860400002)(396003)(376002)(136003)(451199021)(82310400008)(46966006)(40470700004)(36840700001)(4326008)(41300700001)(8936002)(5660300002)(6916009)(70586007)(70206006)(8676002)(40480700001)(2906002)(54906003)(478600001)(316002)(107886003)(6666004)(40460700003)(966005)(186003)(82740400003)(356005)(7636003)(1076003)(26005)(16526019)(47076005)(36756003)(2616005)(83380400001)(426003)(36860700001)(336012)(86362001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Aug 2023 07:53:20.3676 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f6d5761-baab-4f05-666f-08db932d8a3c 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: CY4PEPF0000EE30.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7733 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, T_SCC_BODY_TEXT_LINE,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