Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/2]  devlink: add generic max_sfs parameter and mlx5 support
@ 2026-05-17 11:26 Tariq Toukan
  2026-05-17 11:26 ` [PATCH net-next 1/2] devlink: add generic device max_sfs parameter Tariq Toukan
  2026-05-17 11:27 ` [PATCH net-next 2/2] net/mlx5: implement " Tariq Toukan
  0 siblings, 2 replies; 6+ messages in thread
From: Tariq Toukan @ 2026-05-17 11:26 UTC (permalink / raw)
  To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller
  Cc: Jiri Pirko, Simon Horman, Jonathan Corbet, Shuah Khan,
	Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
	Vlad Dumitrescu, Aleksandr Loktionov, Daniel Zahka, David Ahern,
	Nikolay Aleksandrov, netdev, linux-doc, linux-kernel, linux-rdma,
	Gal Pressman, Dragos Tatulea, Jiri Pirko

Hi,

This series by Nikolay introduces a new generic devlink device
parameter, max_sfs, to control the number of light-weight NIC
subfunctions (SFs) that can be created on a device.

The first patch adds the generic devlink parameter and infrastructure
support.
The second patch implements support for the parameter in the mlx5
driver.

With this addition, users can enable or disable SF creation directly via
devlink, without relying on external vendor-specific tools.

Regards,
Tariq

Nikolay Aleksandrov (2):
  devlink: add generic device max_sfs parameter
  net/mlx5: implement max_sfs parameter

 .../networking/devlink/devlink-params.rst     |  6 ++
 Documentation/networking/devlink/mlx5.rst     |  7 +-
 .../mellanox/mlx5/core/lib/nv_param.c         | 83 ++++++++++++++++++-
 include/net/devlink.h                         |  4 +
 net/devlink/param.c                           |  5 ++
 5 files changed, 101 insertions(+), 4 deletions(-)


base-commit: 627ac78f2741e2ebd2225e2e953b6964a8a9182f
-- 
2.44.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH net-next 1/2] devlink: add generic device max_sfs parameter
  2026-05-17 11:26 [PATCH net-next 0/2] devlink: add generic max_sfs parameter and mlx5 support Tariq Toukan
@ 2026-05-17 11:26 ` Tariq Toukan
  2026-05-18  8:57   ` Loktionov, Aleksandr
  2026-05-17 11:27 ` [PATCH net-next 2/2] net/mlx5: implement " Tariq Toukan
  1 sibling, 1 reply; 6+ messages in thread
From: Tariq Toukan @ 2026-05-17 11:26 UTC (permalink / raw)
  To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller
  Cc: Jiri Pirko, Simon Horman, Jonathan Corbet, Shuah Khan,
	Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
	Vlad Dumitrescu, Aleksandr Loktionov, Daniel Zahka, David Ahern,
	Nikolay Aleksandrov, netdev, linux-doc, linux-kernel, linux-rdma,
	Gal Pressman, Dragos Tatulea, Jiri Pirko, Nikolay Aleksandrov

From: Nikolay Aleksandrov <nikolay@nvidia.com>

Add a new generic devlink device parameter (max_sfs) to control if and
how many light-weight NIC subfunctions can be created. Subfunctions are
a light-weight network functions backed by an underlying PCI function.
Their lifecycle can already be managed by devlink, but currently users
cannot enable them in the device. They can be enabled/disabled only via
external vendor tools. This parameter allows subfunctions to be enabled
(>0) or disabled (0) via devlink. A subsequent patch will add support
for max_sfs to the mlx5 driver.

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 Documentation/networking/devlink/devlink-params.rst | 6 ++++++
 include/net/devlink.h                               | 4 ++++
 net/devlink/param.c                                 | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst
index ea17756dcda6..29b8a9246fb6 100644
--- a/Documentation/networking/devlink/devlink-params.rst
+++ b/Documentation/networking/devlink/devlink-params.rst
@@ -165,3 +165,9 @@ own name.
      - u32
      - Controls the maximum number of MAC address filters that can be assigned
        to a Virtual Function (VF).
+   * - ``max_sfs``
+     - u32
+     - The maximum number of subfunctions which can be created on the device.
+       Modifying this parameter may require a device restart and PCI bus
+       rescanning because the BAR layout may change. A value of 0 disables
+       subfunction creation.
diff --git a/include/net/devlink.h b/include/net/devlink.h
index bcd31de1f890..4ec455cfe7a4 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -546,6 +546,7 @@ enum devlink_param_generic_id {
 	DEVLINK_PARAM_GENERIC_ID_TOTAL_VFS,
 	DEVLINK_PARAM_GENERIC_ID_NUM_DOORBELLS,
 	DEVLINK_PARAM_GENERIC_ID_MAX_MAC_PER_VF,
+	DEVLINK_PARAM_GENERIC_ID_MAX_SFS,
 
 	/* add new param generic ids above here*/
 	__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -619,6 +620,9 @@ enum devlink_param_generic_id {
 #define DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_NAME "max_mac_per_vf"
 #define DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_TYPE DEVLINK_PARAM_TYPE_U32
 
+#define DEVLINK_PARAM_GENERIC_MAX_SFS_NAME "max_sfs"
+#define DEVLINK_PARAM_GENERIC_MAX_SFS_TYPE DEVLINK_PARAM_TYPE_U32
+
 #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate)	\
 {									\
 	.id = DEVLINK_PARAM_GENERIC_ID_##_id,				\
diff --git a/net/devlink/param.c b/net/devlink/param.c
index cf95268da5b0..523243e49d88 100644
--- a/net/devlink/param.c
+++ b/net/devlink/param.c
@@ -117,6 +117,11 @@ static const struct devlink_param devlink_param_generic[] = {
 		.name = DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_NAME,
 		.type = DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_TYPE,
 	},
+	{
+		.id = DEVLINK_PARAM_GENERIC_ID_MAX_SFS,
+		.name = DEVLINK_PARAM_GENERIC_MAX_SFS_NAME,
+		.type = DEVLINK_PARAM_GENERIC_MAX_SFS_TYPE,
+	},
 };
 
 static int devlink_param_generic_verify(const struct devlink_param *param)
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next 2/2] net/mlx5: implement max_sfs parameter
  2026-05-17 11:26 [PATCH net-next 0/2] devlink: add generic max_sfs parameter and mlx5 support Tariq Toukan
  2026-05-17 11:26 ` [PATCH net-next 1/2] devlink: add generic device max_sfs parameter Tariq Toukan
