From patchwork Tue Jul 24 12:25:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 10542049 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 48B86180E for ; Tue, 24 Jul 2018 12:27:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36F4A28722 for ; Tue, 24 Jul 2018 12:27:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2AD0428791; Tue, 24 Jul 2018 12:27:14 +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 57D6028722 for ; Tue, 24 Jul 2018 12:27:13 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41Zd0H356zzDrHN for ; Tue, 24 Jul 2018 22:27:11 +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="uFcuESIZ"; 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="uFcuESIZ"; 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 41Zd015DvVzDr11 for ; Tue, 24 Jul 2018 22:26:57 +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=9FlZH9V35VVWYSdew7X57DmJFVcpO4wcI7O6tBgjktY=; b=uFcuESIZXz+jJwqIcNjcvQYBcV1DhZ5GLLSFaC0sJCV76LBxKE788y61HikdJeP91nlXCRWiLtj2HEb/SmcT3SczSsv4uqCTeRvIUFHtZt0hRB91G64pftac9nI+fAxFxFPO/7XRJ8gtVgG90ghY7feCsEp1Phn/0Nb+Fc9B6jw= 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:42 +0000 From: Ido Schimmel To: linux-internal@mellanox.com Subject: [PATCH net-next mlxsw v3 05/18] mlxsw: resources: Add Spectrum-2 eRP resources Date: Tue, 24 Jul 2018 15:25:58 +0300 Message-Id: <20180724122611.13150-6-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: b72aebd1-265b-49d5-248d-08d5f160b6b1 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:F/SznFCCYWqMRWcAXkLi0jz2A7KBrCKwjLiDR3lZYDNpTQlOPy+rWbV6ry5R6cUESXLqsVdL3SLynyJ8k8IZ3usp7qHe/MlvyFcud5JCHi3rLCQOIhtmVtwjN7LooJ4LbC+p48+uPO1Dj1h3PYveq5zu/U4pnL7GN9kbKCY9upSs+YG7xPtcNhW/DrwZpd/vAkmDar+Qnab5iGa5oVpxl810/hmVrkCSyf9IMjGXig27TmdrQHfbEEOc0/JdGoxk; 25:kPCvaSXQc+Aqf3nrWfFTpsu1O8yiX9pM6aVAAJuRPhKC5zC85XCS2LSPFQSsX546WrrNJddPO44MTVHGI8M3ymu/7x6pEkPcXEb4eXlRkO1/sBWHg6N4g05NJu4XFZqtHVWQfwEG6AjGugUPgGSvjuQcSjIlyb85XK6lnq9bSYiuv5wN0aHF9A0YHoZGETeAGtdl4JM2vudNECnjX6udSskhisYTd+qLCGSuBUK88vZ58faMYsEaD2F1zeF55UmeEFDFVYg+APr/2a0Du3bK69wGVu6NXKEEwQk5lSkSwt7RumAW5yjfH/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IuTOccb1KtTDWwPxSeUQhw3XGolbZH4jN+OYR/AxZnSkYWlZ6KHOQ8yEGy2ofUtFxEg== 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)(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)(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:peKQVkB6QgSZKWB8qDxe67779dWzJWK2z3zzfff?= Q9IaoGrsd8thTlgwHtFzAPS8yaZJS1S4Kzj7w+XdLuPN/H9IvqKFhozaXPsnHoYAMk/bIZXoscx+Xf1/HMxA+EAlUCl2S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6tnP1W/xCxiY4UiZJTlTIyoDu6OzQHoonnRMCjX0D6P9QiaO9uOt+toXwnla5PtxL4eRK13yaPoN0UNHhn88d5wl4Y=; 7:4qTRKAN0l6/T6GQvIwpVcJYIHyPxrA8J1VQI59mrTkH48XKhebuh/w80a1vkKRkUJAacjxuNelq8hBGewBQ1KXdyE64611TYGBt4OY5bjMTeBgGAApI57iPrATv9sx7eezYyaIActYrTmw9oIIYRZXdhEei3v4oE3ZP8c6TSVSZsOECF3MoLa7eBIHUW3jRIKmGWySS8uipi5cuH5AjYVh8nhaPqKF7GsLQWfiNLwpczV3ZjhEhrm5hGE9oosXpV SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2018 12:26:42.1765 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b72aebd1-265b-49d5-248d-08d5f160b6b1 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 Add the following resources to be used by A-TCAM code: * Maximum number of eRP banks * Maximum size of eRP bank * Number of eRP entries required for a 2/4/8/12 key blocks mask Signed-off-by: Ido Schimmel Reviewed-by: Jiri Pirko --- drivers/net/ethernet/mellanox/mlxsw/resources.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/resources.h b/drivers/net/ethernet/mellanox/mlxsw/resources.h index 4f84c7c8117b..bf650f2cd5af 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/resources.h +++ b/drivers/net/ethernet/mellanox/mlxsw/resources.h @@ -65,7 +65,13 @@ enum mlxsw_res_id { MLXSW_RES_ID_ACL_FLEX_KEYS, MLXSW_RES_ID_ACL_MAX_ACTION_PER_RULE, MLXSW_RES_ID_ACL_ACTIONS_PER_SET, + MLXSW_RES_ID_ACL_MAX_ERPT_BANKS, + MLXSW_RES_ID_ACL_MAX_ERPT_BANK_SIZE, MLXSW_RES_ID_ACL_MAX_LARGE_KEY_ID, + MLXSW_RES_ID_ACL_ERPT_ENTRIES_2KB, + MLXSW_RES_ID_ACL_ERPT_ENTRIES_4KB, + MLXSW_RES_ID_ACL_ERPT_ENTRIES_8KB, + MLXSW_RES_ID_ACL_ERPT_ENTRIES_12KB, MLXSW_RES_ID_MAX_CPU_POLICERS, MLXSW_RES_ID_MAX_VRS, MLXSW_RES_ID_MAX_RIFS, @@ -109,7 +115,13 @@ static u16 mlxsw_res_ids[] = { [MLXSW_RES_ID_ACL_FLEX_KEYS] = 0x2910, [MLXSW_RES_ID_ACL_MAX_ACTION_PER_RULE] = 0x2911, [MLXSW_RES_ID_ACL_ACTIONS_PER_SET] = 0x2912, + [MLXSW_RES_ID_ACL_MAX_ERPT_BANKS] = 0x2940, + [MLXSW_RES_ID_ACL_MAX_ERPT_BANK_SIZE] = 0x2941, [MLXSW_RES_ID_ACL_MAX_LARGE_KEY_ID] = 0x2942, + [MLXSW_RES_ID_ACL_ERPT_ENTRIES_2KB] = 0x2950, + [MLXSW_RES_ID_ACL_ERPT_ENTRIES_4KB] = 0x2951, + [MLXSW_RES_ID_ACL_ERPT_ENTRIES_8KB] = 0x2952, + [MLXSW_RES_ID_ACL_ERPT_ENTRIES_12KB] = 0x2953, [MLXSW_RES_ID_MAX_CPU_POLICERS] = 0x2A13, [MLXSW_RES_ID_MAX_VRS] = 0x2C01, [MLXSW_RES_ID_MAX_RIFS] = 0x2C02,