From patchwork Tue Nov 30 15:07: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: 12647565 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 6C247C433EF for ; Tue, 30 Nov 2021 15:10:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239337AbhK3PNs (ORCPT ); Tue, 30 Nov 2021 10:13:48 -0500 Received: from mail-bn8nam11on2081.outbound.protection.outlook.com ([40.107.236.81]:16065 "EHLO NAM11-BN8-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242982AbhK3PLY (ORCPT ); Tue, 30 Nov 2021 10:11:24 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YmU8FkHmWC6FlJ79hCfW+GnYuZMFG3IBckKvAmERzmlS+twitPZ4t7UIA/X0RoUsybALF0NCDK5KqGMkKntZ9LQtg2MCkHMLl6nBFenkN1B3Xjwj+YLZCuyCyPpScA7+S3/qBkgMXCywvASDpnGgcZnE0lwR+O5vLGaJYsRpLZawSnEnjpMJ+FvBV5MK9Kc9IKVznSFtEwCVAQWxTTFtzxeSHZMkdN6SURmJ6Qw2phZZOaEYRDfKnQganhwXIrf81Kj79f4F4jT8E2AaYLv9Uik2Q62QjvejzqU0z5G6Q5HU/6bdW+pcARVmnGdWdCW2V0alZMHR50Dv3zQxUVLL+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=ZAjGwWbhhB0JyNbg00j7BfI9rJ3BolMyHQ8QS/TX9r0=; b=GSEvi/rKiafkufMSJs5eh7DRjg+R8bdXOLlgSL+z8Y9Q41OU5xFIntLcohXvgN5b/ieW13+O24IGBLFymlnAILN62SOrix7ZFTqMKM5STwALM9wwu7XTjg1kiHGj8bJadWvTAJGQ+KW8IwnxZbifHAuubVyljQwvpliiiC1yB7bb+BW/ObawjKCpmPYgER4V6NAkjYszYdR77X4kqEb59wU5sYLmvTcjNJjOytN0RCr9K+5jR30LycVN4q9nc+wCmOSxvxBHucTTj0piDi6nAUs0vaHnK0mq564x3azjRZyTLv9ma4UBirvK+OjstecwlHRFPRI9rVygQCcBVYFlxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.35) 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=ZAjGwWbhhB0JyNbg00j7BfI9rJ3BolMyHQ8QS/TX9r0=; b=hC28yy0sGI2GnAVelonpGhbFKXIBbcA8TY1ygd8VbJG8Ne15zE11lkJVwiGNV0l/z4gIrLiulL3k8LCwDSFtwh21q9BCfcEqUpwtlNI6jo50yh3mH7shKwixqx//3SHvBvTayCHGo1mcUGk+GLmGKE2XvW3FcCHhHXMTtNB/x2UGJoBWEMa1cXiruw6Wtj/Hv5vq1o6hLHuEl5516cZmorq2i+Y7smgfAwtzBygJRLu9/JL8q8PZkAjRmIqqxT7zUmjgpDQwk3tO8Qrg2na+KazCGOJg2nLI4oe6hR6yky+5UY/WkEpxE2YNmxZvLpIiAcYpy1MrMpttIkE6wS9E5Q== Received: from DM5PR07CA0040.namprd07.prod.outlook.com (2603:10b6:3:16::26) by CH2PR12MB3894.namprd12.prod.outlook.com (2603:10b6:610:2b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Tue, 30 Nov 2021 15:08:02 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:3:16:cafe::3c) by DM5PR07CA0040.outlook.office365.com (2603:10b6:3:16::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.11 via Frontend Transport; Tue, 30 Nov 2021 15:08:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.35) 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 216.228.112.35 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.35; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.35) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Tue, 30 Nov 2021 15:08:01 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 30 Nov 2021 15:08:00 +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.5; Tue, 30 Nov 2021 07:07:56 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next 1/4] net/mlx5: Let user configure io_eq_size resource Date: Tue, 30 Nov 2021 17:07:03 +0200 Message-ID: <20211130150705.19863-2-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211130150705.19863-1-shayd@nvidia.com> References: <20211130150705.19863-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: f9d24359-91f8-48b3-0c47-08d9b4133412 X-MS-TrafficTypeDiagnostic: CH2PR12MB3894: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:2000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NH9SbP+D1IPVotMmnqIhLYvKalCLT8hML+sUFXvrqg8ccxtvIUrPkvPqojecE0RXCbR+yfhzRhHn4rK/v9GqR9uA3rl1Gh+MdQxzgtLiMd8zgFxyrScFuWIxOg2r2uUTBbYz7qXwkfbBQjQaFwUhJmv4o4AimmtaSLdU3zZIU6jHFQaDkph4G7R9IAogsorJ2/riKIy8wHRylRKFECNMjkkpQxgqp9E84086T58c70RSUulfLSbnm6Oms8BQ7s+J0+3+HJj24wbuylvC8vWDvDu/YUxq1v6oRUrDK+GbV74RtKQbVrEJ1t+6H60eZzje6IYkg7BcPEDNnWiB85k8ZXpPX8n2MFvBPEUAt8jzGI8mReDiNu+yBpIib3ksGkZqWH2Ctep2bD2JOYBnpAMxNI+zPYjGNe1tDFeSO/VjykuN/Arr7kyrXouQhDvco1EtF51gxfVPhQ1SBto7ILhhezYjz58rs4uq25pgpwCVHaaFQx2VxluMKImLwSRZqixgoY36YLhafeSohc5SPOTVdPw//5js12SIWpscI5tTfzq71BePq1D9i6ZZySY7iMPMHgegUSCaw0ahd5Iy3cjYOW7nzfd8JJXUfhNibXTcN32661SvQ31yZxXnCJgsZ2ZE8cLg6ALG7FHASJWB1BDBZ322jp/IU3cYxTzPXOhM32ecQVgR7u+bN7K+dnxNfCPKY9bvBhWFoRZALGGVoxJIb6DXnrsjouVHHktLGZYFUr5kCKgQFmw7OVh44ZYqn69ZMRZIh5f1R1lX20NFp4oerA== X-Forefront-Antispam-Report: CIP:216.228.112.35;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid02.nvidia.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(40470700001)(26005)(316002)(8936002)(336012)(110136005)(2616005)(47076005)(5660300002)(2906002)(86362001)(8676002)(54906003)(83380400001)(70586007)(70206006)(82310400004)(36860700001)(508600001)(36756003)(16526019)(40460700001)(4326008)(1076003)(186003)(7636003)(107886003)(6666004)(426003)(356005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2021 15:08:01.9079 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9d24359-91f8-48b3-0c47-08d9b4133412 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.35];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3894 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 resource set pci/0000:00:0b.0 path /io_eq_size/ size 64 $ devlink dev reload pci/0000:00:0b.0 In addition, add it as a "Generic Resource" in order for different drivers to be aligned by the same resource name when exposing to user space. Signed-off-by: Shay Drory Reviewed-by: Jiri Pirko Reviewed-by: Moshe Shemesh --- .../networking/devlink/devlink-resource.rst | 2 + .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../net/ethernet/mellanox/mlx5/core/devlink.h | 11 ++++ .../ethernet/mellanox/mlx5/core/devlink_res.c | 55 +++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eq.c | 3 +- .../net/ethernet/mellanox/mlx5/core/main.c | 3 + include/linux/mlx5/driver.h | 4 -- include/net/devlink.h | 1 + 8 files changed, 75 insertions(+), 6 deletions(-) create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c diff --git a/Documentation/networking/devlink/devlink-resource.rst b/Documentation/networking/devlink/devlink-resource.rst index 3d5ae51e65a2..d5df5e65d057 100644 --- a/Documentation/networking/devlink/devlink-resource.rst +++ b/Documentation/networking/devlink/devlink-resource.rst @@ -36,6 +36,8 @@ device drivers and their description must be added to the following table: - Description * - ``physical_ports`` - A limited capacity of physical ports that the switch ASIC can support + * - ``io_eq_size`` + - Control the size of I/O completion EQs example usage ------------- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Makefile b/drivers/net/ethernet/mellanox/mlx5/core/Makefile index e63bb9ceb9c0..19656ea025c7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/Makefile +++ b/drivers/net/ethernet/mellanox/mlx5/core/Makefile @@ -16,7 +16,7 @@ mlx5_core-y := main.o cmd.o debugfs.o fw.o eq.o uar.o pagealloc.o \ transobj.o vport.o sriov.o fs_cmd.o fs_core.o pci_irq.o \ fs_counters.o fs_ft_pool.o rl.o lag/lag.o dev.o events.o wq.o lib/gid.o \ lib/devcom.o lib/pci_vsc.o lib/dm.o lib/fs_ttc.o diag/fs_tracepoint.o \ - diag/fw_tracer.o diag/crdump.o devlink.o diag/rsc_dump.o \ + diag/fw_tracer.o diag/crdump.o devlink.o devlink_res.o diag/rsc_dump.o \ fw_reset.o qos.o lib/tout.o # diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.h b/drivers/net/ethernet/mellanox/mlx5/core/devlink.h index 30bf4882779b..4192f23b1446 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.h @@ -6,6 +6,13 @@ #include +enum mlx5_devlink_resource_id { + MLX5_DL_RES_COMP_EQ = 1, + + __MLX5_ID_RES_MAX, + MLX5_ID_RES_MAX = __MLX5_ID_RES_MAX - 1, +}; + enum mlx5_devlink_param_id { MLX5_DEVLINK_PARAM_ID_BASE = DEVLINK_PARAM_GENERIC_ID_MAX, MLX5_DEVLINK_PARAM_ID_FLOW_STEERING_MODE, @@ -31,6 +38,10 @@ int mlx5_devlink_trap_get_num_active(struct mlx5_core_dev *dev); int mlx5_devlink_traps_get_action(struct mlx5_core_dev *dev, int trap_id, enum devlink_trap_action *action); +void mlx5_devlink_res_register(struct mlx5_core_dev *dev); +void mlx5_devlink_res_unregister(struct mlx5_core_dev *dev); +size_t mlx5_devlink_res_size(struct mlx5_core_dev *dev, enum mlx5_devlink_resource_id id); + struct devlink *mlx5_devlink_alloc(struct device *dev); void mlx5_devlink_free(struct devlink *devlink); int mlx5_devlink_register(struct devlink *devlink); diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c new file mode 100644 index 000000000000..2b7a956b7779 --- /dev/null +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB +/* Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. */ + +#include "devlink.h" +#include "mlx5_core.h" + +enum { + MLX5_EQ_MIN_SIZE = 64, + MLX5_EQ_MAX_SIZE = 4096, + MLX5_COMP_EQ_SIZE = 1024, +}; + +static int comp_eq_res_register(struct mlx5_core_dev *dev) +{ + struct devlink_resource_size_params comp_eq_size; + struct devlink *devlink = priv_to_devlink(dev); + + devlink_resource_size_params_init(&comp_eq_size, MLX5_EQ_MIN_SIZE, + MLX5_EQ_MAX_SIZE, 1, DEVLINK_RESOURCE_UNIT_ENTRY); + return devlink_resource_register(devlink, DEVLINK_RESOURCE_GENERIC_NAME_IO_EQ, + MLX5_COMP_EQ_SIZE, MLX5_DL_RES_COMP_EQ, + DEVLINK_RESOURCE_ID_PARENT_TOP, &comp_eq_size); +} + +void mlx5_devlink_res_register(struct mlx5_core_dev *dev) +{ + int err; + + err = comp_eq_res_register(dev); + if (err) + mlx5_core_err(dev, "Failed to register resources, err = %d\n", err); +} + +void mlx5_devlink_res_unregister(struct mlx5_core_dev *dev) +{ + devlink_resources_unregister(priv_to_devlink(dev), NULL); +} + +static const size_t default_vals[MLX5_ID_RES_MAX + 1] = { + [MLX5_DL_RES_COMP_EQ] = MLX5_COMP_EQ_SIZE, +}; + +size_t mlx5_devlink_res_size(struct mlx5_core_dev *dev, enum mlx5_devlink_resource_id id) +{ + struct devlink *devlink = priv_to_devlink(dev); + u64 size; + int err; + + err = devlink_resource_size_get(devlink, id, &size); + if (!err) + return size; + mlx5_core_err(dev, "Failed to get param. using default. err = %d, id = %u\n", + err, id); + return default_vals[id]; +} diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 792e0d6aa861..4dda6e2a4cbc 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, @@ -807,7 +808,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 = mlx5_devlink_res_size(dev, MLX5_DL_RES_COMP_EQ); for (i = 0; i < ncomp_eqs; i++) { struct mlx5_eq_param param = {}; int vecidx = i; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index a92a92a52346..f55a89bd3736 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -922,6 +922,8 @@ static int mlx5_init_once(struct mlx5_core_dev *dev) dev->hv_vhca = mlx5_hv_vhca_create(dev); dev->rsc_dump = mlx5_rsc_dump_create(dev); + mlx5_devlink_res_register(dev); + return 0; err_sf_table_cleanup: @@ -957,6 +959,7 @@ static int mlx5_init_once(struct mlx5_core_dev *dev) static void mlx5_cleanup_once(struct mlx5_core_dev *dev) { + mlx5_devlink_res_unregister(dev); mlx5_rsc_dump_destroy(dev); mlx5_hv_vhca_destroy(dev->hv_vhca); mlx5_fw_tracer_destroy(dev->tracer); diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h index a623ec635947..d07359e98fd4 100644 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@ -781,10 +781,6 @@ struct mlx5_db { int index; }; -enum { - MLX5_COMP_EQ_SIZE = 1024, -}; - enum { MLX5_PTYS_IB = 1 << 0, MLX5_PTYS_EN = 1 << 2, diff --git a/include/net/devlink.h b/include/net/devlink.h index 043fcec8b0aa..ecc55ee526fa 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -364,6 +364,7 @@ typedef u64 devlink_resource_occ_get_t(void *priv); #define DEVLINK_RESOURCE_ID_PARENT_TOP 0 #define DEVLINK_RESOURCE_GENERIC_NAME_PORTS "physical_ports" +#define DEVLINK_RESOURCE_GENERIC_NAME_IO_EQ "io_eq_size" #define __DEVLINK_PARAM_MAX_STRING_VALUE 32 enum devlink_param_type { From patchwork Tue Nov 30 15:07: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: 12647569 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 9ABACC433F5 for ; Tue, 30 Nov 2021 15:10:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238773AbhK3POA (ORCPT ); Tue, 30 Nov 2021 10:14:00 -0500 Received: from mail-mw2nam12on2077.outbound.protection.outlook.com ([40.107.244.77]:20160 "EHLO NAM12-MW2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235496AbhK3PLk (ORCPT ); Tue, 30 Nov 2021 10:11:40 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1SjpmcIpLobvEJMgnpdvve1ZFwwL5p8kiljhObUHVV9JdPmLPbcWmBHHGWwcSpuQC3D1EeL1VFIYe9FlxW2xbvj65MLur1hDMDG5rF9SWW/ITAajZmpM0H+I/nfrOyiR2n5ymbMlcptc5kg7cvMcF7ply9Gq5dl8lqSpt0hIAXRuEUBMjUFbYnH8EOqoemrHUnO5v5BDVWU1y8NlK/jwCMEpNj0633elXTr7p9Qg8exEZm3+XbO3/x1ymsAYTuoJDTzOI33ynE1e+NEJ4T1MOazp+1BIBkeOqh75QrOO4N74qOH0YPi6zgXSd/0qEYqgY/n+2hC50ZJcOLEP1YMEg== 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=dY2fIAdYEjEvJGGZP4CUyphTqj4zdP+p9J8si413sKs=; b=QXKeXCHKe6sLz5M96Di3XDT/ugiYCyfComHzj/ZHcC0gdC3KDeSB6xENe5XlqI1kFUtd6225CRLpdFB2c8/iF2emEGtZUNp9J/6XLVwAd0BTVUw4Lsi416rBKBdjZjpQ5UTIK/wlIHw/kbLmwrvzhz//PBS0r5cQKfN4R+PxBlWOA7tLaEZMrffmhbXVOCyLO7ls5g5GFlx7EpgBPTHiYHuklmSEgEQ9YZxK3yCI8/mdyjVvyWXvUftzwQjD+sFnJiE6ZgYz3a2UBZgGJwCFpKkhrs/OlFrbuUr3PTVnhuMUpe6z8aRCzm1RQF9I3MCIDK46gO6L3VOcYtReMn6DoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.32) 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=dY2fIAdYEjEvJGGZP4CUyphTqj4zdP+p9J8si413sKs=; b=Kgj5HtrEEd1oGK1acudNG6wABIvI5pc5yuTfT09ueqt3yEXRzMxOENylxB+b3eeTQg7wFGI1SNtyz1JoJqLnA2ChJjWs7uSZdX4Ta0opHGLDrRcuAx7VOPIO+s3vloq72M1wbtXP3mdNnGhe4/2tJDETiEnhe3b2gwfwWc08aEDwI5oH6hUTZh/CpQMrn4rbikjpASaOXzwM0Rqyb4FwB0dyjWtVB1ish8hx6LJAKdsqIQqwhtEzb0ue1ZbByMSrG/mOD73KTuB5HrBkSXnQbqJ5wPSW2bTroufl+OT67IyranG9wcXAMIYV+TBquIMzUFRG15KRXmnTnj39kD64Xg== Received: from BN6PR14CA0014.namprd14.prod.outlook.com (2603:10b6:404:79::24) by MN2PR12MB3023.namprd12.prod.outlook.com (2603:10b6:208:c8::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22; Tue, 30 Nov 2021 15:08:17 +0000 Received: from BN8NAM11FT023.eop-nam11.prod.protection.outlook.com (2603:10b6:404:79:cafe::af) by BN6PR14CA0014.outlook.office365.com (2603:10b6:404:79::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.11 via Frontend Transport; Tue, 30 Nov 2021 15:08:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.32) 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 216.228.112.32 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.32; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.32) by BN8NAM11FT023.mail.protection.outlook.com (10.13.177.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Tue, 30 Nov 2021 15:08:14 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 30 Nov 2021 07:08:03 -0800 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.5; Tue, 30 Nov 2021 07:08:00 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next 2/4] net/mlx5: Let user configure event_eq_size resource Date: Tue, 30 Nov 2021 17:07:04 +0200 Message-ID: <20211130150705.19863-3-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211130150705.19863-1-shayd@nvidia.com> References: <20211130150705.19863-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: 237e76fb-53c9-493f-456d-08d9b4133bc3 X-MS-TrafficTypeDiagnostic: MN2PR12MB3023: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DhuKjrFt3THHK7jmh5miGtMA7pKJg+sHIswxbNaESk7gar4q/7E59kShJYxthERegA8LhFOyJcgc5QB6WNQVuYbn5D/TVamvXHdyN9/43IzFBiN/WnPql3nJtALLdj7P7WfaHcmL9gnfeLworVry5S+BnGzZ/+VIiMeMIJ0ZsyDTBI+Q6MizOoItEG5KLjYZa1kP0pbH6Zi6LLRrfzSM4LREyh6VRzDrFdZqmHqnIEqm6m+vNbIm7pn+LzuQL1umGLJcsyrSsOC7CGbM4/OZjewXqaQNLxfdeVKmhCOap1n73Wjyvuq9kEeD8GnYxWzsp1h9lYNt/aGHRNOazMxqAqoN92B/zHT+tBsmnrsXlfHinTBD1Sf7MV+36Vrvy1PXhYEslku91jexRtIaBCvhJWwVnL24BRtyULcb4F8bIQokyUSS9rASgjYTK5n3GawhtvYC+0tLtEY5Tx/MAsMTlXy7H3XzcC1mqk2Ozmp1P+n35ZwvxYJ5sx+HDR/v7WJVz27lpwNGT2/lrdfN7fgV3hWH2B9ltViuLxhTC388BUA7tU4nvaG71vYL+O7PoM3MKcGCRzOib7Cbg48zXVU/LHGQcNHAGP8DQ5HyR9v6xTg23NIJq/2A/KuQSa8m9D8HkdgCgOAEJzqs9jyzp/pKhK/A1sABz642mQJZ+jN9zL3gK8stfsbSYfdxZBL18XcPSAPXwUmgZELsT37fpa0SgsfQ4BtUQ3dk4BZcUcZFcr3KEtbKrJWqFKKaOML0ndph5R3DfNsr0L1f4c8MkxpOzg== X-Forefront-Antispam-Report: CIP:216.228.112.32;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid01.nvidia.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(40470700001)(40460700001)(36756003)(54906003)(70206006)(36860700001)(70586007)(8936002)(47076005)(107886003)(1076003)(110136005)(316002)(82310400004)(4326008)(2906002)(8676002)(5660300002)(186003)(16526019)(83380400001)(2616005)(86362001)(7636003)(336012)(26005)(356005)(508600001)(426003);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2021 15:08:14.7328 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 237e76fb-53c9-493f-456d-08d9b4133bc3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.32];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT023.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB3023 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 resource set pci/0000:00:0b.0 path /event_eq_size/ size 64 $ devlink dev reload pci/0000:00:0b.0 In addition, add it as a "Generic Resource" in order for different drivers to be aligned by the same resource name when exposing to user space. Signed-off-by: Shay Drory Reviewed-by: Jiri Pirko Reviewed-by: Moshe Shemesh --- .../networking/devlink/devlink-resource.rst | 2 ++ .../net/ethernet/mellanox/mlx5/core/devlink.h | 1 + .../ethernet/mellanox/mlx5/core/devlink_res.c | 26 ++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 +- include/linux/mlx5/eq.h | 1 - include/net/devlink.h | 1 + 6 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Documentation/networking/devlink/devlink-resource.rst b/Documentation/networking/devlink/devlink-resource.rst index d5df5e65d057..7c66ae6df2e6 100644 --- a/Documentation/networking/devlink/devlink-resource.rst +++ b/Documentation/networking/devlink/devlink-resource.rst @@ -38,6 +38,8 @@ device drivers and their description must be added to the following table: - A limited capacity of physical ports that the switch ASIC can support * - ``io_eq_size`` - Control the size of I/O completion EQs + * - ``event_eq_size`` + - Control the size of the asynchronous control events EQ example usage ------------- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink.h b/drivers/net/ethernet/mellanox/mlx5/core/devlink.h index 4192f23b1446..674415fd0b3a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.h @@ -8,6 +8,7 @@ enum mlx5_devlink_resource_id { MLX5_DL_RES_COMP_EQ = 1, + MLX5_DL_RES_ASYNC_EQ, __MLX5_ID_RES_MAX, MLX5_ID_RES_MAX = __MLX5_ID_RES_MAX - 1, diff --git a/drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c b/drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c index 2b7a956b7779..8cbe08577c05 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink_res.c @@ -7,6 +7,7 @@ enum { MLX5_EQ_MIN_SIZE = 64, MLX5_EQ_MAX_SIZE = 4096, + MLX5_NUM_ASYNC_EQE = 4096, MLX5_COMP_EQ_SIZE = 1024, }; @@ -22,13 +23,35 @@ static int comp_eq_res_register(struct mlx5_core_dev *dev) DEVLINK_RESOURCE_ID_PARENT_TOP, &comp_eq_size); } +static int async_eq_res_register(struct mlx5_core_dev *dev) +{ + struct devlink_resource_size_params async_eq_size; + struct devlink *devlink = priv_to_devlink(dev); + + devlink_resource_size_params_init(&async_eq_size, MLX5_EQ_MIN_SIZE, + MLX5_EQ_MAX_SIZE, 1, DEVLINK_RESOURCE_UNIT_ENTRY); + return devlink_resource_register(devlink, DEVLINK_RESOURCE_GENERIC_NAME_EVENT_EQ, + MLX5_NUM_ASYNC_EQE, MLX5_DL_RES_ASYNC_EQ, + DEVLINK_RESOURCE_ID_PARENT_TOP, + &async_eq_size); +} + void mlx5_devlink_res_register(struct mlx5_core_dev *dev) { int err; err = comp_eq_res_register(dev); if (err) - mlx5_core_err(dev, "Failed to register resources, err = %d\n", err); + goto err_msg; + + err = async_eq_res_register(dev); + if (err) + goto err; + return; +err: + devlink_resources_unregister(priv_to_devlink(dev), NULL); +err_msg: + mlx5_core_err(dev, "Failed to register resources, err = %d\n", err); } void mlx5_devlink_res_unregister(struct mlx5_core_dev *dev) @@ -38,6 +61,7 @@ void mlx5_devlink_res_unregister(struct mlx5_core_dev *dev) static const size_t default_vals[MLX5_ID_RES_MAX + 1] = { [MLX5_DL_RES_COMP_EQ] = MLX5_COMP_EQ_SIZE, + [MLX5_DL_RES_ASYNC_EQ] = MLX5_NUM_ASYNC_EQE, }; size_t mlx5_devlink_res_size(struct mlx5_core_dev *dev, enum mlx5_devlink_resource_id id) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eq.c b/drivers/net/ethernet/mellanox/mlx5/core/eq.c index 4dda6e2a4cbc..31e69067284b 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eq.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eq.c @@ -647,7 +647,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 = mlx5_devlink_res_size(dev, MLX5_DL_RES_ASYNC_EQ), }; gather_async_events_mask(dev, param.mask); diff --git a/include/linux/mlx5/eq.h b/include/linux/mlx5/eq.h index ea3ff5a8ced3..11161e427608 100644 --- a/include/linux/mlx5/eq.h +++ b/include/linux/mlx5/eq.h @@ -5,7 +5,6 @@ #define MLX5_CORE_EQ_H #define MLX5_NUM_CMD_EQE (32) -#define MLX5_NUM_ASYNC_EQE (0x1000) #define MLX5_NUM_SPARE_EQE (0x80) struct mlx5_eq; diff --git a/include/net/devlink.h b/include/net/devlink.h index ecc55ee526fa..43b6fdd9ffa5 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -365,6 +365,7 @@ typedef u64 devlink_resource_occ_get_t(void *priv); #define DEVLINK_RESOURCE_GENERIC_NAME_PORTS "physical_ports" #define DEVLINK_RESOURCE_GENERIC_NAME_IO_EQ "io_eq_size" +#define DEVLINK_RESOURCE_GENERIC_NAME_EVENT_EQ "event_eq_size" #define __DEVLINK_PARAM_MAX_STRING_VALUE 32 enum devlink_param_type { From patchwork Tue Nov 30 15:07:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12647567 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 B5ED3C433FE for ; Tue, 30 Nov 2021 15:10:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244333AbhK3PNu (ORCPT ); Tue, 30 Nov 2021 10:13:50 -0500 Received: from mail-dm3nam07on2089.outbound.protection.outlook.com ([40.107.95.89]:39597 "EHLO NAM02-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243997AbhK3PLj (ORCPT ); Tue, 30 Nov 2021 10:11:39 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YolYduKFTSwI+tDSQvXxxP1o7odRJZGBe0KmxO9SYGJ4gk7cuhp+L7fruRhDORYUpNcuV7/SkrPX0fUTR78K4qSQxN7HpZf7ZNzwXED8LhXdi+PaNYX3Kje2WuC7ikPqx4uNqHmFOvXN2j/NvB/y5p3yIrkAJ34Gp55PxfrNl3yWeRh3I4aoyewE5lylxAakAkR/ywRk16VdSETD6g6yU6SWZBp1ls//p3z7afK//Lhcwu996yNX661Jugd3Ix9c4JcnNpLVr9W8rnlxRkHJc+umcGvdBs3nrZy0bGtgpbS4UIYPgIPz7jQEkh2CVSurhErrFFM3zaM3m4UL2AI7Ng== 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=BpoOUZLd3MTzPgbNV5LbehRqVMatRcpN5zB0BRUribs=; b=lO05LnITJnW3YKZiJeHQSkj6vF9wxn2O4D73Uudhx0m/QHLiswVs1eHPUgM/PgKnyppuHhc2LZdWcwj7O0vZbuvk4Iym8IjH3FYSLFOhMcPVxmD7VsFg/w0wUq5W7sOSkSmpK/6IRYevdmlFGXArFJhzDyJ3WR48fBHrrkTZeI2mGco3pA34eG6ebIHsDPIXuKFCWUQkKaLZ8oRtKwXlqicIbHjI59B62P6QAUlIatPBNAdbmd2LYJaF35Wn3BSOl0k1Q0LdKLFjTLY14Ou1A51oHj3O/lGdG3Z8Y2Yd6uzGsE0ENZMqpyVGt9Xe5rufJfZ1Ho3xSrFB8bLNLNVQoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.32) 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=BpoOUZLd3MTzPgbNV5LbehRqVMatRcpN5zB0BRUribs=; b=ief7T/NaDgVzfAk3oPiXP+U005XnJOyQ0Afc1H26za0Sf1Te7/Dqy4RvDLG4JCtwkpDEybEMvGJ+Vyxej/y7e6k6FqHO5OtjCRmxWdstqq/XAZDkvsvOulMEOT8JzT82fDpBEB9saJ+pG4SPWneTvc6Y9+kc23bIGhLGZYgrjLWv/PZlSYyJpGv7dgMHmA0h7bayvAWpMaZEj0UHt336RXeLjp9xI7MhTTpZAAx1pEuU/A32RYQny1B0BSM/hpuIWhw1QZrqZPHAAx06yuUqGgl55kDovVwnFtx/+N66Y/SXnI4QzF2YjKII4M+tYpS/dTaLA/D/JXaSskzVU06MTA== Received: from BN6PR14CA0002.namprd14.prod.outlook.com (2603:10b6:404:79::12) by CY4PR12MB1559.namprd12.prod.outlook.com (2603:10b6:910:c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.22; Tue, 30 Nov 2021 15:08:18 +0000 Received: from BN8NAM11FT023.eop-nam11.prod.protection.outlook.com (2603:10b6:404:79:cafe::eb) by BN6PR14CA0002.outlook.office365.com (2603:10b6:404:79::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23 via Frontend Transport; Tue, 30 Nov 2021 15:08:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.32) 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 216.228.112.32 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.32; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.32) by BN8NAM11FT023.mail.protection.outlook.com (10.13.177.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Tue, 30 Nov 2021 15:08:17 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 30 Nov 2021 07:08:09 -0800 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.5; Tue, 30 Nov 2021 07:08:04 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh Subject: [PATCH net-next 3/4] devlink: Clarifies max_macs generic devlink param Date: Tue, 30 Nov 2021 17:07:05 +0200 Message-ID: <20211130150705.19863-4-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211130150705.19863-1-shayd@nvidia.com> References: <20211130150705.19863-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: c29e0567-37e6-411a-6b41-08d9b4133d80 X-MS-TrafficTypeDiagnostic: CY4PR12MB1559: 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: th1XSCkRbP71l+OLm9Xzb2yjL6S4xLQXTPz4pi/YGAKTr1WED7pAWcrDdN1/ifDXWfgb8sRdPGjM+ztYoJB3iQNqGZ/DaI7mHM2s9NMyLTluOnp2bpRY0yEeSgEhBOD9jq7LIVohjfwQcXmS+ThNHbkwBKdN/1GaEhWk5XgPlmdypHmO+dF02WgCP4N9UDtRlPySiFUggoenDYIhwM+CKcS0itzH87gH3km4VFbfJRbOAI9fPKxjy+lhlRFYOV5DTjLKSTgA9/kOQlEKlXIYH/tRCNuVcp6kOCNpGcOsFORm8T7vE8pf2tGkuKKWh5BhLn+Z/Tm7ryG+aIHjqRHfiC7RQNybVxUqc80kxEMEPExfGD1BL3x5Kl5V1vP64o6dTdNIjFe+3edIgmThp4erSMcbef/nyhnLxArxk18lm69WmO4WqQ55ownIf/1EDhSqnFs0vYngmXUKI+BBIAhnOJNIxpVHoW9nUHo1RrIyl9HSkduo2Ce5n/QNu310ZDsVbtFlsIS07wIarbdNMgFcNjablFaALo2uEjBHo/IQh6n0UZ2k7laItIGBm3j5zKZdRvbWysqdElCYiJBkPQAFGVQMWpFYkIFG3JFHmv49ZK47h1ZP+wh4uRpBvX5Y7sHoXsjKnPD8sfZFQkqLvWGTrE4v1MNqdRn0Rad7489WfvW3W4X1Tp5yOxt0ofhrqx/vvkakIpCLSQDRrMaNnZfWZbvyg4B6tpzs1t6pe9025VzEmJCTwzUgVil37hMUTzLi3CS2Cdc+Pk96BhAFOrhIPmhxR/okL0GwTkZ2D2CiPHE= X-Forefront-Antispam-Report: CIP:216.228.112.32;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid01.nvidia.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(40470700001)(107886003)(316002)(8676002)(16526019)(36756003)(2616005)(5660300002)(4326008)(86362001)(336012)(1076003)(82310400004)(186003)(40460700001)(70206006)(83380400001)(356005)(7636003)(2906002)(110136005)(54906003)(47076005)(508600001)(26005)(8936002)(426003)(70586007)(36860700001)(41533002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2021 15:08:17.7241 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c29e0567-37e6-411a-6b41-08d9b4133d80 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.32];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT023.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1559 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 b7dfe693a332..c2542dcf63c0 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 Tue Nov 30 15:07:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shay Drori X-Patchwork-Id: 12647573 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 A0A05C433EF for ; Tue, 30 Nov 2021 15:14:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232359AbhK3PRv (ORCPT ); Tue, 30 Nov 2021 10:17:51 -0500 Received: from mail-co1nam11on2078.outbound.protection.outlook.com ([40.107.220.78]:9857 "EHLO NAM11-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S243987AbhK3PLk (ORCPT ); Tue, 30 Nov 2021 10:11:40 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nKunJix2ARRQ0/lpAoDSPc9XxtFRuSvDKHeLKAvBj/hs4ruuW5G+FdjIsXHHG9YpGOYVBkHMM/UQVyQzkXd6CZyVM9c4x7B7/CRLRwCdIHuh189TtKdkrNk/qRXnXpHD1vgCj1Z8bZr8KIQEAAplVDHgYY5i/fEu08btajjheoizpwBUazLLx3IIoJb+6mGcN1Y11nnnaTGWtRpTMJnCopgmoY6W7ZRlE2g3+KT7kqEA9RkszJbl1tT7Ntr/eQNAY+MCzlkeZIVgn32D0KKNl7y03l2tSTa057I6ZrwVYNFkiaTezgxy8g+hEEwxJTHXaQCoUMB/43zRAakNOsB3Dw== 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=yisAUPwLX4kOwEXgCoZ5eU+ukSxjfZWo82ryTBROEVM=; b=jFMF0lARuGG0q3v+Fpd9MlVd2DCZ5pbSpW8OUngqWX78oY6A2GApOmJ7NfdFKVjan4yt3Pppgr7VK1nKQDYiKzcoGCkJuZ8JB2zpP/90fBfHrT8tpvwQSYAb/fYHpO0FTbktpUlF3UVjYXMT1+w7ubZV5DMwk0C6JVJJbLecBRJPIXqSdrO0wzOY12QaipttwjaYTH1Uc++kV/GDG2Ms9NV8ZgjJXWEXwUsfN43K0KNJvCdj2208YE7Rr+PduiYFEfCrBjlsM+kiHyi1soDf1SHX9RVKwRC4VFMk/7RHfWexgWW6L9sECdq32CM7AqLzrMP28twm81y18UisuZtyHQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) 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=yisAUPwLX4kOwEXgCoZ5eU+ukSxjfZWo82ryTBROEVM=; b=sIAhEc5VoruYx6yR3J9a9Drk2pveZdSZUKaAR0wAJnBNgmj/vgQ/RtZvHc4nhpnziYN1QVuCIo29jK2+vYvGNsao2eRHipJnYaGGky8lJ5PjzedAEBRkb3w0cnAkkYEA4kQ4t5Q4IcFBqTK9nSfYt6g0yH/t2F41DHEtl+lPSsTFU7f/O9BPhhhuNGgF3HxDBfztHsbfwXWUlb2C6weafkRxdsEH3oQbTiDJtIoMpr1X6p5s+pYb4kH/TOz+GslEp8L3Ixg3LdIsF33IYDjRZRBPxgWBKh+uMaYaKz8YlBeq6Tz1dF8CnMekXAWTEMrRErMIbguyoL6eL3CfGY/lng== Received: from BN9PR03CA0352.namprd03.prod.outlook.com (2603:10b6:408:f6::27) by BYAPR12MB3285.namprd12.prod.outlook.com (2603:10b6:a03:134::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Tue, 30 Nov 2021 15:08:16 +0000 Received: from BN8NAM11FT004.eop-nam11.prod.protection.outlook.com (2603:10b6:408:f6:cafe::da) by BN9PR03CA0352.outlook.office365.com (2603:10b6:408:f6::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23 via Frontend Transport; Tue, 30 Nov 2021 15:08:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) 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 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT004.mail.protection.outlook.com (10.13.176.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4734.22 via Frontend Transport; Tue, 30 Nov 2021 15:08:16 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 30 Nov 2021 15:08:12 +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.5; Tue, 30 Nov 2021 07:08:08 -0800 From: Shay Drory To: "David S . Miller" , Jakub Kicinski CC: , , , , Shay Drory , Moshe Shemesh , Parav Pandit Subject: [PATCH net-next 4/4] net/mlx5: Let user configure max_macs generic param Date: Tue, 30 Nov 2021 17:07:06 +0200 Message-ID: <20211130150705.19863-5-shayd@nvidia.com> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20211130150705.19863-1-shayd@nvidia.com> References: <20211130150705.19863-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: 88fa3d58-170e-4cdd-93d9-08d9b4133cb0 X-MS-TrafficTypeDiagnostic: BYAPR12MB3285: 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: TroBcrYoSgB24Nc4gC1zVz/YsQO3PL3oUHLZpNLsym/Kty0zjzLQ0lCiRZq0JiAfZxmBQV+ZHg0AoH1GFRxhyGasahHZO3woDr4aGtysgz2o3J1knC54+Nrt7SXn01FsZii17TfQBEDOq4WugpQ4AAErfheTdgN4fzjuIXCYV0VxRznR1f8TPDU30wfiVzaMG2si+Ln0U7WUxm9RSBnwxYe0qGR1XX2COjildGUB8fEN3RjpPF1Z5/WAg7lP9FC/ia0a3WFuwhZv+Ih2LhSj+AhtkkvSAN5VvTvJC/9uw/8DZYNttXh/owBjqIbUlZbUB9ZHvMxGehmEnsjdeJut8DM6JLPb+GD+ev07l6o8s4kU6O1XSw8EeN7zqibNzCOO+yVJ56D5dGXSko7uqqFgMGO5gjusfyHOn71JXeBCSk5qNV1tjBjBS/dolEv4n9jODE9HWEg2zgkrDLr3s8TLpxFTDD1GykzeEuHcGiVnwgWE5fmC53HVd5XaZSchdhCLSz9aUcGWDa/pGsmk38ganazLd8bqhvbgsYrBlKhMnWa5aLJNoc7bPueE54LlecqU4LaLVRd8/BAih7AXzIKh93qcCFO6nhbGp1QcTc1S7w0BEzdyk5q408NLJhWmOCP4nZQqZmk1678nZODr76tT+w1BF/tCVhmk3ajnUFVGXjZFo/3/8IktFgjL0R3mUTqH+NybSlZ5q7tXG1xsawiY6Yju6WVRB+PPXnWiSYgc9SMgXKIWUvvsIy2tSJ+gTA48X87YK4Ok99gSoXbZNfhP5l5YyWnyPh/TV+/cJO3QgRk= X-Forefront-Antispam-Report: CIP:216.228.112.34;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:schybrid03.nvidia.com;CAT:NONE;SFS:(4636009)(46966006)(36840700001)(40470700001)(36756003)(2906002)(70206006)(110136005)(4326008)(36860700001)(47076005)(7636003)(316002)(83380400001)(40460700001)(8936002)(16526019)(186003)(8676002)(107886003)(508600001)(82310400004)(5660300002)(54906003)(426003)(336012)(2616005)(70586007)(26005)(86362001)(356005)(1076003)(41533002);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Nov 2021 15:08:16.3580 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88fa3d58-170e-4cdd-93d9-08d9b4133cb0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.112.34];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT004.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3285 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 | 4 ++ .../net/ethernet/mellanox/mlx5/core/devlink.c | 67 +++++++++++++++++++ .../net/ethernet/mellanox/mlx5/core/main.c | 18 +++++ include/linux/mlx5/mlx5_ifc.h | 2 +- 4 files changed, 90 insertions(+), 1 deletion(-) diff --git a/Documentation/networking/devlink/mlx5.rst b/Documentation/networking/devlink/mlx5.rst index 4e4b97f7971a..c44043bcae72 100644 --- a/Documentation/networking/devlink/mlx5.rst +++ b/Documentation/networking/devlink/mlx5.rst @@ -14,8 +14,12 @@ Parameters * - Name - Mode + - Validation * - ``enable_roce`` - driverinit + * - ``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 1c98652b244a..7383b727f49e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c @@ -752,6 +752,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(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, \ @@ -815,11 +875,17 @@ int mlx5_devlink_register(struct devlink *devlink) if (err) goto traps_reg_err; + err = mlx5_devlink_max_uc_list_param_register(devlink); + if (err) + goto uc_list_reg_err; + if (!mlx5_core_is_mp_slave(dev)) devlink_set_features(devlink, DEVLINK_F_RELOAD); return 0; +uc_list_reg_err: + mlx5_devlink_traps_unregister(devlink); traps_reg_err: mlx5_devlink_auxdev_params_unregister(devlink); auxdev_reg_err: @@ -830,6 +896,7 @@ int mlx5_devlink_register(struct devlink *devlink) void mlx5_devlink_unregister(struct devlink *devlink) { + mlx5_devlink_max_uc_list_param_unregister(devlink); mlx5_devlink_traps_unregister(devlink); mlx5_devlink_auxdev_params_unregister(devlink); devlink_params_unregister(devlink, mlx5_devlink_params, diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c index f55a89bd3736..a6819575854f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c @@ -484,10 +484,23 @@ 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); + return err ? err : val.vu32; +} + 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 +574,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 3636df90899a..d3899fc33fd7 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];