@ 2026-05-17 11:27 ` Tariq Toukan
  2026-05-18  9:05   ` Loktionov, Aleksandr
  1 sibling, 1 reply; 6+ messages in thread
From: Tariq Toukan @ 2026-05-17 11:27 UTC (permalink / raw)
  To: Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn,
	David S. Miller
  Cc: Jiri Pirko, Simon Horman, Jonathan Corbet, Shuah Khan,
	Saeed Mahameed, Leon Romanovsky, Tariq Toukan, Mark Bloch,
	Vlad Dumitrescu, Aleksandr Loktionov, Daniel Zahka, David Ahern,
	Nikolay Aleksandrov, netdev, linux-doc, linux-kernel, linux-rdma,
	Gal Pressman, Dragos Tatulea, Jiri Pirko, Nikolay Aleksandrov

From: Nikolay Aleksandrov <nikolay@nvidia.com>

Implement max_sfs generic parameter to allow users to control the total
light-weight NIC subfunctions that can be created using devlink instead
of external vendor tools. A value of 0 will effectively disable creation
of new subfunction devices. A warning is sent to user-space via extack
(returning extack without error code is interpreted as a warning by
user-space tools).

Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 Documentation/networking/devlink/mlx5.rst     |  7 +-
 .../mellanox/mlx5/core/lib/nv_param.c         | 83 ++++++++++++++++++-
 2 files changed, 86 insertions(+), 4 deletions(-)

diff --git a/Documentation/networking/devlink/mlx5.rst b/Documentation/networking/devlink/mlx5.rst
index 4bba4d780a4a..283b93d16861 100644
--- a/Documentation/networking/devlink/mlx5.rst
+++ b/Documentation/networking/devlink/mlx5.rst
@@ -45,8 +45,13 @@ Parameters
      - The range is between 1 and a device-specific max.
      - Applies to each physical function (PF) independently, if the device
        supports it. Otherwise, it applies symmetrically to all PFs.
+   * - ``max_sfs``
+     - permanent
+     - The range is between 0 and a device-specific max.
+     - Applies to each physical function (PF) independently.
 
