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: 688581 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: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: 688580 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: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: 688579 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: 688578 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