From patchwork Wed Dec 8 07:00:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12663785 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F546C433F5 for ; Wed, 8 Dec 2021 07:00:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244382AbhLHHEM (ORCPT ); Wed, 8 Dec 2021 02:04:12 -0500 Received: from mail-dm6nam10on2068.outbound.protection.outlook.com ([40.107.93.68]:24897 "EHLO NAM10-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244367AbhLHHEK (ORCPT ); Wed, 8 Dec 2021 02:04:10 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KkjWbvM0jeg31GgnTcnfD8Krs4je8reJqfMADxkO18JqZ9KY0oxvhAKZfVTYlca7zQzDsEWWw+z9AwHIL4DqeY066W0/fUz0nIemW2/3oTznjNIp4dt9nIqzySn0/GASjbaSWo8n7Jgble7MgYAUo6MS7itAmXebR+tjXBDv8CvRRJajLa2rNcrkqrX0M4N/2qMeGnUfQHBil/8QTEUKckzOuM5VMSX80yyxK9Z26okzQg52Xhs846+CglT/iQpRgqrAle48J5vRQ76nhZsYtqT4gAPz3uRNLif15qd7RBx9m0+pj4+IPYXpW+omqwt8DZ89d85wuLhH4OAYOYorHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iw6bqMgsKhuJbetX05vg9QR3N2qkz/8D5ZXiHWqGOFY=; b=LaOzSFxpAeaKGjPqvtJM089lEoYuMU+4iTtKGOFgPVEdAYi5ByXqi4tJryJGNOGHSBZeNOMznoaDv8FvDBXm7vL+gviFJxWbCJbGtpcP1vbsm+nCBsVxF/1NJQUQczq3/QESYPLwxhtUngmC8IHOpO6Hvy3YETWXtqefV6lxLKjuMnsX6s3eGVNoGvfJ1kA9Bmtb6ksqLOM4vb9DPUVZtEVqlQyUpFByzdEYFJcMWWNeKhS9E/PjB1R5TMSxOzYaq/s6OL7t+/0iXh2qYfu7zfI4rf5QM6OqvdEspVQNyTuYDh/Wy8ZfETDIH2NUcMz0FjErz/EzXbcypyqeyit6dw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 203.18.50.14) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iw6bqMgsKhuJbetX05vg9QR3N2qkz/8D5ZXiHWqGOFY=; b=lVN/sllG3KjiRwiPa/II4g1jb0d6Wq40iZoC4UmJaCQlCLiR9CqLhG784LpphSbvKNGFwMUgyeUvHhAc0zVHCOw4M7LkgwyMEnyZtSLns2uQZFjjIPzrH5sIFUJOLsqsJ0IpKbn+Z3zR5BrXOyUkiKhyAaD32LPHOIRm0hrAfiFHgdk+LglUS7RIClxnWPvDtRe0BPNlGWjpRiFTmDph29xSoyn2JiPSMRskivzWP7rvBDrGkhnO5NoU3qTAf34+5EKI0HMA5JBCI5M6xsYL/XpGmCzX4JhE8QlqWAimY7MFBO5yPfZvfdZwUkEACtCcngOvJ8Oa/fPLEK4kKu/sug== Received: from DS7PR03CA0336.namprd03.prod.outlook.com (2603:10b6:8:55::20) by BYAPR12MB3014.namprd12.prod.outlook.com (2603:10b6:a03:d8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12; Wed, 8 Dec 2021 07:00:37 +0000 Received: from DM6NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:8:55:cafe::b7) by DS7PR03CA0336.outlook.office365.com (2603:10b6:8:55::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16 via Frontend Transport; Wed, 8 Dec 2021 07:00:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 203.18.50.14) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 203.18.50.14 as permitted sender) receiver=protection.outlook.com; client-ip=203.18.50.14; helo=mail.nvidia.com; Received: from mail.nvidia.com (203.18.50.14) by DM6NAM11FT060.mail.protection.outlook.com (10.13.173.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4755.13 via Frontend Transport; Wed, 8 Dec 2021 07:00:36 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 8 Dec 2021 07:00:23 +0000 Received: from nps-server-23.mtl.labs.mlnx (172.20.187.5) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Tue, 7 Dec 2021 23:00:19 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next v2 1/6] devlink: Add new "io_eq_size" generic device param Date: Wed, 8 Dec 2021 09:00:01 +0200 Message-ID: <20211208070006.13100-2-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211208070006.13100-1-shayd@nvidia.com> References: <20211208070006.13100-1-shayd@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dac00f2f-d568-4aff-9b4a-08d9ba187005 X-MS-TrafficTypeDiagnostic: BYAPR12MB3014:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pr68vENoDbldJ+l+FjXjhLKYzl1C8HfsVJ9VxvW3U+twSDCESMiCWA4AZbYa8hkdJMGkF1ElsxutZjlaJpfheUTGnRDx9Mwb/osne/P0IKh1s18y2R3YluYMOfhS9sqPQqCinsDYLH829XxJQJQ+BwqzBAu+HhCAl9fPrNdgK8MsEKxckfJjwbPPDOP+WgVEvJPTJnqEeD6NqSlWbr8RCnaG8E5i7ZQXZgNLU3LRHh81ohWOTQLASESAsz9OtbOOTKyx9l7UZ8iCBV3nWIHuiRR2qkGgEwoQZQ+mhEEc7YlYw5uoQGD/isro8EoRFTy7yz8LfxTcMJ08N4x5coBk6zNG8ZDUXy3QSVOZtTYGLPTUMmAtUvvVVffJVi9XY6aeiKZ3V2m+cVNHg3NKIxd3WbEPAKAQiiN77icWjSP2PFbJbsbr303Bo40Vo68y6H69G9/x+xlmZZtL0OJ3ru0/oZpaOgZR2KJTgU74FHfb0jKAkpeskkB6fbloCEOVBFZhRWGn/tOBtslqscN7Qz9+80ttZ79DcdzzksEcPkeW8LHvdg+R0CKD20AapV5Hhy9/5tgy9tpO0pS1+cVp/WEd5ctZCCm10BNBK3quxpFda9hN5i0pzBYEIaQOyfzp3g3Wur6ljMWOwfjX9zZWwHV4HlySSgoCzj6Q8lIELBTNkGAxDFdjHpSx7uCzJ8ED0g7MLuEdzSQFiT+D/ZdwykLtQ0jly2eq595chslpBr18I8PKMKdiHxDPnBMhtM+0gsD+S1TpNFIy5GVfg4Lo5C6tro4gy1fLlV59pRDF6REwubBw3S7Fx2odn9rrg2X1SqXNqcmV2clN6gCjq3NSYiccvA== X-Forefront-Antispam-Report: CIP:203.18.50.14;CTRY:HK;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:hkhybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(40470700001)(70206006)(5660300002)(70586007)(426003)(336012)(6666004)(2616005)(1076003)(34070700002)(8676002)(47076005)(40460700001)(4326008)(36860700001)(8936002)(508600001)(36756003)(7636003)(356005)(82310400004)(86362001)(107886003)(83380400001)(316002)(186003)(16526019)(2906002)(26005)(110136005)(54906003)(41533002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 07:00:36.6502 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dac00f2f-d568-4aff-9b4a-08d9ba187005 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[203.18.50.14];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3014 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add new device generic parameter to determine the size of the I/O completion EQs. For example, to reduce I/O EQ size to 64, execute: $ devlink dev param set pci/0000:06:00.0 \ name io_eq_size value 64 cmode driverinit $ devlink dev reload pci/0000:06:00.0 Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh --- Documentation/networking/devlink/devlink-params.rst | 3 +++ include/net/devlink.h | 4 ++++ net/core/devlink.c | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst index b7dfe693a332..cd9342305a13 100644 --- a/Documentation/networking/devlink/devlink-params.rst +++ b/Documentation/networking/devlink/devlink-params.rst @@ -129,3 +129,6 @@ own name. will NACK any attempt of other host to reset the device. This parameter is useful for setups where a device is shared by different hosts, such as multi-host setup. + * - ``io_eq_size`` + - u16 + - Control the size of I/O completion EQs. diff --git a/include/net/devlink.h b/include/net/devlink.h index 3276a29f2b81..61efa45b8786 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -459,6 +459,7 @@ enum devlink_param_generic_id { DEVLINK_PARAM_GENERIC_ID_ENABLE_RDMA, DEVLINK_PARAM_GENERIC_ID_ENABLE_VNET, DEVLINK_PARAM_GENERIC_ID_ENABLE_IWARP, + DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE, /* add new param generic ids above here*/ __DEVLINK_PARAM_GENERIC_ID_MAX, @@ -511,6 +512,9 @@ enum devlink_param_generic_id { #define DEVLINK_PARAM_GENERIC_ENABLE_IWARP_NAME "enable_iwarp" #define DEVLINK_PARAM_GENERIC_ENABLE_IWARP_TYPE DEVLINK_PARAM_TYPE_BOOL +#define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME "io_eq_size" +#define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE DEVLINK_PARAM_TYPE_U16 + #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \ { \ .id = DEVLINK_PARAM_GENERIC_ID_##_id, \ diff --git a/net/core/devlink.c b/net/core/devlink.c index db3b52110cf2..0d4e63d11585 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4466,6 +4466,11 @@ static const struct devlink_param devlink_param_generic[] = { .name = DEVLINK_PARAM_GENERIC_ENABLE_IWARP_NAME, .type = DEVLINK_PARAM_GENERIC_ENABLE_IWARP_TYPE, }, + { + .id = DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE, + .name = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME, + .type = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE, + }, }; static int devlink_param_generic_verify(const struct devlink_param *param) From patchwork Wed Dec 8 07:00:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12663787 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA223C433EF for ; Wed, 8 Dec 2021 07:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244386AbhLHHEP (ORCPT ); Wed, 8 Dec 2021 02:04:15 -0500 Received: from mail-bn1nam07on2065.outbound.protection.outlook.com ([40.107.212.65]:57766 "EHLO NAM02-BN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244379AbhLHHEM (ORCPT ); Wed, 8 Dec 2021 02:04:12 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D7aQaf6gM1b+vNPvC/+8Ibe2MknCV8/mPnuiRZR1Dci2hy+RECzH+BAK0NLABwI4D1ECh84QtXUElz9aDNjF5prs7BO+WKRjqlwXxMJnzW7M0S5fb68ToopqIyilHTYAXGxMkgiZKWqbuA8we33uV1GWEQmLlzMhL3PEsR8rEBZLjt32LLgNrwiJbC4xFDIsbj6jklFwjev/5qi4gbjX0l3hhojK05Ys3L/TvLj7Ab413vaB5bPbIHGpGJPwcT+PCkOqZ9kl85zY3+CbKjbJegZaOUA8JqLR8ebLbISzqr1dMYWnJCHlEcCYgX5Q9ludhOjzgMTnxzk8iHs1Yi3+3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2xvQj/XSKmsl7OVPJNCnGhhanzEZqU9Gl/4qPdCkZqc=; b=dnYX3AYB0QYWg8t1F1Fj3DVBZxF1UEGCp7v5ouG/MpLzV2eMcRzweW+RJu5844lRY1GZkmNvnDerTfXPc/E6xWRtEXXEJzxTpXJbF0vosJGfOnNnCxeSh8TRE3rf1VEUM/N+eKmCo3lI9eKPJtzCymibUfyqjr2W3v/ZjRTRJm0J1z33xh45tQ2K5kzxoG75kr1tfFFWLRlMBjqj+dGLkA+FO++NIwOiS5EVQTCZU8SttxSCvn24ZBS5oKInc4qomgWeG0B0lJEZWuuvtD1b1FuxFHMBidSWMzLXAAVKerb8o+yv3qlBFIHKHixMqhaUt6fe0/ySQnPV1nL7mO2CZA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 203.18.50.13) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2xvQj/XSKmsl7OVPJNCnGhhanzEZqU9Gl/4qPdCkZqc=; b=gtNYad5nrzmgEpt5PSm1BEzghOc/YFAS/VDqVeXLSe15sic24wxuTQTQRM5C42xskDikhgkMkWKDyMVi+5g8Kq6kDhNTLU8kS0IBCWdzN+VALLe/LS8a7utSADufpcJDUgISA2M9WgM4eMOEhKVsiqXNPFkJCYJPr5SAbWjKiNFZvR73XG+Hk9n+4x3vG0rVmDB9E03Jw6Rkcoxryekk3NnQBQTXYaHZD9KSTx81ncM8Xpbasabk2HCbfhqq3ewFqVkXRSOkH0pOQhjPXTmT5g7yn7JSwUFAT9L4crRhe1gVNUDT7Jw8vWKxk8tJf+yXiZn2/NXIdwCpC7C7T3uGGQ== Received: from DM6PR13CA0045.namprd13.prod.outlook.com (2603:10b6:5:134::22) by SA0PR12MB4464.namprd12.prod.outlook.com (2603:10b6:806:9f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.24; Wed, 8 Dec 2021 07:00:39 +0000 Received: from DM6NAM11FT053.eop-nam11.prod.protection.outlook.com (2603:10b6:5:134:cafe::86) by DM6PR13CA0045.outlook.office365.com (2603:10b6:5:134::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.10 via Frontend Transport; Wed, 8 Dec 2021 07:00:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 203.18.50.13) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 203.18.50.13 as permitted sender) receiver=protection.outlook.com; client-ip=203.18.50.13; helo=mail.nvidia.com; Received: from mail.nvidia.com (203.18.50.13) by DM6NAM11FT053.mail.protection.outlook.com (10.13.173.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4755.13 via Frontend Transport; Wed, 8 Dec 2021 07:00:38 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HKMAIL102.nvidia.com (10.18.16.11) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 8 Dec 2021 07:00:26 +0000 Received: from nps-server-23.mtl.labs.mlnx (172.20.187.5) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Tue, 7 Dec 2021 23:00:21 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next v2 2/6] net/mlx5: Let user configure io_eq_size param Date: Wed, 8 Dec 2021 09:00:02 +0200 Message-ID: <20211208070006.13100-3-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211208070006.13100-1-shayd@nvidia.com> References: <20211208070006.13100-1-shayd@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ae2e64e5-2435-42d7-4569-08d9ba187161 X-MS-TrafficTypeDiagnostic: SA0PR12MB4464:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2399; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Je01/jwqqjwQ5sdvqBHeRon6gB/l/7RKJnlPh4Ig7PRkgOI7lA2C+wjillwmdmsoseslEabpZT5Qf5yJUMtbaEj1ouJje17YWtSc30x30GrnjRozpZ9+dp+hPTQExrVFxQq7FX9wrVbSTuf+sBXynQKahL9gp3tU5Wtusv+9hqxwsVBGzirw+Q2sJxAZp9tmOHj7Wkdy3K52OhYIho9oiUV+A+uDZQ/tG/uwFzwR/TBkjIIbuyNQUg9YC9Bc51hQ+zbBoFix5lU6fRkaoFvrm1dUzDEVMmTPonUhGVozT1/9qQbFwUWpf4wdmf8htDo6CjBvZgsXQrgRPidByKbscdMtG7eRHWffJ3jHcuGa+hyvjutnBmIvLwMihStJPjeDsJ5PYMGFfjHy2/PTmR8BHJuHAGxP1CV2AIByeeMBV8d6Kp303F651hdqrap6S0qmKhvcl95fRAzmRX9eL0t5nKSUOcvisAyfUDvwQHQIGamqMTYgefv7dk0eQZEPmRRtnql65i8ZQlGKz5N8xFgIcD+/CQZYN9mGeTasPkgyzYHCfuptG3TmSjU5suX3SZKtoL/7edzPThvV6wmg7UjNoZdkpVfQZhZlUUiQk4zub91c+wp+PeI1vTAyjKp4yTdwvp3pd0K5IMObwicgBTT1VBDBxNiDrKYe5lD7AVjxsT5h0/6vadXu7PT05IlPFK2OWzh5EsrLAU+zc0sFemh836oLxmFysOgW1YvW6VLwrK8uZEhHLkZoH3wl3VmiekIJOattpCGxFjtUoREyU6PzSvWSZeOaLpnqv4GDhDyU4VA= X-Forefront-Antispam-Report: CIP:203.18.50.13;CTRY:HK;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:hkhybrid02.nvidia.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(40470700001)(426003)(1076003)(110136005)(356005)(4326008)(5660300002)(70586007)(8936002)(26005)(54906003)(40460700001)(2906002)(16526019)(86362001)(36860700001)(36756003)(47076005)(186003)(82310400004)(316002)(83380400001)(2616005)(70206006)(336012)(6666004)(7636003)(508600001)(8676002)(34070700002)(107886003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 07:00:38.9442 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ae2e64e5-2435-42d7-4569-08d9ba187161 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[203.18.50.13];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT053.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4464 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Currently, each I/O EQ is taking 128KB of memory. This size is not needed in all use cases, and is critical with large scale. Hence, allow user to configure the size of I/O EQs. For example, to reduce I/O EQ size to 64, execute: $ devlink dev param set pci/0000:00:0b.0 name io_eq_size value 64 \ cmode driverinit $ devlink dev reload pci/0000:00:0b.0 Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh --- Documentation/networking/devlink/mlx5.rst | 4 ++++ .../net/ethernet/mellanox/mlx5/core/devlink.c | 14 ++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eq.c | 18 +++++++++++++++++- 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/devlink/mlx5.rst b/Documentation/networking/devlink/mlx5.rst index 4e4b97f7971a..291e7f63af73 100644 --- a/Documentation/networking/devlink/mlx5.rst +++ b/Documentation/networking/devlink/mlx5.rst @@ -14,8 +14,12 @@ Parameters * - Name - Mode + - Validation * - ``enable_roce`` - driverinit + * - ``io_eq_size`` + - driverinit + - The range is between 64 and 4096. The ``mlx5`` driver also implements the following driver-specific parameters. diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c index 1c98652b244a..d8a705a94dcc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c @@ -546,6 +546,13 @@ static int mlx5_devlink_enable_remote_dev_reset_get(struct devlink *devlink, u32 return 0; } +static int mlx5_devlink_eq_depth_validate(struct devlink *devlink, u32 id, + union devlink_param_value val, + struct netlink_ext_ack *extack) +{ + return (val.vu16 >= 64 && val.vu16 <= 4096) ? 0 : -EINVAL; +} + static const struct devlink_param mlx5_devlink_params[] = { DEVLINK_PARAM_DRIVER(MLX5_DEVLINK_PARAM_ID_FLOW_STEERING_MODE, "flow_steering_mode", DEVLINK_PARAM_TYPE_STRING, @@ -570,6 +577,8 @@ static const struct devlink_param mlx5_devlink_params[] = { DEVLINK_PARAM_GENERIC(ENABLE_REMOTE_DEV_RESET, BIT(DEVLINK_PARAM_CMODE_RUNTIME), mlx5_devlink_enable_remote_dev_reset_get, mlx5_devlink_enable_remote_dev_reset_set, NULL), + DEVLINK_PARAM_GENERIC(IO_EQ_SIZE, BIT(DEVLINK_PARAM_CMODE_DRIVERINIT), + NULL, NULL, mlx5_devlink_eq_depth_validate), }; static void mlx5_devlink_set_params_init_values(struct devlink *devlink) @@ -608,6 +617,11 @@ static void mlx5_devlink_set_params_init_values(struct devlink *devlink) value); } #endif + + value.vu16 = MLX5_COMP_EQ_SIZE; + devlink_param_driverinit_value_set(devlink, + DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE, + value); } static const struct devlink_param enable_eth_param = diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 792e0d6aa861..230f62804b73 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -19,6 +19,7 @@ #include "lib/clock.h" #include "diag/fw_tracer.h" #include "mlx5_irq.h" +#include "devlink.h" enum { MLX5_EQE_OWNER_INIT_VAL = 0x1, @@ -796,6 +797,21 @@ static void destroy_comp_eqs(struct mlx5_core_dev *dev) } } +static u16 comp_eq_depth_devlink_param_get(struct mlx5_core_dev *dev) +{ + struct devlink *devlink = priv_to_devlink(dev); + union devlink_param_value val; + int err; + + err = devlink_param_driverinit_value_get(devlink, + DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE, + &val); + if (!err) + return val.vu16; + mlx5_core_dbg(dev, "Failed to get param. using default. err = %d\n", err); + return MLX5_COMP_EQ_SIZE; +} + static int create_comp_eqs(struct mlx5_core_dev *dev) { struct mlx5_eq_table *table = dev->priv.eq_table; @@ -807,7 +823,7 @@ static int create_comp_eqs(struct mlx5_core_dev *dev) INIT_LIST_HEAD(&table->comp_eqs_list); ncomp_eqs = table->num_comp_eqs; - nent = MLX5_COMP_EQ_SIZE; + nent = comp_eq_depth_devlink_param_get(dev); for (i = 0; i < ncomp_eqs; i++) { struct mlx5_eq_param param = {}; int vecidx = i; From patchwork Wed Dec 8 07:00:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12663783 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38F1FC433F5 for ; Wed, 8 Dec 2021 07:00:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244366AbhLHHEJ (ORCPT ); Wed, 8 Dec 2021 02:04:09 -0500 Received: from mail-dm6nam08on2081.outbound.protection.outlook.com ([40.107.102.81]:19553 "EHLO NAM04-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244367AbhLHHEE (ORCPT ); Wed, 8 Dec 2021 02:04:04 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K6a0OCzFRwL4k38/7d+VaNcKTLH3oypa3FbwBjp1GTlOwPL71GODDxDHIzvok9HmrcrosTtd35x2HgzTLf66pxz5ua5S+6+F4mkkHMdYJE4hXX076spA/Ed3UEhU6iH3Y6D/nCp/00P4IZy5dD2/+E0AoicNMsIgy1NMRMl5zDFqzZ+3R0ztvv48FTL2PzMCsS0ZuPyiQL/+zpXw6GyoqfeQWh/nWeDWADrlT/Na1M6SFKsyZOWQIQ9RVjy7hUDYWJv2RytvdqJPrvSLWBmFeMHR1elOWwgOHe+CBCq1pin/vFcLU/h8FE4aQIiQ2IRA5XQXGrAm17C4f766xV+gBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2jtDw9rFt2BN8ZZw3K8mKy5FqnzF66bVj4IpnDkcjhE=; b=VxpmOudMmZ4NoHB17SWwEAivsJrt4tEzjq8MxXbQlNmdvpND/0tqMFV4awvVXMdg1/80pBeXeCeRYDdQVu4WWCViGwGQrFVyj6m7mmabYnolugRXsYFz0dUa2sgilDduGc+Zmmt1cduWTfluRxMAvvKps2N8VbPil/28O/JfsIwNUL1fHUfPKeqbiEY4VUSsiiCB9Y0OXHzIFPEh2Q7yoRtVayurfo7nvsOeGdEDKqMaaeyeBSJ7D+W7iq+hmc21biV4eL7ehuJEK6zb0jR3QX71NIXM0R0XZkGN8xwsoeex8fBE56dWB5nmkmH+co6kylW30qWE40O2QD4/Xks2xA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 203.18.50.12) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2jtDw9rFt2BN8ZZw3K8mKy5FqnzF66bVj4IpnDkcjhE=; b=jEzg6kDzGbPjlNkMj3ZsjwLeUM+iw/he85Qtqr73bCOM2JadUKug7LjKoyTIYKfW+noDgDIMRjFZDIAD9UdBgb5syOEtdgF322phjpDUqpA4NM0G+LaKw4QbvR1UkwnFPvLx3mXjqdZPf1Og0B0qdh8Lo4EedBjjQeR9XSu0+oy1GAVYQDXby0n4PUo8cR4wC/1rkx3tu5lzuKtsC0k2CFdDffzPibfpjzUnb7NKEmlEfK4hict4lAA9K0my9zqcy9MO4mr0lUjnwvCnlyQnK+8pQkSkTY91tHHUoahfm8JoGHPblC37V/MWUQfUR1l9qqXqc/qYoH0WygbP1+2i1Q== Received: from DM5PR11CA0012.namprd11.prod.outlook.com (2603:10b6:3:115::22) by BN6PR12MB1186.namprd12.prod.outlook.com (2603:10b6:404:1c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.20; Wed, 8 Dec 2021 07:00:31 +0000 Received: from DM6NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:3:115:cafe::6c) by DM5PR11CA0012.outlook.office365.com (2603:10b6:3:115::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.17 via Frontend Transport; Wed, 8 Dec 2021 07:00:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 203.18.50.12) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 203.18.50.12 as permitted sender) receiver=protection.outlook.com; client-ip=203.18.50.12; helo=mail.nvidia.com; Received: from mail.nvidia.com (203.18.50.12) by DM6NAM11FT021.mail.protection.outlook.com (10.13.173.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4755.13 via Frontend Transport; Wed, 8 Dec 2021 07:00:30 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 8 Dec 2021 07:00:28 +0000 Received: from nps-server-23.mtl.labs.mlnx (172.20.187.5) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Tue, 7 Dec 2021 23:00:24 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next v2 3/6] devlink: Add new "event_eq_size" generic device param Date: Wed, 8 Dec 2021 09:00:03 +0200 Message-ID: <20211208070006.13100-4-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211208070006.13100-1-shayd@nvidia.com> References: <20211208070006.13100-1-shayd@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 69ab7de1-6a43-4cde-2616-08d9ba186c64 X-MS-TrafficTypeDiagnostic: BN6PR12MB1186:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1751; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2zMNuD8ChsLumqjRQOHvM1EHy6jtkwDc9sPJvzymCmNhZ+1imLR/3wYMDu5LBhNafukPMDpnBSumvBxLqCA1zr455IP/qoc9nTIGpmXRycLj+cT9SeKnosC2BmrNNKx9ldhZQ8VBj2InLkRCpfC4+XHQSMhD1r0ZxrqQBWO5qYuvmBLq0UYiQxI3soD6ywgxF22lgAbWkdaKJqBOqI6j2NpwsUq3Ol5Z9meqK7l2XiLbMdjZUr9lCuPfKN+n9Kf+Mcpx0EAXaDpO76ZUHx0iTe7GYAn99pYTej+EIRzYg+/JTIet7p1gW+gWYpVDBoTAEhX+HJ7bg2kYp+62A5jWC2uJU/ZXN3G7a98eVXCXvs8PwYFNhp1jPwsbjWzyrNQV/wc84ktwzJ5CZGn9/CgtDwRZO5qZkk8PkI3qa0Y2W76oCUiz+Ngk6sZgEdjTHPxbPl4wuXQU8Vezu6xek7DzN4krNBQ7y/Ie4Bmbizt44x+MyI1B5FY1b1AciUtTDbaUdPk5g1cfV7ml+lENkr4AP5nmu+ea/1nw9JtYjAeIpm/6EzD17GJr13N4hIAmt7DpY9yuKbwfqbj6ZLtPGNUOfzuQRMTTlSbG/klZPBKavBuqxn0tvMBclZ+mdRDypo/q5qRbtoDOUPSZAh7Yf86kpTXr40Comuf71k/fO8oTHm2CfPA1eoLteM3pkf6zE20k9hbOBGjG7tNoJJF36gkIs+R2wFgFK5Uj2wWddUI2652tmKGqEJ1Zx3IMICkpfZKdtQgGfJNP1b/sXubxKaJ10mqeZ9Qecgd+OtS1H3ij+2VpYdRvkTAtTtvIPMdMqu7pWSldngmUBCClSBmOgpatEQ== X-Forefront-Antispam-Report: CIP:203.18.50.12;CTRY:HK;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:hkhybrid01.nvidia.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(40470700001)(36756003)(70586007)(83380400001)(508600001)(186003)(6666004)(70206006)(82310400004)(8676002)(107886003)(2906002)(1076003)(40460700001)(7636003)(4326008)(2616005)(16526019)(426003)(5660300002)(54906003)(110136005)(356005)(34070700002)(47076005)(26005)(36860700001)(86362001)(336012)(8936002)(316002)(41533002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 07:00:30.5589 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 69ab7de1-6a43-4cde-2616-08d9ba186c64 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[203.18.50.12];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1186 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add new device generic parameter to determine the size of the asynchronous control events EQ. For example, to reduce event EQ size to 64, execute: $ devlink dev param set pci/0000:06:00.0 \ name event_eq_size value 64 cmode driverinit $ devlink dev reload pci/0000:06:00.0 Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh --- Documentation/networking/devlink/devlink-params.rst | 3 +++ include/net/devlink.h | 4 ++++ net/core/devlink.c | 5 +++++ 3 files changed, 12 insertions(+) diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst index cd9342305a13..0eddee6e66f3 100644 --- a/Documentation/networking/devlink/devlink-params.rst +++ b/Documentation/networking/devlink/devlink-params.rst @@ -132,3 +132,6 @@ own name. * - ``io_eq_size`` - u16 - Control the size of I/O completion EQs. + * - ``event_eq_size`` + - u16 + - Control the size of asynchronous control events EQ. diff --git a/include/net/devlink.h b/include/net/devlink.h index 61efa45b8786..99b06740a918 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -460,6 +460,7 @@ enum devlink_param_generic_id { DEVLINK_PARAM_GENERIC_ID_ENABLE_VNET, DEVLINK_PARAM_GENERIC_ID_ENABLE_IWARP, DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE, + DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE, /* add new param generic ids above here*/ __DEVLINK_PARAM_GENERIC_ID_MAX, @@ -515,6 +516,9 @@ enum devlink_param_generic_id { #define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME "io_eq_size" #define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE DEVLINK_PARAM_TYPE_U16 +#define DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_NAME "event_eq_size" +#define DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_TYPE DEVLINK_PARAM_TYPE_U16 + #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \ { \ .id = DEVLINK_PARAM_GENERIC_ID_##_id, \ diff --git a/net/core/devlink.c b/net/core/devlink.c index 0d4e63d11585..d9f3c994e704 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4471,6 +4471,11 @@ static const struct devlink_param devlink_param_generic[] = { .name = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME, .type = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE, }, + { + .id = DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE, + .name = DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_NAME, + .type = DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_TYPE, + }, }; static int devlink_param_generic_verify(const struct devlink_param *param) From patchwork Wed Dec 8 07:00:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12663789 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21497C433FE for ; Wed, 8 Dec 2021 07:00:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244367AbhLHHET (ORCPT ); Wed, 8 Dec 2021 02:04:19 -0500 Received: from mail-bn8nam11on2046.outbound.protection.outlook.com ([40.107.236.46]:39809 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244385AbhLHHEP (ORCPT ); Wed, 8 Dec 2021 02:04:15 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XFc9BJJpxmnrqosAueLj2c6Z4FwM8nS3SkjC/EcuqqoI7KirHcdoXdFVudXSWI983FCrCmX0nDlnKo0S38pTvjd5iPc2m7kpNQ2+Z3pN1zpiCOurAAtkCTkBt+jpYtjOJIXAvTGwLbBJZQam8mDb0VHhW4zLyPwhYNCga91mbv9sdF6zVDZM9y1wRJWq0D9u2HlMMWGC9ARdhAlzAToafzQqxJnNVtjYRytt7dvp9tqMgp9Sdf9twlt878SPkn066vfEmiiuFAATI7MWRJyPSAGdN74h+zNtEjCHs92m7zOuNtMrLfrZey1Pk4qZyItxSNSDfB3tOvhQxgR8Z+p+/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=U41keckc4qw4/dBUqZGycfcApnmXn3HPWyp9DlJ0N/g=; b=K8qXsxFGXR6TymKEwDKFKkxt0oGYxozeb4+3vHsKLISQNk/EkrNMRZ+1Bh0MeMD2kwT/RKwP22vFgGNBT6sh3byyCFS+h+5LgQ2G2ytoD2SuDd/rLBcq4KfUuEgcgID1hChpGhqRVGORQk/G36UsUf1ip3Jjm0RtU4wzIO2Q6x/xt5Wy5iz14krAcV3TDCfLaP4y0HLnP5aVl4BNcjzGVjL5Gja124VKuEJqh4eR17EaCwamCkZD0aGla5tTVsHfRrLqYItyswE+sepIp9c6uDTSdAARisUatHbnFd2ajRB5TBxoXzXjNeM+TYivDRvWTot5D8F0xEo5oqiKFMinFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 203.18.50.14) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=U41keckc4qw4/dBUqZGycfcApnmXn3HPWyp9DlJ0N/g=; b=XemEvXqSfDhZCTUIQehc98V0cD8KMMfHLwilRoD9uY+0BLOFPkWotEdVnsJ/gzdEH8tJTYxBPxW1+MQZdFjN+BlH+f4L0rVzX3c/2AMQ8INzlzNKCfGyMB2qXhVkgbe5NPcNo48A3blCfq3Z09BGvGCc/iqkAp6gSQtWYVSbPCv4/XJfpppS3VJxW99G5jzJnMRirTyUrfn6sqRzCCtNYiI9cg4mx216EsYdm59ytVgykEtrFE5D0AAY+GqqxFlIest3/l3/FaGEMmmCugNhi9v54GK1lVvjo/W1hp+oR8SAPOGWktPdPerFY2yz81CuMaigiUHrqvBK/FKLuMR7Pw== Received: from DS7PR03CA0359.namprd03.prod.outlook.com (2603:10b6:8:55::35) by DM6PR12MB3483.namprd12.prod.outlook.com (2603:10b6:5:11f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.16; Wed, 8 Dec 2021 07:00:42 +0000 Received: from DM6NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:8:55:cafe::d3) by DS7PR03CA0359.outlook.office365.com (2603:10b6:8:55::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.17 via Frontend Transport; Wed, 8 Dec 2021 07:00:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 203.18.50.14) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 203.18.50.14 as permitted sender) receiver=protection.outlook.com; client-ip=203.18.50.14; helo=mail.nvidia.com; Received: from mail.nvidia.com (203.18.50.14) by DM6NAM11FT060.mail.protection.outlook.com (10.13.173.63) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4755.13 via Frontend Transport; Wed, 8 Dec 2021 07:00:41 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 8 Dec 2021 07:00:31 +0000 Received: from nps-server-23.mtl.labs.mlnx (172.20.187.5) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Tue, 7 Dec 2021 23:00:27 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next v2 4/6] net/mlx5: Let user configure event_eq_size param Date: Wed, 8 Dec 2021 09:00:04 +0200 Message-ID: <20211208070006.13100-5-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211208070006.13100-1-shayd@nvidia.com> References: <20211208070006.13100-1-shayd@nvidia.com> MIME-Version: 1.0 X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f1abbf0a-aa76-4467-52e8-08d9ba187318 X-MS-TrafficTypeDiagnostic: DM6PR12MB3483:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /hvr3onln7EyPbwaWRFNPLu/1jVuw6PMhrev744G7pec4soeqoq8eaJ921gWEQgIhUYSEUd24EvXDeAGpHz/c988FKFeUSPfw+8uc2eHTViouSGYSEpbWEUQCBmZLMKzmvaTrlRHpuvV70ls6JDqs2OPysdkwZYvKqCDMjLaHz+UIHJR6PCoBbgTTG0j41DcKkY9ObCON/hb5pwAFQb63Wsa9PVuUixYtzeCC+vWTIKNwS1r8oqLh8JOEcdTLAIkpfIHcZxddf+lZeZiS/Fx8/ELxYc/IPghbX1m1tv3upUmoIr9L6BVv+8BlIfY2XfByueOBRxB57MUI/R9c+E9wGZcigfKRNB3LyAUcTquNLQLO7yWYChxs6GGme6opXrr/6nx9RdP/8fsXe+ar+sCxafWyC469mYfEBdENXfKrw2/bWHLvOXyQN7gwsU4i0ip6f/U3bgjeejlW/vEvy3c1YqgR4btIj2n5KtaHR2zkHoa90LAxVgWhJFCoiM7ej5CnBrkP1X3p+sT5PZh7bqwmUpIlg3A+0teuuXl/fRwbE80LKyF5VfAokZG05kwK1GCnuJE4U98juoHvVQzWlFa0JNZWTZM3nUpyiSLgjDC+PCCWpBoQCcmlqRPvyZ5GG85ohuyLhr0UC0gBtMsAXIvn+ESKqJxoGps/XTv/FC0Prd7wj3JMXxVgVfB2Je0jnDK4Q9mdFLR+pUCdTg43KF2R10ME8/mrqIte+TpKsvPSkWqcm7C4HczvmYQMay8EMFul1558RqCbGVgzQrm50wXSy51KbsMEIOVfqljXIumGKo= X-Forefront-Antispam-Report: CIP:203.18.50.14;CTRY:HK;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:hkhybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(40470700001)(6666004)(26005)(2906002)(36756003)(110136005)(40460700001)(70206006)(186003)(16526019)(70586007)(83380400001)(356005)(86362001)(2616005)(5660300002)(54906003)(1076003)(107886003)(4326008)(8936002)(336012)(7636003)(316002)(8676002)(36860700001)(82310400004)(508600001)(426003)(47076005)(34070700002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 07:00:41.8216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f1abbf0a-aa76-4467-52e8-08d9ba187318 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[203.18.50.14];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3483 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Event EQ is an EQ which received the notification of almost all the events generated by the NIC. Currently, each event EQ is taking 512KB of memory. This size is not needed in most use cases, and is critical with large scale. Hence, allow user to configure the size of the event EQ. For example to reduce event EQ size to 64, execute:: $ devlink dev param set pci/0000:00:0b.0 name event_eq_size value 64 \ cmode driverinit $ devlink dev reload pci/0000:00:0b.0 Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh --- Documentation/networking/devlink/mlx5.rst | 3 +++ .../net/ethernet/mellanox/mlx5/core/devlink.c | 7 +++++++ drivers/net/ethernet/mellanox/mlx5/core/eq.c | 16 +++++++++++++++- 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/devlink/mlx5.rst b/Documentation/networking/devlink/mlx5.rst index 291e7f63af73..38089f0aefcf 100644 --- a/Documentation/networking/devlink/mlx5.rst +++ b/Documentation/networking/devlink/mlx5.rst @@ -20,6 +20,9 @@ Parameters * - ``io_eq_size`` - driverinit - The range is between 64 and 4096. + * - ``event_eq_size`` + - driverinit + - The range is between 64 and 4096. The ``mlx5`` driver also implements the following driver-specific parameters. diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c index d8a705a94dcc..31bbbb30acae 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c @@ -579,6 +579,8 @@ static const struct devlink_param mlx5_devlink_params[] = { mlx5_devlink_enable_remote_dev_reset_set, NULL), DEVLINK_PARAM_GENERIC(IO_EQ_SIZE, BIT(DEVLINK_PARAM_CMODE_DRIVERINIT), NULL, NULL, mlx5_devlink_eq_depth_validate), + DEVLINK_PARAM_GENERIC(EVENT_EQ_SIZE, BIT(DEVLINK_PARAM_CMODE_DRIVERINIT), + NULL, NULL, mlx5_devlink_eq_depth_validate), }; static void mlx5_devlink_set_params_init_values(struct devlink *devlink) @@ -622,6 +624,11 @@ static void mlx5_devlink_set_params_init_values(struct devlink *devlink) devlink_param_driverinit_value_set(devlink, DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE, value); + + value.vu16 = MLX5_NUM_ASYNC_EQE; + devlink_param_driverinit_value_set(devlink, + DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE, + value); } static const struct devlink_param enable_eth_param = diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 230f62804b73..3ec140af66fd 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -623,6 +623,20 @@ static void cleanup_async_eq(struct mlx5_core_dev *dev, name, err); } +static u16 async_eq_depth_devlink_param_get(struct mlx5_core_dev *dev) +{ + struct devlink *devlink = priv_to_devlink(dev); + union devlink_param_value val; + int err; + + err = devlink_param_driverinit_value_get(devlink, + DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE, + &val); + if (!err) + return val.vu16; + mlx5_core_dbg(dev, "Failed to get param. using default. err = %d\n", err); + return MLX5_NUM_ASYNC_EQE; +} static int create_async_eqs(struct mlx5_core_dev *dev) { struct mlx5_eq_table *table = dev->priv.eq_table; @@ -647,7 +661,7 @@ static int create_async_eqs(struct mlx5_core_dev *dev) param = (struct mlx5_eq_param) { .irq_index = MLX5_IRQ_EQ_CTRL, - .nent = MLX5_NUM_ASYNC_EQE, + .nent = async_eq_depth_devlink_param_get(dev), }; gather_async_events_mask(dev, param.mask); From patchwork Wed Dec 8 07:03:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12663791 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78D91C433EF for ; Wed, 8 Dec 2021 07:03:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240476AbhLHHHM (ORCPT ); Wed, 8 Dec 2021 02:07:12 -0500 Received: from mail-dm6nam11on2054.outbound.protection.outlook.com ([40.107.223.54]:60097 "EHLO NAM11-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231351AbhLHHHM (ORCPT ); Wed, 8 Dec 2021 02:07:12 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aR4ANdXKcsDeJI4YGczMKhcNMlcjFcOonA7Q5RXw/oHyPSqKWbXJEiLSsT0mgNyHH6U/3hsZBmp2FYoGNv4BY+qlkVJb2ytQS2MWvtC8iIhhFneQs4NuZBFr5F6I/FYqDoakGg4QZuwDtFdyhglj8dbPavK0qMMxjGeJBsF5kU62kX2jp2td9c3XvJe+wotE7z1sIEUk8ld4TmlbXHGj1jnPPEmuMKHyw3gdimIyGL9TR0SegLZp2Lfkd/oDDp27o55xH8jVkD5XyyNpCX/EM2KdV57hVvI0xuOMwLM+56IwcIwKBXPAfx64EcNPQLgJHMpp6GLMI3OwvOJGtNCKGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7zQ+hyuvTF6x2pdOAcM2eMfrvDp79gr28tTJrN51BOA=; b=RJsJ99r+9VpJYF8ryeaPY+VUIUQCP/xg9i5XxSFBssIKQpxaNw6XB1RQ1TNFQO20MR1siBBnpMkspzYf/o2kiKFoL7+sX2+dCeO6JZMbvNfs1mZKTVBdgAzVEiU7ATskGZq6gIB62oVLSVzGAGwmI8O5luoRYV9gkwDgYi2hNeDbwJZ3VeOOEg7m4imFJ5M4KY3A2fsy7VTF6f8hhKtdMI5odfF9G8XbKLOi7MaBvaZ8ABvJRaHMmyyWnCy7zsPmf0uuLGch+ShKEd5QUhkqT6Bz99xKzUbQqY12fIBUsCe9zEtBDR8UFWyVexz1oc+0w3CZmNMpUexYA/66xhnNQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 203.18.50.12) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7zQ+hyuvTF6x2pdOAcM2eMfrvDp79gr28tTJrN51BOA=; b=ZHq7qC4c0xWXBmXbmqt5epgGdFL7ORN9j9iDPbDm3Zi0STxmLJyXH2L6WQaEVsxq5y6nplYYR+ZJLXoijr0RTkbzTz4sscXy3XDcio2S0IlzzJmOUGkmLN2cNNKF9L/FRceIBFloCbdJSy8FLCPta75ZQ/UKVGJvhJxZl7WH4XhVxvH8/MPTeIyYklEqDISd/CP3qcVrwbZFSrEqZ+iU+ILXOXh1JbDf032016u7EE/w7CBVQu/1o4qMlOaVhMNOkW5uzFsGXeomLQ63FYV6TIndlOVLldf2PqA0QS7q1IGbDcoWwB34mYama2SSVoBrseBRmpHWXBSa5E4lcs14oA== Received: from DM6PR14CA0061.namprd14.prod.outlook.com (2603:10b6:5:18f::38) by DM6PR12MB3305.namprd12.prod.outlook.com (2603:10b6:5:189::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Wed, 8 Dec 2021 07:03:39 +0000 Received: from DM6NAM11FT064.eop-nam11.prod.protection.outlook.com (2603:10b6:5:18f:cafe::66) by DM6PR14CA0061.outlook.office365.com (2603:10b6:5:18f::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.14 via Frontend Transport; Wed, 8 Dec 2021 07:03:39 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 203.18.50.12) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 203.18.50.12 as permitted sender) receiver=protection.outlook.com; client-ip=203.18.50.12; helo=mail.nvidia.com; Received: from mail.nvidia.com (203.18.50.12) by DM6NAM11FT064.mail.protection.outlook.com (10.13.172.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4755.13 via Frontend Transport; Wed, 8 Dec 2021 07:03:39 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HKMAIL101.nvidia.com (10.18.16.10) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 8 Dec 2021 07:03:37 +0000 Received: from nps-server-23.mtl.labs.mlnx (172.20.187.5) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Tue, 7 Dec 2021 23:03:33 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next v2 5/6] devlink: Clarifies max_macs generic devlink param Date: Wed, 8 Dec 2021 09:03:20 +0200 Message-ID: <20211208070320.13247-1-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed15df1a-a7c5-49cd-e24d-08d9ba18dcb7 X-MS-TrafficTypeDiagnostic: DM6PR12MB3305:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5797; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wPCVKafw0Mwxk63xcpa8jKRpymREnaP5yZMknZ/STegoWiOgnnjeQfnrUDgvcoHUgjO+NcCcU8qHHkRCEDfvRYzCeIeg3rC0xPT0/rASwMq6+62eTXUyAldmvDnNvAY/dJbfR1njuGWL1ZiKEp53XF6XRwwz0mBvoN/eoi6dA2y8+cAttQ3DLZfwNiuzutjxhWOu4ryfsAgk+dEa0CXAHlS4aAoyAYCnU7vNUiZLlmyX/2JvbnVvoJZyFCqO0LRt32U7fNkGB8944/y/1NW2sQ3z7mA3k5RyzetkldIuhccGNvVJYLPAI4Gr9I3BXt15TC60df85AoM4wUKf43Vha89nDLi6nStS3+NjX7uBsjDr8MgGqMnsmRIlL3wiqAFzl2adPJSO7kbHCon+XDKZtF1no56dBlrBrFnnHMAkSrn5Gdr8+DetGagpqMQbmf/9vwobvhVHTFEgC+zpq84fiq02lOaMcsH3DSFvyLeXQ6EKfew++lvmwuhyl8NxNMcUVTuMHeX08bXPYi+RsdFnTV0olOAPl+RdLYwhl0wUQ+xrxiiVcLItyLPsuXbmEIqfYgqZE4QLhuyRgbyRfjGCP3m63dpYcP8nDtYVJ1YkYqINfA3uTEoqiXpdpbc9UvHjQV3lL3BzvNjyTMJAYsuzDme+6PSUH5C4ci8T6ctwg3/cUBJgfXtUEqZNS9RrqZaOsSdUJWVrsRdOWw9hsBV9kCMpR91Zh2m4nHLMVaMV2LVY6wpOM2xAqfBKQALCrElf0+c14YFAx2SJXjQ77dvl49mtIYT4Jy9xQipu80Q7XPsvqYr9q+lZ1EheZ76DtHt44vFomTOmaODSBfa5ARZHPw== X-Forefront-Antispam-Report: CIP:203.18.50.12;CTRY:HK;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:hkhybrid01.nvidia.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(40470700001)(336012)(110136005)(54906003)(316002)(36860700001)(36756003)(107886003)(40460700001)(82310400004)(1076003)(8936002)(70206006)(70586007)(8676002)(6666004)(426003)(2616005)(86362001)(2906002)(5660300002)(4326008)(16526019)(186003)(7636003)(34070700002)(508600001)(47076005)(356005)(83380400001)(26005)(41533002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 07:03:39.0280 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed15df1a-a7c5-49cd-e24d-08d9ba18dcb7 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[203.18.50.12];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT064.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3305 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The generic param max_macs documentation isn't clear. Replace it with a more descriptive documentation Signed-off-by: Shay Drory Reviewed-by: Jiri Pirko Reviewed-by: Moshe Shemesh --- Documentation/networking/devlink/devlink-params.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst index 0eddee6e66f3..2cbdce4e6a1f 100644 --- a/Documentation/networking/devlink/devlink-params.rst +++ b/Documentation/networking/devlink/devlink-params.rst @@ -118,8 +118,10 @@ own name. errors. * - ``max_macs`` - u32 - - Specifies the maximum number of MAC addresses per ethernet port of - this device. + - Typically macvlan, vlan net devices mac are also programmed in their + parent netdevice's Function rx filter. This parameter limit the + maximum number of unicast mac address filters to receive traffic from + per ethernet port of this device. * - ``region_snapshot_enable`` - Boolean - Enable capture of ``devlink-region`` snapshots. From patchwork Wed Dec 8 07:03:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12663807 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A2A1C433F5 for ; Wed, 8 Dec 2021 07:04:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244409AbhLHHHn (ORCPT ); Wed, 8 Dec 2021 02:07:43 -0500 Received: from mail-dm6nam12on2069.outbound.protection.outlook.com ([40.107.243.69]:39040 "EHLO NAM12-DM6-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S244416AbhLHHHk (ORCPT ); Wed, 8 Dec 2021 02:07:40 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oZnPvjA5yTCoCKNZcfSRUP35L4ueqFycN+ho1qy1wAc2Zwdj0zbtzEmqt0nvai2byEnRh/hjYyWcFU/8dFwFtEO5ldx3PZp1wmzwyA6c0UG3sgl8oUIPNYvWTv0gpJhQgIBkb+nOp1NKGzmTIFRiihItozM6WW7A5eushV51g0np0NeYQ6Pho1VpWKlfWE4LZRl7N2tVd5nHr9DgXMj6Z888x4mZsqg2MbixBC0gNjuUOozOiIa9CA8cWqHbfAyemyopddw7r5YbkwTrRKnBGmAc6N9aPs8mmzrw+W+yDGj8doDekhvCspNzxXS+i/WmJGVEOMhLELzSpaoDepSWrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BsN6KDJirdkosJuidig7EzzIy6c2O3IgtvCXAizKBxE=; b=iDQKMOr6Nl3LguEKGH444FN8Xj2uxNg4y6n47aCtBYWZyfoAtyZHblXSQvo+8a3sbHDEArrlAA0LuuDqS8bhWlK1tQiCmTY/S0LB6rh5ftbxpEbybp5D+O4fVFI9ATB6HSyExEhdG/ukcz6B6usvRwfKI2ey+mRYzT2bilL5KFNm+8UEgds6TXa8FoNKTeAm+0GINvezIEKg9dFOddYLv/stOy824CbH7Woup6Hwym7xiPi0WETtkbwH8euo66RWlnX1vnWFL9QMwHaYgfBfUabtwWKfxZ2Vu47nK9LjgJz4FCkXvkKymynpZFxr2mW42DusGEU6vrtg44rO7k75GA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 203.18.50.14) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BsN6KDJirdkosJuidig7EzzIy6c2O3IgtvCXAizKBxE=; b=AoYz0XRYxJQJL4XNJtu7SpeCNFdGtrGTH0FWWFWGsJ7Ja+UkjBBRjljworExagYj1PMDrQNgyz6tFcC2XZeHawPMIXsEqQOTRI/CxfAXrZL/sC1g98RJS2y7qy1EfyU2gYaOTEYi6swAEB+1GJEWwEq+pzq2rFAzZY4OjY0NyfXmE9dCs4olWoqBPVYWDnNQy0eQzkfA/H3hWI3WSiOoot7j6kec8kP+V5vBIORnqfH7m8CjnPa5BpRIIj4VL50Tj/ubrTI92tGTCvbc0UKtjYCRAhpzYjTJZketdmKXc77O4DYhVj72YueOqTVz6DqrMa1o7r++p7xz/By0AwQI8Q== Received: from DM6PR12CA0035.namprd12.prod.outlook.com (2603:10b6:5:1c0::48) by MWHPR12MB1471.namprd12.prod.outlook.com (2603:10b6:301:e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12; Wed, 8 Dec 2021 07:04:07 +0000 Received: from DM6NAM11FT044.eop-nam11.prod.protection.outlook.com (2603:10b6:5:1c0:cafe::66) by DM6PR12CA0035.outlook.office365.com (2603:10b6:5:1c0::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12 via Frontend Transport; Wed, 8 Dec 2021 07:04:07 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 203.18.50.14) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 203.18.50.14 as permitted sender) receiver=protection.outlook.com; client-ip=203.18.50.14; helo=mail.nvidia.com; Received: from mail.nvidia.com (203.18.50.14) by DM6NAM11FT044.mail.protection.outlook.com (10.13.173.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4755.13 via Frontend Transport; Wed, 8 Dec 2021 07:04:07 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HKMAIL103.nvidia.com (10.18.16.12) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Wed, 8 Dec 2021 07:04:04 +0000 Received: from nps-server-23.mtl.labs.mlnx (172.20.187.5) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.9; Tue, 7 Dec 2021 23:04:00 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh , Parav Pandit Subject: [PATCH net-next v2 6/6] net/mlx5: Let user configure max_macs generic param Date: Wed, 8 Dec 2021 09:03:50 +0200 Message-ID: <20211208070350.13305-1-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 MIME-Version: 1.0 X-Originating-IP: [172.20.187.5] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5255b4a4-9b1f-4d12-d0ec-08d9ba18ed6f X-MS-TrafficTypeDiagnostic: MWHPR12MB1471:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: So7SIFTnqzOFds8RS3Dk6wOiRNpugFgdr4Iqe8HZUvPktfUM0c1Xd4iTqoZ42Owm/rkU+7Ltmz5ldAZHVUmfSAGqZIoaUOx+ZH9ULDLGBzb467TDzlnnHpnWHAQ3wwTo4ulpzMaaHaYpMEdc2YmZyroZqZsa+LPv3seggwl/ydaNMPnDge+BbBU4wicAs6pDtApb0Zlu+hTnVN/kD5HKZTiL0XakyV2JXQwhmLVy+YVnmQ4aoJkw7oaEGYtUPWwQoDhJGmlUPSu7xOqjnKVUTayoF6NLJM9pJN1DpnWT6Nuz3BnP2IwiFiBA9aL+QH7cQZgKQCF+ckD08DCs4aijSdcctwFKDk02ByvDOR0182ShRRSLvRoxjTo3VvapJ72xl3CysiJ3b2LCnkeGvglfHyoLZYTKFK0BFcBCwzbgVM2iIKpFzuJ/9DhuUnaIiFrsjFfkJAsEBysodvo0Fbyo2U5ooyqPzxMxpq/bn+T0Wi1ylAP+pq0LnAMi1opQcVFb5YvaesXvuvaNV6+PXPD6OBpvlyAabg/CTIGhxsa7tsphmK24QvJUqFVRthqjXh52ImlcPv87Xhyl0TySx+DBzL2UTvic73pvGdpr7BFeWM5EfHA3eiIC14KHT8dCb427jpXUZZbPXjNd09PpRxAUmaKCCL3hni0ZWASHLQu64FupeR2nMl/OZYQs3Dk/iOAUFcBzkigeNmNuKUYP2fXzSshYi9IG+ZkrwWk9w5eylsGgrLP20BI/RbJZvcP7Rn4OTwGH62vFP+iCVrvYCBZooFXGBClncRH7WVtRp5MQX8qA8BBpCCFA9MThpcoU9i519unx7iG1viGblV65+Vw8wQ== X-Forefront-Antispam-Report: CIP:203.18.50.14;CTRY:HK;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:hkhybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(40470700001)(508600001)(8676002)(2906002)(47076005)(34070700002)(336012)(107886003)(36860700001)(5660300002)(4326008)(8936002)(316002)(70586007)(70206006)(1076003)(2616005)(6666004)(36756003)(426003)(16526019)(86362001)(26005)(7636003)(110136005)(54906003)(83380400001)(186003)(82310400004)(356005)(40460700001)(41533002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Dec 2021 07:04:07.0658 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5255b4a4-9b1f-4d12-d0ec-08d9ba18ed6f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[203.18.50.14];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT044.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1471 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Currently, max_macs is taking 70Kbytes of memory per function. This size is not needed in all use cases, and is critical with large scale. Hence, allow user to configure the number of max_macs. For example, to reduce the number of max_macs to 1, execute:: $ devlink dev param set pci/0000:00:0b.0 name max_macs value 1 \ cmode driverinit $ devlink dev reload pci/0000:00:0b.0 Signed-off-by: Shay Drory Reviewed-by: Moshe Shemesh Reviewed-by: Parav Pandit --- Documentation/networking/devlink/mlx5.rst | 3 + .../net/ethernet/mellanox/mlx5/core/devlink.c | 67 +++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/main.c | 21 ++++++ include/linux/mlx5/mlx5_ifc.h | 2 +- 4 files changed, 92 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/devlink/mlx5.rst b/Documentation/networking/devlink/mlx5.rst index 38089f0aefcf..38e94ed65936 100644 --- a/Documentation/networking/devlink/mlx5.rst +++ b/Documentation/networking/devlink/mlx5.rst @@ -23,6 +23,9 @@ Parameters * - ``event_eq_size`` - driverinit - The range is between 64 and 4096. + * - ``max_macs`` + - driverinit + - The range is between 1 and 2^31. Only power of 2 values are supported. The ``mlx5`` driver also implements the following driver-specific parameters. diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c index 31bbbb30acae..4c96a1f60ef8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c @@ -773,6 +773,66 @@ static void mlx5_devlink_auxdev_params_unregister(struct devlink *devlink) mlx5_devlink_eth_param_unregister(devlink); } +static int mlx5_devlink_max_uc_list_validate(struct devlink *devlink, u32 id, + union devlink_param_value val, + struct netlink_ext_ack *extack) +{ + struct mlx5_core_dev *dev = devlink_priv(devlink); + + if (val.vu32 == 0) { + NL_SET_ERR_MSG_MOD(extack, "max_macs value must be greater than 0"); + return -EINVAL; + } + + if (!is_power_of_2(val.vu32)) { + NL_SET_ERR_MSG_MOD(extack, "Only power of 2 values are supported for max_macs"); + return -EINVAL; + } + + if (ilog2(val.vu32) > + MLX5_CAP_GEN_MAX(dev, log_max_current_uc_list)) { + NL_SET_ERR_MSG_MOD(extack, "max_macs value is out of the supported range"); + return -EINVAL; + } + + return 0; +} + +static const struct devlink_param max_uc_list_param = + DEVLINK_PARAM_GENERIC(MAX_MACS, BIT(DEVLINK_PARAM_CMODE_DRIVERINIT), + NULL, NULL, mlx5_devlink_max_uc_list_validate); + +static int mlx5_devlink_max_uc_list_param_register(struct devlink *devlink) +{ + struct mlx5_core_dev *dev = devlink_priv(devlink); + union devlink_param_value value; + int err; + + if (!MLX5_CAP_GEN_MAX(dev, log_max_current_uc_list_wr_supported)) + return 0; + + err = devlink_param_register(devlink, &max_uc_list_param); + if (err) + return err; + + value.vu32 = 1 << MLX5_CAP_GEN(dev, log_max_current_uc_list); + devlink_param_driverinit_value_set(devlink, + DEVLINK_PARAM_GENERIC_ID_MAX_MACS, + value); + return 0; +} + +static void +mlx5_devlink_max_uc_list_param_unregister(struct devlink *devlink) +{ + struct mlx5_core_dev *dev = devlink_priv(devlink); + + if (!MLX5_CAP_GEN_MAX(dev, log_max_current_uc_list_wr_supported)) + return; + + devlink_param_unregister(devlink, &max_uc_list_param); +} + #define MLX5_TRAP_DROP(_id, _group_id) \ DEVLINK_TRAP_GENERIC(DROP, DROP, _id, \ DEVLINK_TRAP_GROUP_GENERIC_ID_##_group_id, \ @@ -832,6 +892,10 @@ int mlx5_devlink_register(struct devlink *devlink) if (err) goto auxdev_reg_err; + err = mlx5_devlink_max_uc_list_param_register(devlink); + if (err) + goto max_uc_list_err; + err = mlx5_devlink_traps_register(devlink); if (err) goto traps_reg_err; @@ -842,6 +906,8 @@ int mlx5_devlink_register(struct devlink *devlink) return 0; traps_reg_err: + mlx5_devlink_max_uc_list_param_unregister(devlink); +max_uc_list_err: mlx5_devlink_auxdev_params_unregister(devlink); auxdev_reg_err: devlink_params_unregister(devlink, mlx5_devlink_params, @@ -852,6 +918,7 @@ int mlx5_devlink_register(struct devlink *devlink) void mlx5_devlink_unregister(struct devlink *devlink) { mlx5_devlink_traps_unregister(devlink); + mlx5_devlink_max_uc_list_param_unregister(devlink); mlx5_devlink_auxdev_params_unregister(devlink); devlink_params_unregister(devlink, mlx5_devlink_params, ARRAY_SIZE(mlx5_devlink_params)); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index d97c9e86d7b3..b1a82226623c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -484,10 +484,26 @@ static int handle_hca_cap_odp(struct mlx5_core_dev *dev, void *set_ctx) return set_caps(dev, set_ctx, MLX5_SET_HCA_CAP_OP_MOD_ODP); } +static int max_uc_list_get_devlink_param(struct mlx5_core_dev *dev) +{ + struct devlink *devlink = priv_to_devlink(dev); + union devlink_param_value val; + int err; + + err = devlink_param_driverinit_value_get(devlink, + DEVLINK_PARAM_GENERIC_ID_MAX_MACS, + &val); + if (!err) + return val.vu32; + mlx5_core_dbg(dev, "Failed to get param. err = %d\n", err); + return err; +} + static int handle_hca_cap(struct mlx5_core_dev *dev, void *set_ctx) { struct mlx5_profile *prof = &dev->profile; void *set_hca_cap; + int max_uc_list; int err; err = mlx5_core_get_caps(dev, MLX5_CAP_GENERAL); @@ -561,6 +577,11 @@ static int handle_hca_cap(struct mlx5_core_dev *dev, void *set_ctx) if (MLX5_CAP_GEN(dev, roce_rw_supported)) MLX5_SET(cmd_hca_cap, set_hca_cap, roce, mlx5_is_roce_init_enabled(dev)); + max_uc_list = max_uc_list_get_devlink_param(dev); + if (max_uc_list > 0) + MLX5_SET(cmd_hca_cap, set_hca_cap, log_max_current_uc_list, + ilog2(max_uc_list)); + return set_caps(dev, set_ctx, MLX5_SET_HCA_CAP_OP_MOD_GENERAL_DEVICE); } diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index fbaab440a484..e9db12aae8f9 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h @@ -1621,7 +1621,7 @@ struct mlx5_ifc_cmd_hca_cap_bits { u8 ext_stride_num_range[0x1]; u8 roce_rw_supported[0x1]; - u8 reserved_at_3a2[0x1]; + u8 log_max_current_uc_list_wr_supported[0x1]; u8 log_max_stride_sz_rq[0x5]; u8 reserved_at_3a8[0x3]; u8 log_min_stride_sz_rq[0x5];