-Note: permanent parameters such as ``enable_sriov`` and ``total_vfs`` require FW reset to take effect
+Note: permanent parameters such as ``enable_sriov``, ``total_vfs` and ``max_sfs``
+      require FW reset to take effect
 
 .. code-block:: bash
 
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c
index 19bb620b7436..eff3a67e4ca0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c
@@ -68,7 +68,9 @@ struct mlx5_ifc_mnvda_reg_bits {
 
 struct mlx5_ifc_nv_global_pci_conf_bits {
 	u8         sriov_valid[0x1];
-	u8         reserved_at_1[0x10];
+	u8         reserved_at_1[0xa];
+	u8         per_pf_num_sf[0x1];
+	u8         reserved_at_c[0x5];
 	u8         per_pf_total_vf[0x1];
 	u8         reserved_at_12[0xe];
 
@@ -93,9 +95,11 @@ struct mlx5_ifc_nv_global_pci_cap_bits {
 };
 
 struct mlx5_ifc_nv_pf_pci_conf_bits {
-	u8         reserved_at_0[0x9];
+	u8         log_sf_bar_size[0x8];
+	u8         pf_total_sf_en[0x1];
 	u8         pf_total_vf_en[0x1];
-	u8         reserved_at_a[0x16];
+	u8         reserved_at_a[0x6];
+	u8         total_sf[0x10];
 
 	u8         reserved_at_20[0x20];
 
@@ -755,6 +759,76 @@ static int mlx5_devlink_total_vfs_validate(struct devlink *devlink, u32 id,
 	return 0;
 }
 
+static int mlx5_devlink_max_sfs_get(struct devlink *devlink, u32 id,
+				    struct devlink_param_gset_ctx *ctx,
+				    struct netlink_ext_ack *extack)
+{
+	struct mlx5_core_dev *dev = devlink_priv(devlink);
+	u32 mnvda[MLX5_ST_SZ_DW(mnvda_reg)] = {};
+	void *data;
+	int err;
+
+	err = mlx5_nv_param_read_per_host_pf_conf(dev, mnvda, sizeof(mnvda));
+	if (err) {
+		NL_SET_ERR_MSG_MOD(extack, "Failed to read PF configuration");
+		return err;
+	}
+
+	data = MLX5_ADDR_OF(mnvda_reg, mnvda, configuration_item_data);
+	ctx->val.vu32 = MLX5_GET(nv_pf_pci_conf, data, total_sf);
+
+	return 0;
+}
+
+static int mlx5_devlink_max_sfs_set(struct devlink *devlink, u32 id,
+				    struct devlink_param_gset_ctx *ctx,
+				    struct netlink_ext_ack *extack)
+{
+	struct mlx5_core_dev *dev = devlink_priv(devlink);
+	u32 mnvda[MLX5_ST_SZ_DW(mnvda_reg)] = {};
+	void *data;
+	int err;
+
+	err = mlx5_nv_param_read_global_pci_conf(dev, mnvda, sizeof(mnvda));
+	if (err) {
+		NL_SET_ERR_MSG_MOD(extack,
+				   "Failed to read global PCI configuration");
+		return err;
+	}
+
+	data = MLX5_ADDR_OF(mnvda_reg, mnvda, configuration_item_data);
+	MLX5_SET(nv_global_pci_conf, data, per_pf_num_sf, !!ctx->val.vu32);
+
+	err = mlx5_nv_param_write(dev, mnvda, sizeof(mnvda));
+	if (err) {
+		NL_SET_ERR_MSG_MOD(extack,
+				   "Failed to change per_pf_num_sf global PCI configuration");
+		return err;
+	}
+
+	memset(mnvda, 0, sizeof(mnvda));
+	err = mlx5_nv_param_read_per_host_pf_conf(dev, mnvda, sizeof(mnvda));
+	if (err) {
+		NL_SET_ERR_MSG_MOD(extack, "Failed to read PF configuration");
+		return err;
+	}
+
+	data = MLX5_ADDR_OF(mnvda_reg, mnvda, configuration_item_data);
+	MLX5_SET(nv_pf_pci_conf, data, log_sf_bar_size, ctx->val.vu32 ? 12 : 0);
+	MLX5_SET(nv_pf_pci_conf, data, pf_total_sf_en, !!ctx->val.vu32);
+	MLX5_SET(nv_pf_pci_conf, data, total_sf, ctx->val.vu32);
+
+	err = mlx5_nv_param_write(dev, mnvda, sizeof(mnvda));
+	if (err) {
+		NL_SET_ERR_MSG_MOD(extack,
+				   "Failed to change PF PCI configuration");
+		return err;
+	}
+	NL_SET_ERR_MSG(extack, "Modifying max_sfs requires a reboot");
+
+	return 0;
+}
+
 static const struct devlink_param mlx5_nv_param_devlink_params[] = {
 	DEVLINK_PARAM_GENERIC(ENABLE_SRIOV, BIT(DEVLINK_PARAM_CMODE_PERMANENT),
 			      mlx5_devlink_enable_sriov_get,
@@ -763,6 +837,9 @@ static const struct devlink_param mlx5_nv_param_devlink_params[] = {
 			      mlx5_devlink_total_vfs_get,
 			      mlx5_devlink_total_vfs_set,
 			      mlx5_devlink_total_vfs_validate),
+	DEVLINK_PARAM_GENERIC(MAX_SFS, BIT(DEVLINK_PARAM_CMODE_PERMANENT),
+			      mlx5_devlink_max_sfs_get,
+			      mlx5_devlink_max_sfs_set, NULL),
 	DEVLINK_PARAM_DRIVER(MLX5_DEVLINK_PARAM_ID_CQE_COMPRESSION_TYPE,
 			     "cqe_compress_type", DEVLINK_PARAM_TYPE_STRING,
 			     BIT(DEVLINK_PARAM_CMODE_PERMANENT),
-- 
2.44.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* RE: [PATCH net-next 1/2] devlink: add generic device max_sfs parameter
  2026-05-17 11:26 ` [PATCH net-next 1/2] devlink: add generic device max_sfs parameter Tariq Toukan
