From patchwork Fri Jun 2 16:20:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265632 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11545C77B7A for ; Fri, 2 Jun 2023 16:21:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235248AbjFBQVl (ORCPT ); Fri, 2 Jun 2023 12:21:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235825AbjFBQVk (ORCPT ); Fri, 2 Jun 2023 12:21:40 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DE99E78; Fri, 2 Jun 2023 09:21:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kVTr9NPC7t9MwMIaOIwMwjtgZa+tIJwQA+bwOI1NN5KZU8dLLL+iz5AGdNX2ZmSFkfvy0N2PF2KhEmL6bJtNtbrShOfYGmhGQgzjES6/ExZdVYdXdKyEE3OuCPkcYtkuVXr25t5ywf3hTjgM9Ji99QgO2JazYsMJZivDltTJ+B7ey+/7ZF66a5LVmAmWQgAobg+juDEiPjxO4F/sVS8YH9nb1Raff5kOYymOaMddglKa8lJ22torKDJCpzFKDWH+DPT9f+YFToDCHssfUlvIuF0QZ0goecSsdIny4kazbdcSdk8g7SQgmbKENzFVol2vfScqlKjoqgtlwoakK5KLUw== 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=qJ18S7DffD5gESrA7mkuqoxH+lJkl+MeliZ8T/l4yDw=; b=QCs/fGFlNrRE5JRU0sf0kjPZSkft3//n6hHPlwKBF24ww+rpAyzu65IhhPjsq2o7na5r8I4HGjpnHugV8SL1mg51vEKWYwYndHXxaKCEVzVGKTdU83/9R2BsCCl90TJT2OSFPMiSZBoyPNUhhfGDyPXk22WfLKzuF9xtf/tGbvbSqSZhdphfws7qct/8xCc9SjpKDZfJoxA/iONIts0rZyNSXrsBK6LvfX7pXNOyFdsg5qToTP68msHS+tTMy+HtaYC9YpZVDGrwc0Ca38I+d1e2PnDOmShv3C1hu9z8SCoIjyhTzRItPn0YapWNtWCYtR3jkcDkgZmPJrMIISPJfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=qJ18S7DffD5gESrA7mkuqoxH+lJkl+MeliZ8T/l4yDw=; b=t+9ztc979exHoYLhh7EHlZumKGxIsTGO6Jl+QEp0K7kYG+ttwx+PRnde3hjtF6yMFoyuIzKxg4sm+gMIMXstYqb4cFQSZ6MO37it1pLNbuPWH02rBIU5c1IvemARVuenJnzc3XMoRxDnIHP/VrsDfrPiXKCyJIx4YD1UIWITlHLjKRjxnTPCwuwWY1po7NaAfF0q5Hs00Kw2nysKIv58JGz4upelu0vkZP/tlwTfhDnfGhVeTscDr8R1IInMjWKYJCbgEh4YKHRdju0zJSwFZMJQuKaMlvVvMSk2g7Hc6NZh16N1gvPRTUyLBEBr/9e+waCmPcoYd3EheS7C2LEFRg== Received: from SJ0PR13CA0154.namprd13.prod.outlook.com (2603:10b6:a03:2c7::9) by BL0PR12MB4963.namprd12.prod.outlook.com (2603:10b6:208:17d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 16:20:44 +0000 Received: from DM6NAM11FT013.eop-nam11.prod.protection.outlook.com (2603:10b6:a03:2c7:cafe::e6) by SJ0PR13CA0154.outlook.office365.com (2603:10b6:a03:2c7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.9 via Frontend Transport; Fri, 2 Jun 2023 16:20:43 +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 DM6NAM11FT013.mail.protection.outlook.com (10.13.173.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 16:20:43 +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; Fri, 2 Jun 2023 09:20:29 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:27 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 1/8] mlxsw: spectrum_router: Clarify a comment Date: Fri, 2 Jun 2023 18:20:05 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: DM6NAM11FT013:EE_|BL0PR12MB4963:EE_ X-MS-Office365-Filtering-Correlation-Id: 778300c8-4ed2-474e-6999-08db6385504b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W0CMo9F2Gg8PDUmjRm8rjMYGpG1yT1NbCsYSenijqbJRszFo/n6XRMa1tH0yV0/0VGGSCJ3ePlLr3qhTpF7xa6zkkbOyUUTCX6Ij3+sZ3oaGNwtqZ8rTLaV7ILQkpY4ShgWzZ0GqLknIMpVU40XS8Td6yG/vYcosYMBJfbh+CwSM2x9QEIw9hBG7X8RfCuAVIbWVSdZNGDsOVcWcRZYJC0uwg+2h/tciamBrC/RoktpSqaoZMVV37KAxAQ6cO52G66yt/r9AkLEeRO/zRKG787uM4sBeTuXxZYXLyWwpC2waNhYvrR9odyTJuEMSmTo76HrDlP4VkHYC70qSSoqRRK4WQyVV7tm+8Pb0YwZGUkAnD8cMA/WbOztf1Z1TaIWoE3t7dKmFqrZFw1I+Afhep0/Z5VOXCDeMKhDMrR2CNzvfSGle4qe0vPW/qRlxb9ASs1B/v6FgWPzpNuuGCDbQaGXvMh6E8z38MUgWFoolRFcFCusZ2yJzffLasXRYXmqc+Vv9csHEjxne81xWTJpYL9UKAwEezC20+BXd5uYS7wcT6Nnet2KOF6sLjx4/DXqYOb9Fv/u6uS9bUBDIZPho9EZpcLrQQs76MNKfg8YKkjLOshdLg6TsL9GSXbedXpt+uLRLVruJ0piK0eMPZveg9AGPVv6ZvDonzoCeymsddBRSHamuvHfJ6ty544n6hQ16SrwRJE7U+fJXaLR7m2Wc/LN8PePRbD6WBna0lBil/ukZCAqGECrXLqjF/JWSSiHB X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(346002)(396003)(376002)(136003)(39860400002)(451199021)(46966006)(36840700001)(40470700004)(40460700003)(186003)(107886003)(16526019)(26005)(478600001)(6666004)(47076005)(36860700001)(66574015)(2616005)(316002)(336012)(83380400001)(41300700001)(426003)(8936002)(5660300002)(2906002)(8676002)(54906003)(70206006)(70586007)(110136005)(40480700001)(86362001)(4326008)(36756003)(82740400003)(7636003)(82310400005)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:20:43.0570 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 778300c8-4ed2-474e-6999-08db6385504b 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: DM6NAM11FT013.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR12MB4963 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org "Reserved for X" usually means that only X is supposed to use a given object. Here, it is used in the sense that X should consider the object "reserved", as in "restricted". Replace the comment simply by "X", with the implication that that's where the field is used. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 4a73e2fe95ef..c905c8f153b4 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -96,8 +96,8 @@ struct mlxsw_sp_rif_subport { struct mlxsw_sp_rif_ipip_lb { struct mlxsw_sp_rif common; struct mlxsw_sp_rif_ipip_lb_config lb_config; - u16 ul_vr_id; /* Reserved for Spectrum-2. */ - u16 ul_rif_id; /* Reserved for Spectrum. */ + u16 ul_vr_id; /* Spectrum-1. */ + u16 ul_rif_id; /* Spectrum-2+. */ }; struct mlxsw_sp_rif_params_ipip_lb { From patchwork Fri Jun 2 16:20:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265633 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2990C7EE24 for ; Fri, 2 Jun 2023 16:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235498AbjFBQVs (ORCPT ); Fri, 2 Jun 2023 12:21:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235123AbjFBQVr (ORCPT ); Fri, 2 Jun 2023 12:21:47 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2071.outbound.protection.outlook.com [40.107.92.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EEDC10D0; Fri, 2 Jun 2023 09:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i3kuCtepuZVpg7VFj6GZQfDDnHeGjrbAWRiylnU+iUSPaF8WXfwG6lZFX1B3Cv0K2ZBWmf+cxoosi4VS22Zzy6NsJPlhxKy9UU+RSmWXk4AWNqFy5MqLPKFsFNHrsDU0eIRpUF+nCNXjg2DYGvGFTNXU1Rq+OOppNfAyPa738RKLGqorto4thCtPzeyqaW3G44egDJUrvySlfe8WjHiAvFqtQYQjOD+sq/GuHprClKc66ng0Te7A7tYO+OZUfdkybm+o8iypf63ZgY3MaVrCsqtcz7HSfmdryyskHyLC89hTypJwFamC/rO1YgZY/Pc1Gxndj03DzYIjIoi0wHFQMQ== 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=TkKqnBsEPH2ize/t4V+AGOtYtNeaOvzVueuMDSRGbyA=; b=Jwk3oq+83iYjMsvbj1gNK2uK66CgtDtLpzNhEbxsSWJNgSL0gVwiIKVCYhknR6OlbNxHcrkV4aWwmjwe6vRryxjhf93WJzZPyPW3KgMs2ECg5wCpmfp2NgbNJpTcWTh1Wq+X31n4zdsQIqkHOjvqsIx2WShOmIg2W58TiZs/nFOAbHz1Al7jMK0+L6aSxNrAiYzYPYTFZQZO7Xq8FuAjRRxW2jUNTSJFKW6flOhVrcZwj0I/BYKnSOsS5AOgABtYiFy3Ofp2eY+Al1JwGWg1yCDSR8HNgSBNeL1U85NZB+15mYf/GvPVCf5yNbW+8I0GrtkN7SKfFq+m4SZ8Y9AQgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net 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=TkKqnBsEPH2ize/t4V+AGOtYtNeaOvzVueuMDSRGbyA=; b=M/QHmYaNtMOvQREVrzRSG4DVC1ODlkitDJNsszO8hVhue76yG44S2gSwY5RG0b1f5uD7RRRvGQUIrBjlWy3/aFSoN2b3mrsZXqF7aVsnsZpoCek10eHqrj9JvKOTBwmi1s9SHZXcwoWMM9FihudqEeQzSXCrjv+RW/GpfYacNOuND4Yd425naz7TWtGbhJn7JV3KUZSY7G8g8MumK45RtdBVYpn2LjTxRN36HZ0GjLdKlbo0isDGHiAPj1QZQ7rZgAZx+KytgVzcT28oNdWLTcD/OlXDwUqMGeubNg+ZiGrZxj8RSTCo/xOPUEI78LLNUMcU3yhFg5mRH7YWqk0E+g== Received: from BN9PR03CA0575.namprd03.prod.outlook.com (2603:10b6:408:10d::10) by PH0PR12MB5401.namprd12.prod.outlook.com (2603:10b6:510:d4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26; Fri, 2 Jun 2023 16:20:48 +0000 Received: from BN8NAM11FT115.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10d:cafe::e6) by BN9PR03CA0575.outlook.office365.com (2603:10b6:408:10d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 16:20:47 +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 BN8NAM11FT115.mail.protection.outlook.com (10.13.177.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.28 via Frontend Transport; Fri, 2 Jun 2023 16:20:47 +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; Fri, 2 Jun 2023 09:20:32 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:30 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 2/8] mlxsw: spectrum_router: Use extack in mlxsw_sp~_rif_ipip_lb_configure() Date: Fri, 2 Jun 2023 18:20:06 +0200 Message-ID: <0bb637131dd9de208a4bf4fa9f7eeaa4d10027f4.1685720841.git.petrm@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: BN8NAM11FT115:EE_|PH0PR12MB5401:EE_ X-MS-Office365-Filtering-Correlation-Id: 60698974-7b1a-4722-d396-08db638552c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uLOJI8QRA6FVDjIgjQ8vusZZts5/DT1PusmZK4PkAnNBfNajTAI1YF1ShqkkceV2kOs9cTluBUiZrvQ/EFDm2ubRp9AuMUkeZ+mi2yAUGMdUKCmbwTwCpOl6FC4zW+0KaS57a4UQpVgG4DRUJIPVhzBe/+APiJ6uXPJtzuUfquFqK8aTanmkuG+VdSAhyTCsKK+BN4YyLgRv5t0MYIYSlB9n0XRLNDW/KAtPqphzA1dCtK/Tals8O0gAIvpuZA2EM7l10IAwf6GSbbAP2YMKuKiArfuHQ5HzahtMNTPGvqO/XbwXFNCKkTtzO3xvP0h7c6H8avcSVTVTpkHNjGcCuSrzqVB+6FEkhrKpMdz0/NH2N/gFHAOsoIerR16vSLdy4b02eTDV9722oKUexTcQQPMCm979AgA/ZEWA64Wml59R2qXEydRGIeEsPguTkPCI7tSxmFbes+9kaD107ErirjW/nmDh7NsSkaptv/MGXJ7q1LTZpSa58Z2oVpmp5sdyusORSRo5TDmNGJ8VjivD0r5Qu1bpaaQpnwiUQg0JpIRXe1PsF79tpUi5ibieDlJwkaV9I/iTXXTAAjkkQ5H/urTzkKIQw/9Z54Prk40N64V6tToNVAZ3oUW6wm//grqNXc1nXD54TWgCYYGSp7k7wrZu5/8nsj1O45cOvYXy05SVtAMteXchZoQjK/flo0kA3G9fjjvUaY4NbvMVgEoPlH6F2NOD4kB+VGAu86opE+hLvOyZfJKiyMny0TptALEtbY5ACPs8bH36KGH2L6kCdQ== 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)(39860400002)(346002)(376002)(136003)(451199021)(40470700004)(36840700001)(46966006)(110136005)(5660300002)(8936002)(8676002)(478600001)(41300700001)(86362001)(6666004)(316002)(4326008)(54906003)(66899021)(16526019)(186003)(107886003)(82310400005)(70206006)(70586007)(26005)(336012)(426003)(2616005)(2906002)(40460700003)(66574015)(47076005)(83380400001)(36860700001)(36756003)(40480700001)(356005)(7636003)(82740400003)(81973001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:20:47.1326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 60698974-7b1a-4722-d396-08db638552c2 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: BN8NAM11FT115.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5401 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org In commit 26029225d992 ("mlxsw: spectrum_router: Propagate extack further"), the mlxsw_sp_rif_ops.configure callback got a new argument, extack. However the callbacks that deal with tunnel configuration, mlxsw_sp1_rif_ipip_lb_configure() and mlxsw_sp2_rif_ipip_lb_configure(), were never updated to pass the parameter further. Do that now. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index c905c8f153b4..20ece1b49175 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -9724,7 +9724,7 @@ mlxsw_sp1_rif_ipip_lb_configure(struct mlxsw_sp_rif *rif, struct mlxsw_sp_vr *ul_vr; int err; - ul_vr = mlxsw_sp_vr_get(mlxsw_sp, ul_tb_id, NULL); + ul_vr = mlxsw_sp_vr_get(mlxsw_sp, ul_tb_id, extack); if (IS_ERR(ul_vr)) return PTR_ERR(ul_vr); @@ -9923,7 +9923,7 @@ mlxsw_sp2_rif_ipip_lb_configure(struct mlxsw_sp_rif *rif, struct mlxsw_sp_rif *ul_rif; int err; - ul_rif = mlxsw_sp_ul_rif_get(mlxsw_sp, ul_tb_id, NULL); + ul_rif = mlxsw_sp_ul_rif_get(mlxsw_sp, ul_tb_id, extack); if (IS_ERR(ul_rif)) return PTR_ERR(ul_rif); From patchwork Fri Jun 2 16:20:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265634 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65562C77B7A for ; Fri, 2 Jun 2023 16:21:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235123AbjFBQVs (ORCPT ); Fri, 2 Jun 2023 12:21:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235249AbjFBQVr (ORCPT ); Fri, 2 Jun 2023 12:21:47 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2069.outbound.protection.outlook.com [40.107.93.69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E1F410D1; Fri, 2 Jun 2023 09:21:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AR18NgE1lZKPabHfnByMC7ZZ+zibHhZqAAWxo0IOp4fkBKeztjrGWmRBku05u3mi7hXngnUu7LE3WTkjdXywomWBZ4PFPRhiMyrf3bg49PLsG3UKQx0zbH5aFN3PmBV9AnI0F6tgnkzwEG5xDKlrCBP95aqQk0+GkxrXgR4q6ddg5pGGYW9kCFyMB4WS9FlnNh5C7HEfzLQsXA/xuGAMN+UnIeY8LnQlDCjpGUgffSKFGzPBJyYaD2rxmGURrL8mpx3yF2qO/NhEvICjsYFDrGYRfIWmegXUNJ/F3KYQS8xmxNsBFlvlh8x1xVQoPqnhEuvKEsHeU5mQH0A10/WOEQ== 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=pwz0QeAa0IEH0+AVI/QMhR6M7G9No7PUAVy7tSx37p4=; b=XasqkER52+LCkXXtIkhJBVgUAzKqmLdLmYEyS7u9ygZIO8SZd1cc275CwbZeXYms7y/8oOD6h1thI/9EELtD0YQM3OiGhTwsJBmS0J0x7nON916M9CO9zdAXo3sw3twuU8NZx002MyVxqlu4+UaEjpqTEglk1EZqmo+wENBPDGXDCP65cy3ogzWsUqX+kiujq6wfChAKkowIyV/ppyCfgYVWyqTUNeuKJbABiYVMgC3s8u7rg832+gjyDjxj2kUiYWmgjIZzhmvStovkXGpAgilf9aUNBGXNSgwwrP4aDiKEOwvRjn7FA/iEWyvhR8sgCkX4YsIn91PLzigRoYqt8g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=pwz0QeAa0IEH0+AVI/QMhR6M7G9No7PUAVy7tSx37p4=; b=VNolPuNMeT7k7agaiVlzuABFc3oYfo3naig86iGgL64qZviyNlovc4kCSM1AqJZGBFoGVZw22R+C9ozSEE8uhKlL7B+Ts+6JuAd2BTHf27J9d+u9Z55YNZFNleCBxBsHm0gut7dHke/f2UF2XkiuaI7Y6Px8Wn3fMtuiAYtOsEIzquFO8W0nSk1T3BlSEWucJohnsh9TmPl7DU7YIsNRC6aaxy4FhTo+Q+HXpT9M2WfYtAvBfbDBDTzP5TLUJ7ISK6MEYrD8pAEa4j+7+PMkb7c06xJEbRZYwZOwgI2T19SEz8hd28Fe4b4/9/oH3MIVACU4xmEI/154xnEgq8suNw== Received: from DM6PR13CA0012.namprd13.prod.outlook.com (2603:10b6:5:bc::25) by DM8PR12MB5496.namprd12.prod.outlook.com (2603:10b6:8:38::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 16:20:47 +0000 Received: from DM6NAM11FT008.eop-nam11.prod.protection.outlook.com (2603:10b6:5:bc:cafe::f1) by DM6PR13CA0012.outlook.office365.com (2603:10b6:5:bc::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.16 via Frontend Transport; Fri, 2 Jun 2023 16:20:47 +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 DM6NAM11FT008.mail.protection.outlook.com (10.13.172.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.27 via Frontend Transport; Fri, 2 Jun 2023 16:20:46 +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; Fri, 2 Jun 2023 09:20:35 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:32 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 3/8] mlxsw: spectrum_router: Do not query MAX_RIFS on each iteration Date: Fri, 2 Jun 2023 18:20:07 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: DM6NAM11FT008:EE_|DM8PR12MB5496:EE_ X-MS-Office365-Filtering-Correlation-Id: 646f983e-ce30-4468-b369-08db6385526b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SR82smzrRMpt3XNDxzZPMm+6XnWxTcnsSdLfpGjHSm3ZmFH3LpGOWUEV2WoOeDiQ1JMbKoCuXSE/964/i0DOJjx5Ry78M3tpGBwbblwQlrd0vkx3WHK5yANAYErGyUk0J2R4jHO12auNwXAxDrttzxaYZb5bACLd46z9j2tTqJj37daUyqVo8LGXNig3q2JuNVxot14v1Q2fvwwIqedVEMDjR/gQfXUcLqkycrUN0Yx7v3O9WfChLFIHH1AZqWNSiWu1zLNKM4OgA74McLrNmfsTo2hmOFtDgPUOJvKhlxo20K5vpYPeW8joEet8+wQ5bIcczCZFoSMW1xqpDlyzXph82t7CjpVx2neO+6i3iGL8bxOxkAUDoi1AzTBzkP23SwvAePWtKyblcXTBdWoVHrTXjlN4NMRd9f10Zk+giyj86YDH3ryQg6P15taXKYYwhdqL9eXUUWEJR2puwudAM3CoBoNJ2noaqfwCDtcvGKb2jSYhVJIG00WCoTGC1YRJ5wLQRUZSdvaSa5MRbEH88KsJWy7tzymfN+DPRh4Xl/HH56kbGy4kD70MkcIX0LOzsqbgFpa0vf10eWhQ8DKleQZEIYLkso7eKXqBQbWWy2+xpmCJpk81LzSap6811VxRw78bi02eyu5uupvU+JfGKEj+GDVzfRNFEpAil3mypgJ7K5URZo/C9Ey/e+9ZhZ+oW2UehfVFyfbkru9KYMy81SsOFWfuuYuhtUEkCcWhLwZyeSprVEGZHn8CgiugBwhi X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(376002)(346002)(136003)(396003)(39860400002)(451199021)(40470700004)(36840700001)(46966006)(40460700003)(186003)(107886003)(16526019)(26005)(478600001)(6666004)(47076005)(36860700001)(66574015)(2616005)(316002)(83380400001)(41300700001)(336012)(426003)(8936002)(5660300002)(2906002)(8676002)(54906003)(70206006)(70586007)(110136005)(40480700001)(86362001)(4326008)(36756003)(82740400003)(356005)(7636003)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:20:46.5616 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 646f983e-ce30-4468-b369-08db6385526b 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: DM6NAM11FT008.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR12MB5496 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org MLXSW_CORE_RES_GET involves a call to spectrum_core, a separate module. Instead of making the call on every iteration, cache it up front, and use the value. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index 20ece1b49175..f88b0197a6ac 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -7699,9 +7699,10 @@ static struct mlxsw_sp_rif * mlxsw_sp_rif_find_by_dev(const struct mlxsw_sp *mlxsw_sp, const struct net_device *dev) { + int max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); int i; - for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) + for (i = 0; i < max_rifs; i++) if (mlxsw_sp->router->rifs[i] && mlxsw_sp->router->rifs[i]->dev == dev) return mlxsw_sp->router->rifs[i]; @@ -10041,11 +10042,12 @@ static int mlxsw_sp_rifs_init(struct mlxsw_sp *mlxsw_sp) static void mlxsw_sp_rifs_fini(struct mlxsw_sp *mlxsw_sp) { + int max_rifs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); struct devlink *devlink = priv_to_devlink(mlxsw_sp->core); int i; WARN_ON_ONCE(atomic_read(&mlxsw_sp->router->rifs_count)); - for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_RIFS); i++) + for (i = 0; i < max_rifs; i++) WARN_ON_ONCE(mlxsw_sp->router->rifs[i]); devl_resource_occ_get_unregister(devlink, MLXSW_SP_RESOURCE_RIFS); From patchwork Fri Jun 2 16:20:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265635 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD945C7EE24 for ; Fri, 2 Jun 2023 16:22:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235825AbjFBQWM (ORCPT ); Fri, 2 Jun 2023 12:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235867AbjFBQWH (ORCPT ); Fri, 2 Jun 2023 12:22:07 -0400 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2073.outbound.protection.outlook.com [40.107.94.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE7D0E57; Fri, 2 Jun 2023 09:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ij1LtQytjSHeZfTlbYvYq4qIKb9ENG1gXKRkd5Ib2s9FYFyk1J7Jy24dBqsNLRJoM6baTqAkDjgBlHiWAMVgtte5zeaVDMekeOk+x9drcApYVWWbHPmE372sGYIzBvewRUSstRAz+TnhMhwMvU7Yoj2+bDL06OYSbtE14HE3zfb3L2thuymsTyCtL/jrSahZctrQXqVnd2tReW0hD65lW1N8F+9Aa2/NVx49sNL6fWNpbE3mC+hnSG0RthHI4/z6SdRLDsj9dW9hBUaRwGHrmZkNt6xeKFzl4DXjVA853sdDrSknVC+/8HfGuRLVcs7E427pc5xa9Ehx9bsWugqQMA== 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=s9giz0xQ60pGzrcWxSkdHE7GN86NMbK2lwKUUmrkQIw=; b=iCaeEsU5vhUOnSzAB1EfgMXLZ/Rg5mnhLFPKVxQ76RG+Xf+walS/hey4DILKv7mBe/LQNUhU6lWPM3KKnFt6QrsB1fOJ6zEeYBT3JUdlvfeYCqsJxGSbJS4biCJUSgULTap3goNVcIPKnVtSOWHaNV7ITvUkALZ6mp6v2UHdJobwArnvVDDb/+CbYUrcQL+A9SEIMXQgNqUJz3cEvdpgN8KsHfVkVQBj1B6o1b+LU+KuGlrgvF0leshmMVTRiZuunxc1+O8OxKbFo4/cuLrUBgYZKOrvsuPz0AW69x7SQoVbXadfAEDI2DhFCgbFXb1AV+3lIhJzVDsXOALbKQfvoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=s9giz0xQ60pGzrcWxSkdHE7GN86NMbK2lwKUUmrkQIw=; b=QltKcDemRJiQLUavzrmxJTVWwM2eyaObiOANVzyxEcaWS5D87QT/SLpVI61piVVB3T2QRzd99IxPuCCniomjVbaIB0PC2NMF0+ZjoJcUyTbgJSrHCPoEOkDgmqROPURV9m2BG12RrzIh5m4kTjFNUj28yox3esLNa9Vq++zW3N+TnVE9800MsvuAZ+c87e3+S1/YxNyRhvjdEfBSGKcdeVIM+G0WBbtUGkOzUXie2EdZPInxmvopwUQr5K421nayH3MvOzfJPDIpVMOruEFqqJ61EY/gm8a45UYqO0d/hoTzc3XQtCpAt/6c78d88W8jw8By3ixawg81QJ71ZSaKrw== Received: from DM6PR18CA0016.namprd18.prod.outlook.com (2603:10b6:5:15b::29) by SA1PR12MB8987.namprd12.prod.outlook.com (2603:10b6:806:386::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 16:20:51 +0000 Received: from DM6NAM11FT090.eop-nam11.prod.protection.outlook.com (2603:10b6:5:15b:cafe::fa) by DM6PR18CA0016.outlook.office365.com (2603:10b6:5:15b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.25 via Frontend Transport; Fri, 2 Jun 2023 16:20:51 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT090.mail.protection.outlook.com (10.13.172.184) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 16:20: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; Fri, 2 Jun 2023 09:20:38 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:35 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 4/8] mlxsw: spectrum_router: Do not query MAX_VRS on each iteration Date: Fri, 2 Jun 2023 18:20:08 +0200 Message-ID: <4e14a05ab55f8fce70ad4c6821a83f910f9b6a88.1685720841.git.petrm@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: DM6NAM11FT090:EE_|SA1PR12MB8987:EE_ X-MS-Office365-Filtering-Correlation-Id: 894825d4-5321-4add-225f-08db638554e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /Dcg2i0QqMaij7h/8BH+ovEIJNj+fYQCFb3DT0yHnY0knckvIjG0W+rgoRhh5bHA2okWQdBc0OoIWlE9NIWJ0b7eXQnqQd6q607EL0vPNNhF0hFjwBfXXHwPow0nWRXxf+kQayM4WjLdcN3rtxyXOigDSzEgc2PWcBC4/yOTR97u+7UD+5JnNxAnIYlZGMyoMVF9/e8VA/lzpKGHkh2M3gV5zxeH88zKI9cRNPTCnGf59sopac3h5ywCRxapHweCuT+YWpI0fQE9TdiaJznYcx+5xIltWyCuPixcnHdK+ylUOwpZHZUyqJNXhNNH9Pa1qaOqf415PzFQK3ZVtW5bIlTNvTyCFUrLj1HEOnSED/70B2tlNTBdSQ06rrn3oE2aFaNVkL0rmta59zqf4M8tNOzB0lCxi3piDosgiudrEsTY/FeWJxnMhhwcGI7lllwOANU/M+QxlUeT795llU+3RJeFdaV/lxh+J6/lKshw4GrVbtiefbwRSDfBUKkDGeu/1uzK8gijV5IM3Oy1EFgkchnjYeIA5tsmBjZlDeULqxB/SbRDpURiXGHaJwIQnY4jdwUYg+LoG2SD4nJMDXBATo5qilWxHUBx2ZCCR3oIRsGWvojJ31jHfudGWAH1DcbLUi2WhQ3dvKyYvP61ril8sHnOXRvYcOu0iQ3afPSAsbAQZwXH723ondRkNu+DOsp+zyUqCMY4/gAxdnU/BFf9apHxpYdAbj0muUdsuwgA53UPm7XyvVAnOaE7DIITedDR X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(39860400002)(376002)(346002)(451199021)(36840700001)(40470700004)(46966006)(36756003)(2906002)(86362001)(82310400005)(5660300002)(40480700001)(83380400001)(186003)(40460700003)(16526019)(426003)(66574015)(47076005)(36860700001)(26005)(107886003)(6666004)(82740400003)(478600001)(336012)(356005)(110136005)(54906003)(70206006)(4326008)(41300700001)(70586007)(7636003)(316002)(2616005)(8936002)(8676002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:20:50.7884 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 894825d4-5321-4add-225f-08db638554e7 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: DM6NAM11FT090.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8987 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org MLXSW_CORE_RES_GET involves a call to spectrum_core, a separate module. Instead of making the call on every iteration, cache it up front, and use the value. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- .../net/ethernet/mellanox/mlxsw/spectrum_router.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c index f88b0197a6ac..7304e8a29cf9 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c @@ -748,10 +748,11 @@ static bool mlxsw_sp_vr_is_used(const struct mlxsw_sp_vr *vr) static struct mlxsw_sp_vr *mlxsw_sp_vr_find_unused(struct mlxsw_sp *mlxsw_sp) { + int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); struct mlxsw_sp_vr *vr; int i; - for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); i++) { + for (i = 0; i < max_vrs; i++) { vr = &mlxsw_sp->router->vrs[i]; if (!mlxsw_sp_vr_is_used(vr)) return vr; @@ -792,12 +793,13 @@ static u32 mlxsw_sp_fix_tb_id(u32 tb_id) static struct mlxsw_sp_vr *mlxsw_sp_vr_find(struct mlxsw_sp *mlxsw_sp, u32 tb_id) { + int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); struct mlxsw_sp_vr *vr; int i; tb_id = mlxsw_sp_fix_tb_id(tb_id); - for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); i++) { + for (i = 0; i < max_vrs; i++) { vr = &mlxsw_sp->router->vrs[i]; if (mlxsw_sp_vr_is_used(vr) && vr->tb_id == tb_id) return vr; @@ -959,6 +961,7 @@ static int mlxsw_sp_vrs_lpm_tree_replace(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_fib *fib, struct mlxsw_sp_lpm_tree *new_tree) { + int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); enum mlxsw_sp_l3proto proto = fib->proto; struct mlxsw_sp_lpm_tree *old_tree; u8 old_id, new_id = new_tree->id; @@ -968,7 +971,7 @@ static int mlxsw_sp_vrs_lpm_tree_replace(struct mlxsw_sp *mlxsw_sp, old_tree = mlxsw_sp->router->lpm.proto_trees[proto]; old_id = old_tree->id; - for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); i++) { + for (i = 0; i < max_vrs; i++) { vr = &mlxsw_sp->router->vrs[i]; if (!mlxsw_sp_vr_lpm_tree_should_replace(vr, proto, old_id)) continue; @@ -7298,9 +7301,10 @@ static void mlxsw_sp_vr_fib_flush(struct mlxsw_sp *mlxsw_sp, static void mlxsw_sp_router_fib_flush(struct mlxsw_sp *mlxsw_sp) { + int max_vrs = MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); int i, j; - for (i = 0; i < MLXSW_CORE_RES_GET(mlxsw_sp->core, MAX_VRS); i++) { + for (i = 0; i < max_vrs; i++) { struct mlxsw_sp_vr *vr = &mlxsw_sp->router->vrs[i]; if (!mlxsw_sp_vr_is_used(vr)) From patchwork Fri Jun 2 16:20:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265636 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65486C77B7A for ; Fri, 2 Jun 2023 16:22:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235867AbjFBQWO (ORCPT ); Fri, 2 Jun 2023 12:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235896AbjFBQWN (ORCPT ); Fri, 2 Jun 2023 12:22:13 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2081.outbound.protection.outlook.com [40.107.223.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CF87E41; Fri, 2 Jun 2023 09:21:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mBLN7wd1b4RdXk+hY6hGNzzSPbC91B9ozsVgnqZh3AG0iDSFLN8fak2+kezeVkV+tmLJwRSVIUmlTuzyO/JHfTsvB5Cr+1iwlXso9xJi9cldpp3T8NtMUIt6VqyaR2mJHMzBEAC8fULiTYWtrrRlR2K0HIZ3bhfjV+GWeWVnbQ3mi5wmlrjh5WFl1Ft/fTFwfOJu64AH6Vq8xgMvX+czSEbV3+z7OIY/FAe7GVH6tPhH6NqnQ7d9FoA8IbPft/N1oJI7/oD15Ed4uC6hXoFGd+j33AiucFAfW4QMg/DJ51RHnh9O0E/0Ib6XOfP8dKOYV8IUsJKFpSyCSqxOl+KNJw== 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=U1I2K5VPTzg/HQOEVjSn80QuIB0m4DaRz5l/ujVdtX0=; b=j4jLzGuIB9ANwBskCbYqe+cUUi1mn1giWBKqOVDhbNu+AQCl7c6KBbYEz81BWhbGg1ssG8jlK39TlkZVlxmNK76bCqrAqvu054ApezFn4G5ipieJPMAeKVvhM2jZXgePOeq7jaG5ZSGLzPDFrkzCkUsW7gebcqd7aNaM//td7cxm5Ge64rgCuaD0opjHwKKrnNzG6STxgIshoiHu8lsDbe8ySr+rER36FCdfVG/xHW89JxbI1OeMeIMTqU5cNWG80cmF6wiP/Q8UXhvXy6PB6toN6SP8E2WTK0Cp9UCr1j5Z/Al8Ee2emKwkRywqxXgPkPhXgme5pbOHavs0nqwktw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=U1I2K5VPTzg/HQOEVjSn80QuIB0m4DaRz5l/ujVdtX0=; b=C5u+n3i7tMMkQ+0w3p02rcxty1p+uNBKzAC1IQ5VpPUL0psggJY2gVi2kVeDeKX9X7cFUTqdQnXkhEqr7m4K8JHrGxh/F5JrjC7O2eqG9TsHDBxxZXvHumiRCNofbexG483zRnWwDaQjvKKJPibBujfP2XLCb/mLWdjzEBmiS/dw2K/tPqpPUp2upsQjXyQkqHU8wfA5vZaqXIeB4kng5zDGEvnLzh7BMV7hyPUTXpB3rOPofS6nghagD41ZRvNltIE5Z0YLPXVbmePvMKnmFFXeNzjuVeyE5+Q7VUjIttYUDJNrjn5sGcVVn16mbv3gLkb6VfHqNg/kISxGa5X8Jw== Received: from DM6PR03CA0100.namprd03.prod.outlook.com (2603:10b6:5:333::33) by PH8PR12MB7424.namprd12.prod.outlook.com (2603:10b6:510:228::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Fri, 2 Jun 2023 16:20:54 +0000 Received: from DM6NAM11FT037.eop-nam11.prod.protection.outlook.com (2603:10b6:5:333:cafe::79) by DM6PR03CA0100.outlook.office365.com (2603:10b6:5:333::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 16:20:54 +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 DM6NAM11FT037.mail.protection.outlook.com (10.13.172.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 16:20:54 +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; Fri, 2 Jun 2023 09:20:41 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:38 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 5/8] selftests: mlxsw: ingress_rif_conf_1d: Fix the diagram Date: Fri, 2 Jun 2023 18:20:09 +0200 Message-ID: <00eb8e5f01883f35852fc49fbd625f2b5fd566ce.1685720841.git.petrm@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: DM6NAM11FT037:EE_|PH8PR12MB7424:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f736c49-9934-45bd-0d1d-08db638556d7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +mk7osvbNmyVBiFEgjV/zet4W2RYgG1IyUUPKwGCWOGfcFE2Yd4rjhghM4VaBHXriYieFeiM5E0RtEIN9GBOkHjHl4yMJQETaPTPDOkUTfnHWynZD14iLKpWqs9ww+Ad089g6rtcknqWtn+bZ36U9rpII6NKqviPNRy33RV9VJQV1TFW2rjWEspSUQdI9u3lT7PK9ZxtI/a5ujCmXbvgBB6QzUYOeHVXMQb/9scmUBE0RGYQFhw0jz8Dg/yhOK0tzY6UJmko1o6crNL2M8SL0pQ6a7np/kgDVAZIQktRZ+z8wndN5XD2oLr2jsEJ9PwPdxgXeqTBgUix1dieoa7Z3c4IlOVYcbPB7dAPa5ugzitQ6NjiQ4L1bNedj7B0hXhW8CF/Gb5bPGLaRpZM35hemmZVz9NCgmZR4utznvmC1Bv3WeSThE2c2wEB8jjJctGhQbdSp6ksuVtKHV24gA+MIggCsdJzQPHicef80m4p4LzswzZn8017BGdKQZ4Zf2UQPId7ctFuykKvsEIvMxD3BirVSgaH2hs+dALk0HpVpbUwXHj0pX8sd/fr2ucxrZUb+QWEJFpSyL9TBgd0sbzpQ14JxHqea0h6fAf9EI4UjnssZwIUfUICWRYenJcg01EqSPvCYjGeWU1FyJTy20uScFWnEbjUwkE/qOpFvHZRVbrdXEawhvYI5PJPn/bBBI+w/SgT0tIngtTRzmPNGcpkt+Vi3CuVig1IWBCbaEFvc0cH88YdJbDldXsNpS0bZqC3 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)(39860400002)(376002)(346002)(136003)(451199021)(40470700004)(36840700001)(46966006)(82310400005)(54906003)(478600001)(110136005)(40460700003)(8936002)(8676002)(5660300002)(36756003)(2906002)(7636003)(70586007)(86362001)(4326008)(82740400003)(316002)(40480700001)(356005)(70206006)(41300700001)(83380400001)(47076005)(16526019)(186003)(2616005)(426003)(26005)(36860700001)(336012)(107886003)(6666004);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:20:54.0229 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f736c49-9934-45bd-0d1d-08db638556d7 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: DM6NAM11FT037.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7424 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The topology diagram implies that $swp1 and $swp2 are members of the bridge br0, when in fact only their uppers, $swp1.10 and $swp2.10 are. Adjust the diagram. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- .../selftests/drivers/net/mlxsw/ingress_rif_conf_1d.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/ingress_rif_conf_1d.sh b/tools/testing/selftests/drivers/net/mlxsw/ingress_rif_conf_1d.sh index df2b09966886..7d7f862c809c 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/ingress_rif_conf_1d.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/ingress_rif_conf_1d.sh @@ -15,10 +15,9 @@ # +----------------|--+ +--|-----------------+ # | | # +----------------|-------------------------|-----------------+ -# | SW | | | +# | SW $swp1 + + $swp2 | +# | | | | # | +--------------|-------------------------|---------------+ | -# | | $swp1 + + $swp2 | | -# | | | | | | # | | $swp1.10 + + $swp2.10 | | # | | | | # | | br0 | | From patchwork Fri Jun 2 16:20:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265637 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69A7CC7EE24 for ; Fri, 2 Jun 2023 16:22:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236293AbjFBQWX (ORCPT ); Fri, 2 Jun 2023 12:22:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236053AbjFBQWW (ORCPT ); Fri, 2 Jun 2023 12:22:22 -0400 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 AEE3110E6; Fri, 2 Jun 2023 09:22:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K4o6Ta2ITlS49SpMT3nAb4AHhNo9uZDOKCR2zcYDAsAenELoVMUTNmUG/A7fXrBOtz4mtIyq7yyb4ytpKkWvpzeS+n3gPokzSrnC4dY6oGR8drByI/MHlAfSaWUxRBORkOtEXHyAD0yxjrCIRHbeyaItAQzdnDTEyP8H+anFlnQ3NpcYCalpF+bw9I6jwl6/6H5vYszkRd6lN5z8ZOO0m4TyJBj3+dvGtDS7afm2u3CsuXPBmBVEH9PNkfJT1o3fZ4EZkfHbvFvo8eVjH8CxlbkGnGp6x4OEdk9iZZsht3Ach+qfA58ECZb4VuvdwSEG73IojSZqADWgVBPC9C5vog== 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=SiszpKMqvloQVF9j8LVfLQwjAD3dpyRGQxiaInpAWjc=; b=QYh6RTz0xPwxB/Rm9bmptvw2d9AwC9AtaRd4i4qo5AxCe9nTelWfLo1Po8rSK7wQjrDvvpMjT8WYZEBoEVzYo7pDndcdaohjBstXvN300FyIkzSq7fK31bPim10/tWXWVdotnPlCAV1Hsn526DfYxKjm6fuTcgAKpn/LLVTuqS1y0hbNzRHNFV6jmPf3x0hkIu0UqqMjmxnyZhOzdx6vPHGzRi9rf7N/NbgxIpAAbnVs3AyzifUuCM86LYEcA4UKAi9l1sf4MEJ6HIEsW5pZMFPYwnoQcoYT5utGam27DbJVtNvR+zE21FQ1f1Snr7reb7ceb5K8pVH2mQSyqU5bZw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=davemloft.net 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=SiszpKMqvloQVF9j8LVfLQwjAD3dpyRGQxiaInpAWjc=; b=hInCKDrYzM0vrd9hwzI6S3/iCX6UKIixp6dn3yJWIBETk9p5wJuQnJhRF4lnYSAxAyhVtAHduvO1TUsyUwL3cb99aLDkU6sc7y6bNVtlz61S8ctXF//bV0NoBGMHHgD91RBt0Cv/A+jbDhgeeOACtbAiVpL68vcph6PgEiYVBCEu6AQGmFIibE9xQkRjKvu4d6Uu/FHg/hMFjajM+3ffRCKesC8ryw4Y4+LtrftOFpU0LU3QkbHhke91KsjqPP7eat7aAKxbb5KK0CpL9GdW0+RTpC93nOlCe9nL8iQVPfziYu14ULgYe388C68zwVAuQNF7q+QfnZz/84YAZzFDyg== Received: from BN9PR03CA0110.namprd03.prod.outlook.com (2603:10b6:408:fd::25) by BY5PR12MB4292.namprd12.prod.outlook.com (2603:10b6:a03:212::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Fri, 2 Jun 2023 16:21:00 +0000 Received: from BN8NAM11FT086.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fd:cafe::4b) by BN9PR03CA0110.outlook.office365.com (2603:10b6:408:fd::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 16:21:00 +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 BN8NAM11FT086.mail.protection.outlook.com (10.13.176.220) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 16:21:00 +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; Fri, 2 Jun 2023 09:20:43 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:41 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 6/8] selftests: mlxsw: egress_vid_classification: Fix the diagram Date: Fri, 2 Jun 2023 18:20:10 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: BN8NAM11FT086:EE_|BY5PR12MB4292:EE_ X-MS-Office365-Filtering-Correlation-Id: fa4db82e-a3a7-4411-7df8-08db63855a76 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vBDesdS92K+zJGYXqsVjSMndBUl/XkH+3PVmt0G57wSPgTtTqkq9gk/+L5qZ2ivcksyc3n+mEatJ9zqqQFBHpRsxhDNL2zXk6nCBrOYeDtYQn7lhQePeSP97JhOfWmQLlre3RVV1gGLIdJIBSIJ5931F3RuHuh9rqHdTyMvwIAkVgE4baJ6HAt8Ilatp09XpGFW4XMDbVxdfCKPW7bv5xOSwNcWskr56j1esSVECd/KAzqoiwDeAD/BiLzmzKGclsMnNsL8HcGac0+z5AQI/kf0OnDjd7b74k4Inu+0nrWvT1xE7GIFMGFry4ogKUheVRi2tycdyZkXpqUN3Dv9XvEwWEKKwJfP9t+HGoDO3l3l08/ZkXwI5FY4XngnljucytXd3JEI8o1dY/TUB5tL+ajlLYv6O+hfpVBZnNjfZGzSHmv/9kDdmyhw7rPAcOKzS8YPaowgXubeWnQryQ29+Wywgbg+Bt8rkPTsPpLC9mUWkaQ0Pqr7jNNkguApEdjfD3Lf9boCa+tsHy2qEuySh+iCkQYRUea94a0G2osVuyetJxOAGQVm/d6WGaRlLu14On4i2GMAfsFIWQkC/6D3G+9GWNN1DE6D2J3dY81k5T84Z533vVYp+qhwchGPDEMaWftRMeSJSMILWTxYerPU9p8KeVJx3gP18g1LDS319vzmCpw4QPRciLdIwJHKZeXmJWaf+DSb2uJXrDaM7BBeGNqBalJZiS+QqxAUgOZe8TL1zR1e6u81eSornilNhZCk2 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)(396003)(39860400002)(346002)(376002)(451199021)(40470700004)(46966006)(36840700001)(54906003)(6666004)(316002)(2616005)(110136005)(478600001)(4326008)(70206006)(26005)(107886003)(426003)(41300700001)(5660300002)(8936002)(2906002)(336012)(8676002)(16526019)(186003)(70586007)(47076005)(83380400001)(36860700001)(356005)(82310400005)(7636003)(82740400003)(40480700001)(36756003)(40460700003)(86362001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:21:00.0541 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa4db82e-a3a7-4411-7df8-08db63855a76 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: BN8NAM11FT086.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR12MB4292 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org The topology diagram implies that $swp1 and $swp2 are members of the bridge br0, when in fact only their uppers, $swp1.10 and $swp2.10 are. Adjust the diagram. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- .../selftests/drivers/net/mlxsw/egress_vid_classification.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/mlxsw/egress_vid_classification.sh b/tools/testing/selftests/drivers/net/mlxsw/egress_vid_classification.sh index 0cf9e47e3209..a5c2aec52898 100755 --- a/tools/testing/selftests/drivers/net/mlxsw/egress_vid_classification.sh +++ b/tools/testing/selftests/drivers/net/mlxsw/egress_vid_classification.sh @@ -16,10 +16,9 @@ # +----------------|--+ +--|-----------------+ # | | # +----------------|-------------------------|-----------------+ -# | SW | | | +# | SW $swp1 + + $swp2 | +# | | | | # | +--------------|-------------------------|---------------+ | -# | | $swp1 + + $swp2 | | -# | | | | | | # | | $swp1.10 + + $swp2.10 | | # | | | | # | | br0 | | From patchwork Fri Jun 2 16:20:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8831C7EE24 for ; Fri, 2 Jun 2023 16:22:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236607AbjFBQWg (ORCPT ); Fri, 2 Jun 2023 12:22:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236816AbjFBQWc (ORCPT ); Fri, 2 Jun 2023 12:22:32 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2066.outbound.protection.outlook.com [40.107.220.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21A661AB; Fri, 2 Jun 2023 09:22:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bj5dw4LPZmTtOeEMTFfvCr6uxy/3aFt0yTCSJktv6x3wxYrwrJZI5GmQWrfludshn7bEg1eRLfMA1XuwopaJ5ezGYmhme7gWc8UWJZE8FY3OMC3q5go58mqZeKP4tX9FOG5mWV2FpFpXSfK0drk9acb0AKNJ04jvAq5/3qzvFMqf68CwtKvTD81ruTOLFzgfcLFk1j6fQWo3ogrgiuyneL+9YHK2jY11cHrfjRSOn/P0UTl02TR7vfnL+HQDIRdfMwyTeavNRXyeumi/GmK3/ZBDPAtX8IYMfw16gy/cVhbL+suKT01E9T+6r4EaMN4t2k9evjzEAAde4lp9p4oPrQ== 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=IJ5mpvWzr3y70pG85Izmkyk3Jg6hTeD6XxEAbG11yqM=; b=b8TkS2FzOfkXEwsLzZ3q5JXeaS1wKtma/RGq51lvcRdd2ExziT9lgbAB/cJ4ldrfdMlEoLnWST/DfV2TfIL1h+QbJmBNvwRAGjizJtEbvl8TkmdDCLgDegtbGID5PVm9d/uGVwYLnrGCzAaBC9t49rzHD/+4ExuPAe0AFUsejsic9mcZ7YATVaKu3roulnbYBsSkOdXpqLcREWspPbEjg5Vvku3wPf/S1oybJxCM+VSqYs0F1MQ9470/s2sjWpl0NKGLZE4i5dcKnRE50VcxIJ8VXLFBZR6yVm4UtiN84IB7+11Y+pzueTJliC64KfK+Q4SmLcGwuJYt+/1GXeGmyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=IJ5mpvWzr3y70pG85Izmkyk3Jg6hTeD6XxEAbG11yqM=; b=oArlkeCWq+EnTyZW1IyLOVMQL+m9lo3mKmwx7j9hMF2ggfGQJQJtdwCnEdb28mOF/vx1eRbMRpQsrH9/mC57sjG5uBy292wmNZdfrOlS/R0qDbZR1c7ZenQEitOmPDnqqsmAftqWUiutc44IjJnaLNWGxjiBGFDoZdip8km6DVzwbvNTqS0fdSqlsfCGCYnalOXxZEJD2oAkgOCHSFepEZbSAOd385u3UhsQf1fa7d6kygKpFeu3RBgHH8wHSZv56+1GR1c+d4V/Ms45uvQYpBCUfPyzpxDv59KKgnJFqMGBeNT4CsjDTkdI/oZzze6zNpdIY8IYkwFcEvxmEXf9pg== Received: from SJ0PR05CA0182.namprd05.prod.outlook.com (2603:10b6:a03:330::7) by PH8PR12MB6988.namprd12.prod.outlook.com (2603:10b6:510:1bf::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24; Fri, 2 Jun 2023 16:21:05 +0000 Received: from DM6NAM11FT104.eop-nam11.prod.protection.outlook.com (2603:10b6:a03:330:cafe::a8) by SJ0PR05CA0182.outlook.office365.com (2603:10b6:a03:330::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.12 via Frontend Transport; Fri, 2 Jun 2023 16:21: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 DM6NAM11FT104.mail.protection.outlook.com (10.13.173.232) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.27 via Frontend Transport; Fri, 2 Jun 2023 16:21: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; Fri, 2 Jun 2023 09:20:46 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:44 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 7/8] selftests: router_bridge_vlan: Add a diagram Date: Fri, 2 Jun 2023 18:20:11 +0200 Message-ID: <975bdcb89ebe3b04015648f498263ecf24135205.1685720841.git.petrm@nvidia.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: DM6NAM11FT104:EE_|PH8PR12MB6988:EE_ X-MS-Office365-Filtering-Correlation-Id: b006cfc0-4b1e-47d2-b433-08db63855cd7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jCj8jcI5g7u0sDterfdTTtwdlYGVz8kjE3RRpFk47qgWg/xehFqpXA0mlEpaP/gxAA3BSR8Fkz/jBjoVWi6fuv7T8AJfC2mdzKBzMdWG+AbillmLyGV5KiaADHyuZHHY63liCGrh67jGd9QMgT33+ZzhYBWBsmUlojik+2iG6CCNGXj2oB/ePAioXCFZWt2KlLuIom17iZL7caPi2EXT5saca4bVl4j/U/YFzPDjyv09dciQuze1f0U/TZJgg6WrSNPBmb9YC1z5PK3jg7Jbcg5+L2+M4s9i2zWK+pMZTvLvmNXHy+E3OYvnS48RQMl9EEr/76xxzhTiPffqE5n5MCAi9OsaJQDqmcZExfIOQEAK0J+Cuz4KW1yscIEJ44oVsBVZ9LxxC7dQlxFKn9CEW6bIi8aMYHdWI0bFfVaTxpGLBPXKUBGU9rCpcniiydSlfut/6uCdNyaQ3hf7IAp2xyg2M1H1+xZPCkukw1e6rkSUcGjOtuS8rjBoQ7t7wqy3wNlSYStPo7ZV41jZDlfZHNuZP1dFUC3a0vKAjUHevDvw4xdwlr0CEe7/y8COF4vXpuL2XtQiajesMVemHfoLO6ynwEEjLUh8Y9LvyIGaKFhjbuHDgOsCCD19GSujB8aD5+tmJ9c+7+olIW8zeFoZZ4/+427JHU1ikgAGfaTn9OrNBX+BN+6Ce71u4XeJIIx0DTa2tjXbAgJQZ6R54Rbf/36qeqDAdzhVkx2qOehBiSsQRiB/z9bckzNluRuesEDl 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)(39860400002)(136003)(346002)(376002)(451199021)(40470700004)(46966006)(36840700001)(2616005)(36860700001)(66574015)(36756003)(47076005)(426003)(336012)(6666004)(40480700001)(16526019)(186003)(107886003)(26005)(40460700003)(82310400005)(2906002)(110136005)(316002)(41300700001)(5660300002)(70206006)(70586007)(4326008)(54906003)(86362001)(356005)(82740400003)(7636003)(8936002)(8676002)(478600001);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:21:04.1091 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b006cfc0-4b1e-47d2-b433-08db63855cd7 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: DM6NAM11FT104.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB6988 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Add a topology diagram to this selftest to make the configuration easier to understand. Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- .../net/forwarding/router_bridge_vlan.sh | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh b/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh index fa6a88c50750..695ef1f12e56 100755 --- a/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh +++ b/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh @@ -1,6 +1,28 @@ #!/bin/bash # SPDX-License-Identifier: GPL-2.0 +# +------------------------+ +----------------------+ +# | H1 (vrf) | | H2 (vrf) | +# | + $h1.555 | | + $h2 | +# | | 192.0.2.1/28 | | | 192.0.2.130/28 | +# | | 2001:db8:1::1/64 | | | 2001:db8:2::2/64 | +# | | | | | | +# | + $h1 | | | | +# +----|-------------------+ +--|-------------------+ +# | | +# +----|--------------------------------------------------|-------------------+ +# | SW | | | +# | +--|-------------------------------+ + $swp2 | +# | | + $swp1 | 192.0.2.129/28 | +# | | vid 555 | 2001:db8:2::1/64 | +# | | | | +# | | + BR1 (802.1q) | | +# | | vid 555 pvid untagged | | +# | | 192.0.2.2/28 | | +# | | 2001:db8:1::2/64 | | +# | +----------------------------------+ | +# +---------------------------------------------------------------------------+ + ALL_TESTS=" ping_ipv4 ping_ipv6 From patchwork Fri Jun 2 16:20:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Machata X-Patchwork-Id: 13265638 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB5D1C77B7A for ; Fri, 2 Jun 2023 16:22:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236500AbjFBQWf (ORCPT ); Fri, 2 Jun 2023 12:22:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236814AbjFBQWc (ORCPT ); Fri, 2 Jun 2023 12:22:32 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2088.outbound.protection.outlook.com [40.107.93.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15E7DE55; Fri, 2 Jun 2023 09:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YFPKddFdVkpmm+Ad1vROGPv9A4PoGEW9VMNURshy8ckUglmXiWtv0mCeZY/MOtpbpF1v/X+nZ9vvTWTSwxyFAvU+5QyvIoESofVUf5vM4a5vxwbE+9KUAhZDwpa+8iDB2Y/PTvGo7Kkc1x0Kalz6qD/ZX2doO//LrN0GFswxQ/4mPTjwFZ2nYm47Jt5U2MtUvtMnL+poS8HJbd/Mbgy4B8kaUN1Y7oIBocoD4QnYpj/2z7Sd/swx55zJGFU2lrVHGfeGmJPUwYaPdLeGk7TP3uwWUixuYu8HDIn3BHQWTmqyBPl6k4soZYgayOWy3z+PfFJP+jvoH4Z6mf9e/PBHXg== 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=U3lsimMA0ii/AP2+R03TRG7R10RPbyRiOm+fJHshXt0=; b=HcGSdS0qiVS/xoPnDDRDtYIJlXb0ugXE6yYRzMsqURtvXvqqofHrNnQroNZaUwO1xzOqKNTs+SGA3C9KDxBqNOolt1iSNfslUfrwbapeJmnfkPKMjXC/8Z8RHreoy8HP5Sn+JR8hv7tgnHwSlz4RS6YGjLazdogrPdwNV9bjmUVzLE0NZZ9X9fTxEec3eCpRShq6u/rD3MJ6aF6rNtOmrNJv7sBNlycl9vMW9D0FzFPX/LUQ5krt38YFwF0K6sv9/pzCfEh4wgsbjX57P5caTpARi5yNWTc2bN898dLS1Z/AZXQ3lF+mviFYDAkgZl9aBmmBHr0Pz8Y/xnX5AMDCkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=davemloft.net 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=U3lsimMA0ii/AP2+R03TRG7R10RPbyRiOm+fJHshXt0=; b=DYayi3fld+EpQfqyxD1PJJFyyHThNBw1E2pCwWd6UBJtDp/o7RqeAl+cQ+PflfhVLEOEcFgTKaW4896D7jcmTeW9zlhgx3cd7poQVfuHckWrVDLRFdVIBN0urChHe/P29STevQqOIlPfLI5RBpVeFzJb+eb8MDnJ7aXBwH5pQy3wGdTeCett5Pbu3Rx6Pw/Xa6Sbcozug37X/C55k0bFPP5Nbz9cVywTeSNAMAGjEOQNCLPqI07Ns3BoMUmr0R1+sIz2Lz4EnjqXDoTNjt4buMo1YzCwLUHWJEt8wUJgOFZSqcbr2bMZ+Exa0/A6fBYf0EXRTgAxlwuKJbe7VcstDg== Received: from DS7PR06CA0020.namprd06.prod.outlook.com (2603:10b6:8:2a::21) by CH0PR12MB5186.namprd12.prod.outlook.com (2603:10b6:610:b9::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.22; Fri, 2 Jun 2023 16:21:08 +0000 Received: from DM6NAM11FT085.eop-nam11.prod.protection.outlook.com (2603:10b6:8:2a:cafe::e2) by DS7PR06CA0020.outlook.office365.com (2603:10b6:8:2a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.26 via Frontend Transport; Fri, 2 Jun 2023 16:21:06 +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 DM6NAM11FT085.mail.protection.outlook.com (10.13.172.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.24 via Frontend Transport; Fri, 2 Jun 2023 16:21:06 +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; Fri, 2 Jun 2023 09:20:49 -0700 Received: from localhost.localdomain (10.126.231.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; Fri, 2 Jun 2023 09:20:46 -0700 From: Petr Machata To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , CC: Ido Schimmel , Petr Machata , "Amit Cohen" , Danielle Ratson , , Subject: [PATCH net-next 8/8] selftests: router_bridge_vlan: Set vlan_default_pvid 0 on the bridge Date: Fri, 2 Jun 2023 18:20:12 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Originating-IP: [10.126.231.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: DM6NAM11FT085:EE_|CH0PR12MB5186:EE_ X-MS-Office365-Filtering-Correlation-Id: e9a36647-1b60-4587-65dc-08db63855e40 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8OcyxdsAFyfMQ+L0fMXi5U4AX7meWa5dz+y+VYyyaaT5gvBnqlA/I/dj3wrFUkpMrIjtooErN0mBVJAeFStqoc+MB+l0NrJcRSRx3yZOKt1YCMjmmQmWZTnDb2ca8DO6CC142F3XIVyA+PYdfI8DkxMAB7lW/vN2IdkKodteh8L4NmWpVb1edDmDIoy5oLwKPbRRZasshKhaGyRMqNSrztWFTauylHwNnZZXbnphPLIfjFwq1CWmzsi2yQ3BFupBJ3aA1aGUYWBmm9GZKswx851HbkhmD0rNli89ooGY98L271BxstTMSrbKZEnzUZJVLHWyJkpJaF3GQoPGkMck6WOI/23hTn4bD60mjNCEgf8RElQbC4VneghVwszuIGVaOzA9FFHo4YPOY00fAnoyhE6nbJ0Q6KaOmz4uzVGEJh2MSuoytXC8N3W+5BldyST73pWIVjGI6pS6SgGTAug9GPnye2ujJgHuam0i9yRjWUnLrEZLkFSqLoVZU5FOIEmiuCDmt2iLFx9wNRsJjqEJLg2BWh96V4mnicCuhz0Wq6IvVxOzlufXokdg8Z6RWI6arrSSroGFRxK3dv744CLz4mWqTeGnUD7RIcpCFe6Ry3NfAUflmKDEQCVE/Vj7UpX+pBheHD3JvMOiC9ocje8OYW+wtmlI34Eo1XBZD7zLwGqLezb/XBNKk+l2cnX1ycVuKeIJqHNHtJFAuxj1qUsjnVHRu1r5OYRHorYNDR4naYU= 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)(346002)(396003)(136003)(376002)(451199021)(36840700001)(40470700004)(46966006)(186003)(40480700001)(6666004)(16526019)(40460700003)(107886003)(26005)(316002)(70206006)(4326008)(70586007)(82310400005)(86362001)(8676002)(8936002)(5660300002)(82740400003)(7636003)(356005)(426003)(41300700001)(47076005)(36756003)(83380400001)(66574015)(54906003)(36860700001)(110136005)(478600001)(336012)(2616005)(2906002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 16:21:06.4729 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e9a36647-1b60-4587-65dc-08db63855e40 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: DM6NAM11FT085.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5186 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org When everything is configured, VLAN membership on the bridge in this selftest are as follows: # bridge vlan show port vlan-id swp2 1 PVID Egress Untagged 555 br1 1 Egress Untagged 555 PVID Egress Untagged Note that it is possible for untagged traffic to just flow through as VLAN 1, instead of using VLAN 555 as intended by the test. This configuration seems too close to "works by accident", and it would be better to just shut out VLAN 1 altogether. To that end, configure vlan_default_pvid of 0: # bridge vlan show port vlan-id swp2 555 br1 555 PVID Egress Untagged Signed-off-by: Petr Machata Reviewed-by: Amit Cohen --- tools/testing/selftests/net/forwarding/router_bridge_vlan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh b/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh index 695ef1f12e56..de2b2d5480dd 100755 --- a/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh +++ b/tools/testing/selftests/net/forwarding/router_bridge_vlan.sh @@ -63,7 +63,7 @@ h2_destroy() router_create() { - ip link add name br1 type bridge vlan_filtering 1 + ip link add name br1 type bridge vlan_filtering 1 vlan_default_pvid 0 ip link set dev br1 up ip link set dev $swp1 master br1