From patchwork Tue Jul 17 15:36:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10529867 X-Patchwork-Delegate: idosch@idosch.org Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E91B060545 for ; Tue, 17 Jul 2018 15:41:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88001296CB for ; Tue, 17 Jul 2018 15:41:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85B0D29711; Tue, 17 Jul 2018 15:41:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, MAILING_LIST_MULTI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A1EEF29645 for ; Tue, 17 Jul 2018 15:41:15 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41VPdP6PxlzF3JM for ; Wed, 18 Jul 2018 01:41:13 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="paPWOB4R"; dkim-atps=neutral X-Original-To: linux-mlxsw@lists.ozlabs.org Delivered-To: linux-mlxsw@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=mellanox.com (client-ip=40.107.0.59; helo=eur02-am5-obe.outbound.protection.outlook.com; envelope-from=idosch@mellanox.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=mellanox.com Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=Mellanox.com header.i=@Mellanox.com header.b="paPWOB4R"; dkim-atps=neutral Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00059.outbound.protection.outlook.com [40.107.0.59]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41VPYV0rMWzF3Hg for ; Wed, 18 Jul 2018 01:37:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=arPlvydFnxrIFMxwNMD3e6usPKzpS0VJ1qtrW+wEbIo=; b=paPWOB4RKX5QXRgPbAi+Ez59Db3/e2MSH91fPWDei1VgYXXdM4O8jB6J6v6QqUaSLKdjtOjte/9vdPxH0u4dlXp7NOC20e+jlT6wCfGlE0R8qBLF9s5hkEQYyvPqKX9ID2R9WuJUtKAmEm80LsHHqwykT7pE2SKYyJlMKXZkgRw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from splinter.mtl.com (193.47.165.251) by HE1PR0501MB2330.eurprd05.prod.outlook.com (2603:10a6:3:27::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.952.21; Tue, 17 Jul 2018 15:37:38 +0000 From: Ido Schimmel To: linux-internal@mellanox.com Subject: [PATCH RESEND net-next mlxsw 13/18] mlxsw: spectrum_acl: Make global TCAM resources available to regions Date: Tue, 17 Jul 2018 18:36:52 +0300 Message-Id: <20180717153657.16324-14-idosch@mellanox.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180717153657.16324-1-idosch@mellanox.com> References: <20180717153657.16324-1-idosch@mellanox.com> MIME-Version: 1.0 X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: AM0PR02CA0020.eurprd02.prod.outlook.com (2603:10a6:208:3e::33) To HE1PR0501MB2330.eurprd05.prod.outlook.com (2603:10a6:3:27::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b836657f-6ab6-4229-017f-08d5ebfb3a72 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(48565401081)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2330; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 3:jMXHfRQlzfrBob5PtOFE2qrFXPFRRbJEUALG4xyzDnDyCvvKRNKRtEGpoPlJeQ10GZfbAEJUtC+k6DeJtHOTXAm1f3UJnuP0ArAD3ZD74UKSrX+ZsIHLOXaqr+E6sw2QXjQj2Si5ggNwieLEPASYKavamAQ4g8qD9XRI6d2d3ZdlBvbk+errldwTCA3l8SRDSm7wLZPkIueXA35VvSDk3H08fKRx+ZxqQbN2wF1agMvhC1KTDC6uQlW6xoMG48iw; 25:8VuzYuqUhK+VokXXka5gHgqt39uemFo0RmwG4Tn1jtCS5B3hfaE8LPg0pdAcl6nroatAcLxsaYICaWOa64OTGpFq1t4R4sEnjYGQ2CMSpjkUyk5x1KVvl2yh12yHavJ0pqVQIL/3a1qlBwtRuo/EgewtCWEL1KMmDNmkYB3gLjKYNmdEFGdRqX4V/MEgZEzkX+5G0ls/RQ4Jn3rUHn1f/OmtVCWChliP4A3gfEW7u/xGylXde3jLI+3HeJfyPB2m2FvFFAAXVLQpvGwXtLFqn9aya3KFTO4xbUaPH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/fCxZNEcJVH2090YRyT6Oh9Mqv6T4xCH2a57KaZQddi+KSfRTTwnJXH8Gmj4EVVKmefpHCYiri09V0g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231311)(944501410)(52105095)(93006095)(93001095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:HE1PR0501MB2330; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2330; X-Forefront-PRVS: 073631BD3D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(396003)(39860400002)(346002)(136003)(376002)(366004)(189003)(199004)(51416003)(2906002)(8676002)(476003)(8936002)(6506007)(956004)(81156014)(2616005)(6486002)(2351001)(26005)(386003)(81166006)(16526019)(107886003)(53416004)(486006)(105586002)(446003)(4326008)(11346002)(34206002)(106356001)(66066001)(53936002)(47776003)(76176011)(68736007)(478600001)(6512007)(316002)(50226002)(50466002)(52116002)(7736002)(2361001)(3846002)(16586007)(305945005)(37006003)(97736004)(86362001)(6116002)(36756003)(217873002)(575784001)(1076002)(48376002)(6636002)(5660300001)(6666003)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2330; H:splinter.mtl.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR0501MB2330; 23:OfjxhwY9TUHaDsQzzJhgWbgvxGREz3Mq1JoNYjf?= =?us-ascii?Q?E2Ynu7nVZ/wnT/jD8fWi3Zkag/wC82V+sKfjpl3zdo0N6Vix+Z2Jhd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j5KEySsFSGWMH+g+rcn15lnjZfUcESFm6jKUF2vkE?= =?us-ascii?Q?wx/d2HDV27MCjIamCiU/+Pwl6srVsXcunzGcOCCyEcTx1iD/9FSRL/g1+Ojt?= =?us-ascii?Q?QIs2J17nCxWijxrZx+6mguzPW5NRlAVuihZpn/2YsI+ZxwZ9vevwwvCUzX5n?= =?us-ascii?Q?New5aIjB3Tbl8vHpSwBcUkz7BFbVKtzHtRDcDcQYCMqVMYNok7pKKSP3uiLu?= =?us-ascii?Q?mUpQFtUeSVIfvPpQBcH479G0BADrafLaZkZU9MG1hpUt1WzaeN+X/xrK6MAy?= =?us-ascii?Q?MSbAShh7446DRjGzd+NTxNEf7UsC7wxKC9smzRTGCEiEGghsDQBZbIdTZrH1?= =?us-ascii?Q?S24XXJDZPCGX/tXU//phOfPiCYaeJ2rYij9ZIZZ2mZ362G3TkkLvTVpmpD/T?= =?us-ascii?Q?quz+azA=3D=3D?= X-Microsoft-Antispam-Message-Info: D+uXcWCjNpal210fXeIngiSGpzGpkskT0wnLq6M4gzudFeJnp17Bh3lSMQSyRjIt0teIbv29OdvrzFp+RJD7t+UswIllK2Sl9X34PKVy78G3fjgCQFTiKlGNRScmgNJv/KJQSmydFQ/W2sJ+u+D0FLJb60vsDhXZyAIudu0qoQsTNF4cv+F7h6CvqGvcyl80vfz6HXhD6J7OqlhnPEQCVgKOFNLi4GfKBz7X47xP9sO7gZVkp1vNIdKS88VfzpyMRajfC9LQam0+kUblUBoHfkPvvuWaQZff48pxQkseiUcEAAUpTnFgbDvGq/FCZxXW4dsS90aarso6LRfAqwMxaeo/MBjnzANRT7Lxpi6fJfE= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 6:bX7Lohi1qd9BE05FXAsvJTt4xcpYaCbeLS6jmP27LnCy5/MjWYYNX1n20SwO4o/nilU9bMUAiL1AEJ4W54IMZaZIerlSCk3Tjh88wZMeB12uRAyTbbqI8GtH9UiEgZQzU9/j3WBFablGk2m5gLwc2ae1cGZZ7L3i6bDwN/PLF96FO6QZ6tt3cdDj3fsqlIljGziphlgTONgfex3GKhN2t0DjXrEC++QVEqquo91UoP6xSM/skpxW0HJKgqPz+DzyfKwzksPRE2CKh/Mf+1Qn8tj1yWrDIfic4IrQl9pMnxxZHDDy/LrGD4S3WyTPHyKc1Jt743ufywYxDjFbxEH2aB048V1+5Z2zgktFgXZ7ayE7I/4qLoVr2p+yHQJxepRwrWt9Kwq2MJm8cGlLWjpTavJ7OR/1KLW6RL4bz4q19paBLyk+nUAl7w9ln+9d5NGCeOJMiQToVorAeBBSMaA57Q==; 5:VOZC3qA/TpIr0BlAyXgeL1lCqsmrWnJuWk4XtIgfPnDmkuo26rFaNMedo2jklNqiv4IcX+M5gXo/G/B48OnZzS8lFQqK2ncQswr1kqXpzI5FURQynRltbTHxCRgr+2+EvA+sOHAXynA9BcndYaXp0aUpe5nnkNa69g2hGuPgTvQ=; 24:2qSkMiZU5qlmelYS+jIv9AwgkUHJdCc1tAjWgXvLQk4bXhjhCYwnyQiSpOdRY3Ts9/XCHHMH9zJiHk2Fma8e4fQwy9eGM7rn4Yc7maIkjqA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 7:DBLOGuCbctD1raVl4neJwb8HOVGzkdUk1C+Adw7tt0zxrff+0hymKauQaQ+JBvPIwlnem94VVVy+1vN2q/n1VusxdWJl3L92Wcp/YenMb1FCzC6d+5Dyw7js4v0IEFz9+RrkV/C1wcbkAfCd2vLXfoILn1OjoYMf2Mj65nN6j9kY4Ewrquli2RhidyDazLnZ14Rkfyss9ITuGBRk4C+P9nYf4N1CDvARtcrBymXihtTZvfPUD9DUxUos6s+AOAZ6 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2018 15:37:38.6411 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b836657f-6ab6-4229-017f-08d5ebfb3a72 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2330 X-BeenThere: linux-mlxsw@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: mlxsw driver development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP Each TCAM region currently uses its own resources and there is no sharing between the different regions. This is going to change with A-TCAM as each region will need to allocate an eRP table from the global eRP tables array. Make the global TCAM resources available to each region by passing the TCAM private data to the region initialization routine. Signed-off-by: Ido Schimmel --- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum1_acl_tcam.c | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c | 4 +++- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c | 1 + drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h | 1 + 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index 016058961542..e86ac922aa41 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -622,6 +622,7 @@ struct mlxsw_sp_acl_tcam_ops { void (*fini)(struct mlxsw_sp *mlxsw_sp, void *priv); size_t region_priv_size; int (*region_init)(struct mlxsw_sp *mlxsw_sp, void *region_priv, + void *tcam_priv, struct mlxsw_sp_acl_tcam_region *region); void (*region_fini)(struct mlxsw_sp *mlxsw_sp, void *region_priv); int (*region_associate)(struct mlxsw_sp *mlxsw_sp, diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum1_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum1_acl_tcam.c index d339ec43d79c..926483434e99 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum1_acl_tcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum1_acl_tcam.c @@ -122,6 +122,7 @@ mlxsw_sp1_acl_ctcam_region_catchall_del(struct mlxsw_sp *mlxsw_sp, static int mlxsw_sp1_acl_tcam_region_init(struct mlxsw_sp *mlxsw_sp, void *region_priv, + void *tcam_priv, struct mlxsw_sp_acl_tcam_region *_region) { struct mlxsw_sp1_acl_tcam_region *region = region_priv; diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c index 0f21d7ed5881..1aa80a4f37e2 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c @@ -130,14 +130,16 @@ static void mlxsw_sp2_acl_tcam_fini(struct mlxsw_sp *mlxsw_sp, void *priv) static int mlxsw_sp2_acl_tcam_region_init(struct mlxsw_sp *mlxsw_sp, void *region_priv, + void *tcam_priv, struct mlxsw_sp_acl_tcam_region *_region) { struct mlxsw_sp2_acl_tcam_region *region = region_priv; + struct mlxsw_sp2_acl_tcam *tcam = tcam_priv; int err; region->region = _region; - err = mlxsw_sp_acl_atcam_region_init(mlxsw_sp, _region); + err = mlxsw_sp_acl_atcam_region_init(mlxsw_sp, &tcam->atcam, _region); if (err) return err; return mlxsw_sp_acl_ctcam_region_init(mlxsw_sp, diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c index 89c78c62e7e5..03f0ac646a21 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_atcam.c @@ -77,6 +77,7 @@ mlxsw_sp_acl_atcam_region_erp_init(struct mlxsw_sp *mlxsw_sp, } int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp, + struct mlxsw_sp_acl_atcam *atcam, struct mlxsw_sp_acl_tcam_region *region) { int err; diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c index e06d7d9e5b7f..9fff3fe189c8 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.c @@ -560,7 +560,7 @@ mlxsw_sp_acl_tcam_region_create(struct mlxsw_sp *mlxsw_sp, if (err) goto err_tcam_region_enable; - err = ops->region_init(mlxsw_sp, region->priv, region); + err = ops->region_init(mlxsw_sp, region->priv, tcam->priv, region); if (err) goto err_tcam_region_init; diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h index fa0ecc226bec..99d44ac3acd2 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h @@ -172,6 +172,7 @@ struct mlxsw_sp_acl_atcam_region { int mlxsw_sp_acl_atcam_region_associate(struct mlxsw_sp *mlxsw_sp, u16 region_id); int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp, + struct mlxsw_sp_acl_atcam *atcam, struct mlxsw_sp_acl_tcam_region *region); int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp, struct mlxsw_sp_acl_atcam *atcam);