From patchwork Sun Jul 22 13:17:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10539315 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 AA27196FA for ; Sun, 22 Jul 2018 13:18:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 97C8B281F9 for ; Sun, 22 Jul 2018 13:18:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8C3E528384; Sun, 22 Jul 2018 13:18:55 +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 DF78828372 for ; Sun, 22 Jul 2018 13:18:54 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41YQDs0ljkzDqyG for ; Sun, 22 Jul 2018 23:18:53 +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="t3Y+A3yV"; 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.8.51; helo=eur04-vi1-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="t3Y+A3yV"; dkim-atps=neutral Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80051.outbound.protection.outlook.com [40.107.8.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41YQD823YKzDqnc for ; Sun, 22 Jul 2018 23:18:16 +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=cJCnhKpUZOHgIqq9DXKZ/orlrkLNlxuJ9/cCLOUP42U=; b=t3Y+A3yVgzKbp0b1qYIUpzUetMqWJ7+kh5btb8WXuGiFLKl+opSJipXEF69fW13E7IfaPqB7WG3uvIjIkJG4X701n2bHOlCSoOkxIKn0jU1tribqTStlMOdxNbu0TqBU+TQngVnT7lh5eqhhTOCj8xSN2p8bYRzSeWOvc/icWsU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=idosch@mellanox.com; Received: from splinter.mtl.com (193.47.165.251) by HE1PR0501MB2331.eurprd05.prod.outlook.com (2603:10a6:3:27::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.973.20; Sun, 22 Jul 2018 13:18:03 +0000 From: Ido Schimmel To: linux-internal@mellanox.com Subject: [PATCH net-next mlxsw 09/18] mlxsw: spectrum_acl: Extend Spectrum-2 region struct Date: Sun, 22 Jul 2018 16:17:03 +0300 Message-Id: <20180722131712.30578-10-idosch@mellanox.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180722131712.30578-1-idosch@mellanox.com> References: <20180722131712.30578-1-idosch@mellanox.com> MIME-Version: 1.0 X-Originating-IP: [193.47.165.251] X-ClientProxiedBy: AM0PR01CA0036.eurprd01.prod.exchangelabs.com (2603:10a6:208:69::49) To HE1PR0501MB2331.eurprd05.prod.outlook.com (2603:10a6:3:27::24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a585fd38-73d1-4061-d95e-08d5efd58e9b X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(5600073)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0501MB2331; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2331; 3:aGviech3EeArbsRyhnS+VVkSxJHwJEwr3C9JoGrBAWZ7k4JUvYCZYV9YvaxEl1O+UGp7MwcEPuM22WPKd2+2wRSZTezbi6JxMvN6pCr+9vEEm9Fn9iPuDeUDD4ZIRiiqY0IGPpAVnFd6w49UATG98EEb3oCuFGx8nNTdfy626qYU8EuUiSgx51wOc2o8pJQx+d7TIeVQr35/C4fF4/anrwoISn9Zd4TbLyrdlvuUIPfQUlKYPHme89MYKDToJrdQ; 25:JESJa4/t9C00IxBHrOL9Yft34o00kuEwgh2aM/r8prbmIWZ0gCeZFgK6Pmckqky96WRys9Dx9vKAU+eqQOWevfEVzgh6bTm+tMX1lg52pOM767F7DXD+zKXGtJRWjzdKDdNcQCXomHLq6qg+3MlXTPVqJgDT8AI0aYfAjQ1n1RrztDfBerjdP0C6CbaWcWhdBPct0u2CCo6GiXPRrmoEjAOgTjqqm3Df9HaNw/w3cPGxDnkoOVFbEXCad+/DrFLpkTBdlnWD3wl1l0nQooFKNMaH5oOiCN7x55Xpo6n5ITn+H3yHU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saHDpWo/Y9qFCbmAyXuvwUD0NOU/tLx5OgrLu2cK4tXRio22oFQQn7utnti7tQ77Enew== 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)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:HE1PR0501MB2331; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0501MB2331; X-Forefront-PRVS: 0741C77572 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(376002)(366004)(136003)(346002)(396003)(39860400002)(199004)(189003)(47776003)(956004)(14444005)(81156014)(106356001)(66066001)(3846002)(6116002)(2361001)(486006)(97736004)(68736007)(81166006)(1076002)(36756003)(4326008)(2906002)(86362001)(16526019)(11346002)(26005)(105586002)(6636002)(386003)(6506007)(478600001)(446003)(8676002)(8936002)(5660300001)(53936002)(48376002)(34206002)(107886003)(50226002)(76176011)(316002)(53416004)(305945005)(476003)(6512007)(25786009)(2616005)(2351001)(37006003)(7736002)(51416003)(16586007)(50466002)(52116002)(6486002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0501MB2331; 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; HE1PR0501MB2331; 23:zoG4LMEd14Lfc28cLtgCYZth9pC3TXLdmH07ti8?= s05Kkf5etajrk7iVEGC5jDzyhH67zG3Wgt23zQPNxGyTc6TSe2PAgmzx3ZZtbar7C3o951wf+IfkNPmBdAHYBMNweOQkT4wkalN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zddVmBpGEixWZs5I547v7huDE8y6x+anCeJpJFAUFuEpIYuKu7OV/ga4CCZPByhv065n4lz0s70IlHjYxKLXSog0bYSkiM=; 7:0lnFB5VOzR0yUXJKn5HivkAQNvlTzxEk3GBSP6L/yVuMPldabz9RAd9mZYxHhzPxSLWAmbJH2KHtmVrX4LFsGTrfzIuAe+C79Jq0EawMx91CD4LzE+ZRfWPqzmPTwW5VIp4O1yq2lf+7urRpUjnK+x9aAGl/xgaE9pCWqHpL3ZlW5sKUt5q1VKzPboft4s7qPJHzDIt8JH26Gj5YvtigH9C1pFPnjx7UC3f2bZVpRPE4MWn9GRemu2iVzrnrHytP SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2018 13:18:03.6194 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a585fd38-73d1-4061-d95e-08d5efd58e9b X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0501MB2331 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 --- 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;