@ 2026-05-18  8:57   ` Loktionov, Aleksandr
  0 siblings, 0 replies; 6+ messages in thread
From: Loktionov, Aleksandr @ 2026-05-18  8:57 UTC (permalink / raw)
  To: Tariq Toukan, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, David S. Miller
  Cc: Jiri Pirko, Simon Horman, Jonathan Corbet, Shuah Khan,
	Saeed Mahameed, Leon Romanovsky, Mark Bloch, Vlad Dumitrescu,
	Daniel Zahka, David Ahern, Nikolay Aleksandrov,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	Gal Pressman, Dragos Tatulea, Jiri Pirko, Nikolay Aleksandrov



> -----Original Message-----
> From: Tariq Toukan <tariqt@nvidia.com>
> Sent: Sunday, May 17, 2026 1:27 PM
> To: Eric Dumazet <edumazet@google.com>; Jakub Kicinski
> <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Andrew Lunn
> <andrew+netdev@lunn.ch>; David S. Miller <davem@davemloft.net>
> Cc: Jiri Pirko <jiri@resnulli.us>; Simon Horman <horms@kernel.org>;
> Jonathan Corbet <corbet@lwn.net>; Shuah Khan
> <skhan@linuxfoundation.org>; Saeed Mahameed <saeedm@nvidia.com>; Leon
> Romanovsky <leon@kernel.org>; Tariq Toukan <tariqt@nvidia.com>; Mark
> Bloch <mbloch@nvidia.com>; Vlad Dumitrescu <vdumitrescu@nvidia.com>;
> Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; Daniel Zahka
> <daniel.zahka@gmail.com>; David Ahern <dsahern@kernel.org>; Nikolay
> Aleksandrov <razor@blackwall.org>; netdev@vger.kernel.org; linux-
> doc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rdma@vger.kernel.org; Gal Pressman <gal@nvidia.com>; Dragos Tatulea
> <dtatulea@nvidia.com>; Jiri Pirko <jiri@nvidia.com>; Nikolay
> Aleksandrov <nikolay@nvidia.com>
> Subject: [PATCH net-next 1/2] devlink: add generic device max_sfs
> parameter
> 
> From: Nikolay Aleksandrov <nikolay@nvidia.com>
> 
> Add a new generic devlink device parameter (max_sfs) to control if and
> how many light-weight NIC subfunctions can be created. Subfunctions
> are a light-weight network functions backed by an underlying PCI
> function.
> Their lifecycle can already be managed by devlink, but currently users
> cannot enable them in the device. They can be enabled/disabled only
> via external vendor tools. This parameter allows subfunctions to be
> enabled
> (>0) or disabled (0) via devlink. A subsequent patch will add support
> for max_sfs to the mlx5 driver.
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
> Reviewed-by: David Ahern <dsahern@kernel.org>
> Reviewed-by: Jiri Pirko <jiri@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  Documentation/networking/devlink/devlink-params.rst | 6 ++++++
>  include/net/devlink.h                               | 4 ++++
>  net/devlink/param.c                                 | 5 +++++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/Documentation/networking/devlink/devlink-params.rst
> b/Documentation/networking/devlink/devlink-params.rst
> index ea17756dcda6..29b8a9246fb6 100644
> --- a/Documentation/networking/devlink/devlink-params.rst
> +++ b/Documentation/networking/devlink/devlink-params.rst
> @@ -165,3 +165,9 @@ own name.
>       - u32
>       - Controls the maximum number of MAC address filters that can be
> assigned
>         to a Virtual Function (VF).
> +   * - ``max_sfs``
> +     - u32
> +     - The maximum number of subfunctions which can be created on the
> device.
> +       Modifying this parameter may require a device restart and PCI
> bus
> +       rescanning because the BAR layout may change. A value of 0
> disables
> +       subfunction creation.
> diff --git a/include/net/devlink.h b/include/net/devlink.h index
> bcd31de1f890..4ec455cfe7a4 100644
> --- a/include/net/devlink.h
> +++ b/include/net/devlink.h
> @@ -546,6 +546,7 @@ enum devlink_param_generic_id {
>  	DEVLINK_PARAM_GENERIC_ID_TOTAL_VFS,
>  	DEVLINK_PARAM_GENERIC_ID_NUM_DOORBELLS,
>  	DEVLINK_PARAM_GENERIC_ID_MAX_MAC_PER_VF,
> +	DEVLINK_PARAM_GENERIC_ID_MAX_SFS,
> 
>  	/* add new param generic ids above here*/
>  	__DEVLINK_PARAM_GENERIC_ID_MAX,
> @@ -619,6 +620,9 @@ enum devlink_param_generic_id {  #define
> DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_NAME "max_mac_per_vf"
>  #define DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_TYPE
> DEVLINK_PARAM_TYPE_U32
> 
> +#define DEVLINK_PARAM_GENERIC_MAX_SFS_NAME "max_sfs"
> +#define DEVLINK_PARAM_GENERIC_MAX_SFS_TYPE DEVLINK_PARAM_TYPE_U32
> +
>  #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate)	\
>  {									\
>  	.id = DEVLINK_PARAM_GENERIC_ID_##_id,				\
> diff --git a/net/devlink/param.c b/net/devlink/param.c index
> cf95268da5b0..523243e49d88 100644
> --- a/net/devlink/param.c
> +++ b/net/devlink/param.c
> @@ -117,6 +117,11 @@ static const struct devlink_param
> devlink_param_generic[] = {
>  		.name = DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_NAME,
>  		.type = DEVLINK_PARAM_GENERIC_MAX_MAC_PER_VF_TYPE,
>  	},
> +	{
> +		.id = DEVLINK_PARAM_GENERIC_ID_MAX_SFS,
> +		.name = DEVLINK_PARAM_GENERIC_MAX_SFS_NAME,
> +		.type = DEVLINK_PARAM_GENERIC_MAX_SFS_TYPE,
> +	},
>  };
> 
>  static int devlink_param_generic_verify(const struct devlink_param
> *param)
> --
> 2.44.0


Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [PATCH net-next 2/2] net/mlx5: implement max_sfs parameter
  2026-05-17 11:27 ` [PATCH net-next 2/2] net/mlx5: implement " Tariq Toukan
