Message ID | 20180717153657.16324-8-idosch@mellanox.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Ido Schimmel |
Headers | show
Return-Path: <linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org> 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 459756020A for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 17 Jul 2018 15:41:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81E7F296B6 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 17 Jul 2018 15:41:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FDFF296C5; Tue, 17 Jul 2018 15:41:02 +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 C863C29702 for <patchwork-linux-mlxsw@patchwork.kernel.org>; Tue, 17 Jul 2018 15:41:00 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41VPd71LLRzF3JS for <patchwork-linux-mlxsw@patchwork.kernel.org>; Wed, 18 Jul 2018 01:40:59 +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="l0mfD8iE"; 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=<UNKNOWN>) 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="l0mfD8iE"; 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 41VPYP1w52zF3Hb for <linux-mlxsw@lists.ozlabs.org>; Wed, 18 Jul 2018 01:37:45 +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=eEYzDqqNby9wkMFjsm0DPI7dHmnwuFtHs9pb8mxMVr4=; b=l0mfD8iEKteubVMVdzNrlgaBxVJ3WxYFfcaFjHttU5aWp8l5Q0UQjySV433jItzybjRkPHRugmJzeS7rUeR9VdwDx0dvk6kBZhM7cTak/CLzFcaf23+6sVNgeo+zr1gCWoz8he8X+39UD9q9AigVx6Sm1vpsZR3Qe5Az4NCVxNA= 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:32 +0000 From: Ido Schimmel <idosch@mellanox.com> To: linux-internal@mellanox.com Subject: [PATCH RESEND net-next mlxsw 07/18] mlxsw: spectrum_acl: Enable C-TCAM only mode in eRP core Date: Tue, 17 Jul 2018 18:36:46 +0300 Message-Id: <20180717153657.16324-8-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: 63590fa3-a08c-482d-507c-08d5ebfb36f6 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:W14zmZLvlBKQnJ17TdpjL7O6fBp7N7+CtC9NGrPJWfhSTTP7Lu88Y1alJdCOB8x6v4IDcLfgwB+IuUKm3PppX+G68UiFeuR4Fu8Wesg6IbLyymEQ/4YqHrJ2dg82G9wvcofMSD4w+jgipAxUjq4C8+HJZsWFKEYCtFRofEJCy9Xm0Ea83XdqZO3SHs1Wxk8bySGd3dQWqpTOi47uJONJxu5Bn89LQ+lFaC2P9S7hHmtnt1Jq1znqrkyjVTz3pbm/; 25:UE+CAltRVoewajPiYDLNBSIFi1y4PvV5RxLhhsFRYqZFw3tn+UCGUdiZigdELs8X4yaiIqX8He/ke0vP6+Vzo38x0mmo/creeocQGdHt4fe2K50oEl52Ce34izk1rIWNCc1CAzns1t/cOKhSIZA7D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33kmTgbRSzpplYeiacm+yfV7ky7RoTcdy4y43zMzjKEYUZ1kFKoUwUHYkeD+cRqAW5fEejb9LV86Uaj5tAzbhUYQoaKjdkuLgre8oN/neH/mMwnGB72Ef5usSWyeyOYiE+41edA5ErwTfJ8vUQki8MhiRfOgP0II3I6iJjK4++gTIfXPvmKIygk9y9Oi9bIK+N15lL/XQQDQuuqOJ7fweNZn883UbwOsogMC0BIQ== X-Microsoft-Antispam-PRVS: <HE1PR0501MB2330E81CF5EB5A1E13DBFEDFBF5C0@HE1PR0501MB2330.eurprd05.prod.outlook.com> 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)(14444005)(16586007)(305945005)(37006003)(97736004)(86362001)(6116002)(36756003)(217873002)(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:63XuGUmOiEooL6vmWk0O2fkIpN7bAQ13szTy9SL?= =?us-ascii?Q?jCz5vRB2QdmBKztXln/ZecyHJrIEAw0StjROkUEhT0zdi9npDbLQW32gvhc4?= =?us-ascii?Q?ahWTVH7IDu0J4yBGkrMpq35R3mCXFjxEK3Z8mFeUSBh+cAM+jjJcIiA041Qn?= =?us-ascii?Q?0m+CVKLrmUablc6gmOB9TwZQit3PijxFKlEQtfmXuvnPnmrsp+iy0SQ0RD6p?= =?us-ascii?Q?0M0WNVkAFxMnWVmE9jtc2Xh/SMjDW+1tq/Pv8qBXoynorjarp8CRIkmXE/Y7?= =?us-ascii?Q?yoS3bP+Vu5nmQd/wmoGP6ic1ArWfhfmvCgHXGo+ENiP6SAG659ZB1c/6qlSU?= =?us-ascii?Q?ppUlDs/u2Eohi2FUeV4ia02OswM0z5TeOk7mJVI27cklDS3cfAp4i9Z5GxNT?= =?us-ascii?Q?Y8VcMTYYdjOlMVVmgfBjb6JbC7IowCISQKiQ/a3dAJUbCrfPLA4ZRVKKYHuP?= =?us-ascii?Q?5cy6HtGsVGnCZE6qaxxdu5tEdraDusL84RIYJm8EkzE+/JIQPXfffcTWsNV5?= =?us-ascii?Q?2f+GFXR+SHkKrQtRVx58QvAzPWxnqoJdldeYoDRfuG9R8n0EuHPW8jua1bJl?= =?us-ascii?Q?hoEBrhozewn9z/tu01uDqgm9kDiyJ+0MeYwA5soC+Yaqi12PEYyuczL0QNtA?= =?us-ascii?Q?nguroU749yTV92DtOwij+cUmm/GppxYqtLNyJ0pQfYDFNJoNW2QN8OdaFWda?= =?us-ascii?Q?+wEGf4lsEYyZX9HkGW/oZ6B6X7rnaeGDnu194HxLfFSFuluV8VoCT6eOeY7W?= =?us-ascii?Q?q73b2Sm+b35gK60wwc5Pd5fJyrAnLrR2t92P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nJZ9MEU+wiLELcw3RNymUY= X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 6:Qr6BdsC5yIlXp0wdYLXcF2tMMBp17QSfEl+3jSdSFVcyL9q5vgjS5a7v3O7bXyQVV9uJgAZmYY2qiGIdcE0SQEer7RnGFg9S86DWvtiFdvbf4H4AjpxybwN+bfEhKcoMJ2Ck2n77tVLuG4AygCA7RcHTHs0nzyzABmkfwjlS9kJoRkVSCi7KFlqkq1cjfoCB6OvI4DcFcSUh4RA8W/MAR2/vqzQs89NGz91vIZqgXUJpbRhPjKPmemBsK6eK9evSnW1ktoHVgeyW0Xt6qDn4ZsiNvTlxYFN882/hV3m4DCSik5xevIlfDIUr3DMu2s3Mx7k7PgraGWmvVf0/0A/l8jNscsa5ykRI39Pn8RuMS+Wbues09Y7b3sfTT4heCLuZmy4WAufS1Zqv0mNzy8i2uZ/KIfyez6bz6F73wPrgYYG07ImAatcZLIEs+Kmr93WPiAlJILIBoP7wcdDuXhnBGA==; 5:ItknNlZdYa4SYvYDC2pnD4zTtl86RdL+VgmSi7PdAz0LkzhFoShjUT/dvNmFc8BR9FNRD2MvEHzP5ZglJJHDiHCJHuN7Z3nMJdaLYSJOXYAA/GndiqlD3pAwzLwC6cz1XGK/qnac90UboB86dacOWwMT6s9823wPMGt+L6tNOO8=; 24:DaVSJacQaCH5Kx9cxIFlw7KloQnS63e5G0ER3r3yQpIaNrFgNvf3BBg3a6Zr232fIOboHTjLvxgkTFTuZKOuCDPcxJhhc7X2nUg80x3hZOc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0501MB2330; 7:8FneqyH3w+9iERiNTIjs4BsIBOlbO38inpC9b9nwoxKBtwJDTJj9zS2ELOJa6DaujZeh51n6VKofQS19+P49b3ur33c+rWf8Y3K42qwQC39CqYK5aZaIoRJBYgnYuIC4MokIV6UKtNZSMTFWm7nuDDVimfI+lZdHk2IYoMaOgY2p9ToCQvdVgx4a92NtTD5T3BuEJ63Taq6mDF+bu24kB5Ir+YD5z5EM/z+WmiZE4ZCm6iskv8mtYos5Ok9+cmEN X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jul 2018 15:37:32.8442 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 63590fa3-a08c-482d-507c-08d5ebfb36f6 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 <linux-mlxsw.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/linux-mlxsw>, <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/linux-mlxsw/> List-Post: <mailto:linux-mlxsw@lists.ozlabs.org> List-Help: <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/linux-mlxsw>, <mailto:linux-mlxsw-request@lists.ozlabs.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-mlxsw-bounces+patchwork-linux-mlxsw=patchwork.kernel.org@lists.ozlabs.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c index b13d60e7c7ba..480c6463651b 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c @@ -871,7 +871,7 @@ mlxsw_sp_acl_erp_region_param_init(struct mlxsw_sp_acl_atcam_region *aregion) struct mlxsw_sp *mlxsw_sp = aregion->region->mlxsw_sp; char pererp_pl[MLXSW_REG_PERERP_LEN]; - mlxsw_reg_pererp_pack(pererp_pl, aregion->region->id, false, false, 0, + mlxsw_reg_pererp_pack(pererp_pl, aregion->region->id, true, true, 0, 0, 0); return mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(pererp), pererp_pl); } @@ -886,12 +886,16 @@ int mlxsw_sp_acl_erp_region_init(struct mlxsw_sp_acl_atcam_region *aregion) return PTR_ERR(erp_table); aregion->erp_table = erp_table; - /* Initialize the region's master mask to all zeroes */ + /* Initialize the region's master mask to all ones for C-TCAM + * only mode + */ err = mlxsw_sp_acl_erp_master_mask_init(aregion); if (err) goto err_erp_master_mask_init; - /* Initialize the region to not use the eRP table */ + /* Initialize the region to use the eRP table and enable C-TCAM + * lookup + */ err = mlxsw_sp_acl_erp_region_param_init(aregion); if (err) goto err_erp_region_param_init;
Currently, no calls are performed into the eRP core, but in order to make review easier we would like to gradually add these calls. Have the eRP core initialize a region's master mask to all ones and allow it to use an empty eRP table. This directs the lookup to the C-TCAM and allows the C-TCAM only mode to continue working. Signed-off-by: Ido Schimmel <idosch@mellanox.com> --- drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)