From patchwork Tue Jul 24 12:26:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10542057 X-Patchwork-Delegate: jiri@resnulli.us Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B931013BB for ; Tue, 24 Jul 2018 12:27:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8D7B2870F for ; Tue, 24 Jul 2018 12:27:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9D90B28751; Tue, 24 Jul 2018 12:27:27 +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 EA5AA2870F for ; Tue, 24 Jul 2018 12:27:26 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41Zd0X6bsmzDrdd for ; Tue, 24 Jul 2018 22:27:24 +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="fX1DLVsF"; 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.64; 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="fX1DLVsF"; dkim-atps=neutral Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00064.outbound.protection.outlook.com [40.107.0.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41Zd052QB2zDrM8 for ; Tue, 24 Jul 2018 22:27:00 +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=6m3cVHkjXU/WvpJt9NeW+/n96CaFK12v0YDrO2ZZUdE=; b=fX1DLVsF7vTKA6TjONeUsU6D1sc3/fCx23BUGbwikgsf+CJzSCR/4coueHUz5GlvMW8aMKU+B6i7ruWBXyaus+4bR/t6HobDrKAgKpT3zLH5SxyZssfNdmTtMHxWp9b0hV3g/Xi5oz8TW/FhYLRNyWx87yFEooI2eNgRz2TIYzc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from splinter.mtl.com (193.47.165.251) by VI1PR0501MB2333.eurprd05.prod.outlook.com (2603:10a6:800:2c::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.21; Tue, 24 Jul 2018 12:26:46 +0000 From: Ido Schimmel To: linux-internal@mellanox.com Subject: [PATCH net-next mlxsw v3 09/18] mlxsw: spectrum_acl: Extend Spectrum-2 region struct Date: Tue, 24 Jul 2018 15:26:02 +0300 Message-Id: <20180724122611.13150-10-idosch@mellanox.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180724122611.13150-1-idosch@mellanox.com> References: <20180724122611.13150-1-idosch@mellanox.com> MIME-Version: 1.0 X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: AM4PR0101CA0050.eurprd01.prod.exchangelabs.com (2603:10a6:200:41::18) To VI1PR0501MB2333.eurprd05.prod.outlook.com (2603:10a6:800:2c::22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4f9a4269-82af-404d-9b4b-08d5f160b900 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:VI1PR0501MB2333; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2333; 3:lLjncl/wpS9HhxLDXl0k6rJLbLvb4Zht4ylNG1URU90dAeBwyGYCDqT7tyMPsVM5dbrRk0Rns4LJKG3KCBhm8SuR+QnwRsQTpclOncPps9mtSbAVVY88L+AAwIrSxVhJoJHKQH1L0tn0MPVOKJ7IhYMFPs9i/yXVCg/I30ANM6OfFsSgxGV/zhkaPXF285yr+AsOgeOfE09QpmnmsZArw9ohNXsQqvlsjlWROD6R64ck3nF98Rfz+GTYiBHhlUKz; 25:xmZJMS4A/w2eofGyJ5zoSVI2dLAvdIHClCMycau6iAv/aDkP9CTSVurAvX7DasqwTNeh/b+q4Va/lIb+Ou8qgMT2MRoLu2reZYsi39xg7Aj+4vk+cUDM4KLJTWPPT0qsYMO7uQ51X1mPwWmbe5ZayaTvJ5U0SdYk5zkCv/dIUCyzT3aVtJ6zaXXA5QCtzAQJMiHghaOMqyYxJP3/O9/I/j0bGIG0Kt0uXbVAgi5RwGGRj6JMd8LpK9GYCCP38mLdN5pqglCZ4BDa8ip0jO0m9zwmrmwWHd0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c1Bg1S7QXbnzEzgSt6XwSQI3XtKEewLu1AYKNPwnRaD+4culQOqHwv+oZuuQKMNSjSxpFMBqjhLTaqZcJyv4JcWA== 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)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(3231311)(944501410)(52105095)(6055026)(149027)(150027)(6041310)(20161123562045)(20161123560045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:VI1PR0501MB2333; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2333; X-Forefront-PRVS: 0743E8D0A6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39860400002)(346002)(376002)(366004)(136003)(396003)(199004)(189003)(446003)(8936002)(6512007)(48376002)(81166006)(50466002)(97736004)(1076002)(47776003)(66066001)(2361001)(2351001)(50226002)(34206002)(16526019)(7736002)(107886003)(14444005)(6486002)(53936002)(5660300001)(6636002)(6666003)(305945005)(68736007)(11346002)(53416004)(6506007)(386003)(6116002)(8676002)(81156014)(36756003)(105586002)(106356001)(956004)(76176011)(486006)(3846002)(51416003)(2616005)(26005)(476003)(4326008)(478600001)(37006003)(86362001)(316002)(25786009)(16586007)(52116002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2333; H:splinter.mtl.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0501MB2333; 23:zjRbW7o1TVWtK3s6YrrlktU+UskgGu/fB/KGtaC?= ObazFJX3edzFt4drtgfljoUnRk4ucO5IyxF7jegUyiSLjnmivaxneoAEYEs9NPq1fXYF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s2Meflm/YjOrZprCCh5anwiyDMILvninqTxFAp8JufvoQ9ntwFkmxEgzdBZ98fM9V8uhyL4qAvChOyrTAtBsCHnfVlIMTPI7dJbLNNL2z2pO+NTigo26hNaeXGaZltfu8LghQB+VLf3DRn5jYoBc2ahrg=; 7:Z4PoV1ARrkU3pagwr2t1DSrpD/5V7xTpzF5WZSmsSbU7yRxV/jMV4PFR9+pwty+Y2X2+i8FugeQ7fSllmQlqp0w+13ZmvzdtJWnv3tEivOsCk00pD+OcvoqOH3c4Tg/H1Fggs/pHnDN805OKy1Ndr9VhvVC2p978o/1Ukoq0mPFekQ4fDUltccsT4B0cd59AANPFor2FMmE/NxI4v4mk//vawgTWPeE2+jvPsD+o/Qja0oCfS4245YG4D42Hff59 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 12:26:46.0528 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4f9a4269-82af-404d-9b4b-08d5f160b900 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2333 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 In a similar fashion to Spectrum-1's region struct, Spectrum-2's struct needs to store a pointer to the common region struct. The pointer will be used in follow-up patches that implement rules insertion and deletion. Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c index d7f1fb35ea2a..33787b154e74 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c @@ -45,6 +45,7 @@ struct mlxsw_sp2_acl_tcam { struct mlxsw_sp2_acl_tcam_region { struct mlxsw_sp_acl_ctcam_region cregion; + struct mlxsw_sp_acl_tcam_region *region; }; struct mlxsw_sp2_acl_tcam_chunk { @@ -127,6 +128,8 @@ mlxsw_sp2_acl_tcam_region_init(struct mlxsw_sp *mlxsw_sp, void *region_priv, struct mlxsw_sp2_acl_tcam_region *region = region_priv; int err; + region->region = _region; + err = mlxsw_sp_acl_atcam_region_init(mlxsw_sp, _region); if (err) return err;