@ 2026-05-18  9:05   ` Loktionov, Aleksandr
  2026-05-18 10:37     ` Nikolay Aleksandrov
  0 siblings, 1 reply; 6+ messages in thread
From: Loktionov, Aleksandr @ 2026-05-18  9:05 UTC (permalink / raw)
  To: Tariq Toukan, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, David S. Miller
  Cc: Jiri Pirko, Simon Horman, Jonathan Corbet, Shuah Khan,
	Saeed Mahameed, Leon Romanovsky, Mark Bloch, Vlad Dumitrescu,
	Daniel Zahka, David Ahern, Nikolay Aleksandrov,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	Gal Pressman, Dragos Tatulea, Jiri Pirko, Nikolay Aleksandrov



> -----Original Message-----
> From: Tariq Toukan <tariqt@nvidia.com>
> Sent: Sunday, May 17, 2026 1:27 PM
> To: Eric Dumazet <edumazet@google.com>; Jakub Kicinski
> <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Andrew Lunn
> <andrew+netdev@lunn.ch>; David S. Miller <davem@davemloft.net>
> Cc: Jiri Pirko <jiri@resnulli.us>; Simon Horman <horms@kernel.org>;
> Jonathan Corbet <corbet@lwn.net>; Shuah Khan
> <skhan@linuxfoundation.org>; Saeed Mahameed <saeedm@nvidia.com>; Leon
> Romanovsky <leon@kernel.org>; Tariq Toukan <tariqt@nvidia.com>; Mark
> Bloch <mbloch@nvidia.com>; Vlad Dumitrescu <vdumitrescu@nvidia.com>;
> Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; Daniel Zahka
> <daniel.zahka@gmail.com>; David Ahern <dsahern@kernel.org>; Nikolay
> Aleksandrov <razor@blackwall.org>; netdev@vger.kernel.org; linux-
> doc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> rdma@vger.kernel.org; Gal Pressman <gal@nvidia.com>; Dragos Tatulea
> <dtatulea@nvidia.com>; Jiri Pirko <jiri@nvidia.com>; Nikolay
> Aleksandrov <nikolay@nvidia.com>
> Subject: [PATCH net-next 2/2] net/mlx5: implement max_sfs parameter
> 
> From: Nikolay Aleksandrov <nikolay@nvidia.com>
> 
> Implement max_sfs generic parameter to allow users to control the
> total light-weight NIC subfunctions that can be created using devlink
> instead of external vendor tools. A value of 0 will effectively
> disable creation of new subfunction devices. A warning is sent to
> user-space via extack (returning extack without error code is
> interpreted as a warning by user-space tools).
> 
> Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
> Reviewed-by: David Ahern <dsahern@kernel.org>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
>  Documentation/networking/devlink/mlx5.rst     |  7 +-
>  .../mellanox/mlx5/core/lib/nv_param.c         | 83
> ++++++++++++++++++-
>  2 files changed, 86 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/networking/devlink/mlx5.rst
> b/Documentation/networking/devlink/mlx5.rst
> index 4bba4d780a4a..283b93d16861 100644
> --- a/Documentation/networking/devlink/mlx5.rst
> +++ b/Documentation/networking/devlink/mlx5.rst
> @@ -45,8 +45,13 @@ Parameters
>       - The range is between 1 and a device-specific max.
>       - Applies to each physical function (PF) independently, if the
> device
>         supports it. Otherwise, it applies symmetrically to all PFs.
> +   * - ``max_sfs``
> +     - permanent
> +     - The range is between 0 and a device-specific max.
> +     - Applies to each physical function (PF) independently.
> 
> -Note: permanent parameters such as ``enable_sriov`` and ``total_vfs``
> require FW reset to take effect
> +Note: permanent parameters such as ``enable_sriov``, ``total_vfs` and
> ``max_sfs``
I think one ` is missed after the ``total_vfs` ?


...

> 
> 	DEVLINK_PARAM_DRIVER(MLX5_DEVLINK_PARAM_ID_CQE_COMPRESSION_TYPE
> ,
>  			     "cqe_compress_type",
> DEVLINK_PARAM_TYPE_STRING,
>  			     BIT(DEVLINK_PARAM_CMODE_PERMANENT),
> --
> 2.44.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next 2/2] net/mlx5: implement max_sfs parameter
  2026-05-18  9:05   ` Loktionov, Aleksandr
@ 2026-05-18 10:37     ` Nikolay Aleksandrov
  0 siblings, 0 replies; 6+ messages in thread
From: Nikolay Aleksandrov @ 2026-05-18 10:37 UTC (permalink / raw)
  To: Loktionov, Aleksandr
  Cc: Tariq Toukan, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Andrew Lunn, David S. Miller, Jiri Pirko, Simon Horman,
	Jonathan Corbet, Shuah Khan, Saeed Mahameed, Leon Romanovsky,
	Mark Bloch, Vlad Dumitrescu, Daniel Zahka, David Ahern,
	netdev@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	Gal Pressman, Dragos Tatulea, Jiri Pirko

On Mon, May 18, 2026 at 09:05:52AM +0000, Loktionov, Aleksandr wrote:
> 
> 
> > -----Original Message-----
> > From: Tariq Toukan <tariqt@nvidia.com>
> > Sent: Sunday, May 17, 2026 1:27 PM
> > To: Eric Dumazet <edumazet@google.com>; Jakub Kicinski
> > <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; Andrew Lunn
> > <andrew+netdev@lunn.ch>; David S. Miller <davem@davemloft.net>
> > Cc: Jiri Pirko <jiri@resnulli.us>; Simon Horman <horms@kernel.org>;
> > Jonathan Corbet <corbet@lwn.net>; Shuah Khan
> > <skhan@linuxfoundation.org>; Saeed Mahameed <saeedm@nvidia.com>; Leon
> > Romanovsky <leon@kernel.org>; Tariq Toukan <tariqt@nvidia.com>; Mark
> > Bloch <mbloch@nvidia.com>; Vlad Dumitrescu <vdumitrescu@nvidia.com>;
> > Loktionov, Aleksandr <aleksandr.loktionov@intel.com>; Daniel Zahka
> > <daniel.zahka@gmail.com>; David Ahern <dsahern@kernel.org>; Nikolay
> > Aleksandrov <razor@blackwall.org>; netdev@vger.kernel.org; linux-
> > doc@vger.kernel.org; linux-kernel@vger.kernel.org; linux-
> > rdma@vger.kernel.org; Gal Pressman <gal@nvidia.com>; Dragos Tatulea
> > <dtatulea@nvidia.com>; Jiri Pirko <jiri@nvidia.com>; Nikolay
> > Aleksandrov <nikolay@nvidia.com>
> > Subject: [PATCH net-next 2/2] net/mlx5: implement max_sfs parameter
> > 
> > From: Nikolay Aleksandrov <nikolay@nvidia.com>
> > 
> > Implement max_sfs generic parameter to allow users to control the
> > total light-weight NIC subfunctions that can be created using devlink
> > instead of external vendor tools. A value of 0 will effectively
> > disable creation of new subfunction devices. A warning is sent to
> > user-space via extack (returning extack without error code is
> > interpreted as a warning by user-space tools).
> > 
> > Signed-off-by: Nikolay Aleksandrov <nikolay@nvidia.com>
> > Reviewed-by: David Ahern <dsahern@kernel.org>
> > Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> > ---
> >  Documentation/networking/devlink/mlx5.rst     |  7 +-
> >  .../mellanox/mlx5/core/lib/nv_param.c         | 83
> > ++++++++++++++++++-
> >  2 files changed, 86 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/networking/devlink/mlx5.rst
> > b/Documentation/networking/devlink/mlx5.rst
> > index 4bba4d780a4a..283b93d16861 100644
> > --- a/Documentation/networking/devlink/mlx5.rst
> > +++ b/Documentation/networking/devlink/mlx5.rst
> > @@ -45,8 +45,13 @@ Parameters
> >       - The range is between 1 and a device-specific max.
> >       - Applies to each physical function (PF) independently, if the
> > device
> >         supports it. Otherwise, it applies symmetrically to all PFs.
> > +   * - ``max_sfs``
> > +     - permanent
> > +     - The range is between 0 and a device-specific max.
> > +     - Applies to each physical function (PF) independently.
> > 
> > -Note: permanent parameters such as ``enable_sriov`` and ``total_vfs``
> > require FW reset to take effect
> > +Note: permanent parameters such as ``enable_sriov``, ``total_vfs` and
> > ``max_sfs``
> I think one ` is missed after the ``total_vfs` ?
> 
> 
> ...
> 

ha, good catch! there's a missing ` indeed :)

> > 
> > 	DEVLINK_PARAM_DRIVER(MLX5_DEVLINK_PARAM_ID_CQE_COMPRESSION_TYPE
> > ,
> >  			     "cqe_compress_type",
> > DEVLINK_PARAM_TYPE_STRING,
> >  			     BIT(DEVLINK_PARAM_CMODE_PERMANENT),
> > --
> > 2.44.0
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-05-18 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-17 11:26 [PATCH net-next 0/2] devlink: add generic max_sfs parameter and mlx5 support Tariq Toukan
2026-05-17 11:26 ` [PATCH net-next 1/2] devlink: add generic device max_sfs parameter Tariq Toukan
2026-05-18  8:57   ` Loktionov, Aleksandr
2026-05-17 11:27 ` [PATCH net-next 2/2] net/mlx5: implement " Tariq Toukan
2026-05-18  9:05   ` Loktionov, Aleksandr
2026-05-18 10:37     ` Nikolay Aleksandrov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox