netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next V6 00/13] devlink, mlx5: Add new parameters for link management and SRIOV/eSwitch configurations
@ 2025-07-09  3:04 Saeed Mahameed
  2025-07-09  3:04 ` [PATCH net-next V6 01/13] devlink: Add 'total_vfs' generic device param Saeed Mahameed
                   ` (12 more replies)
  0 siblings, 13 replies; 48+ messages in thread
From: Saeed Mahameed @ 2025-07-09  3:04 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Paolo Abeni, Eric Dumazet
  Cc: Saeed Mahameed, netdev, Tariq Toukan, Gal Pressman,
	Leon Romanovsky, Jiri Pirko, Simon Horman

From: Saeed Mahameed <saeedm@nvidia.com>

This patch series introduces several devlink parameters improving device
configuration capabilities, link management, and SRIOV/eSwitch, by adding
NV config boot time parameters.

Userspace(v2): https://lore.kernel.org/netdev/20250704045427.1558605-1-saeed@kernel.org/

v5->v6:
  - rebase was required - Simon.

v4->v5:
  - ./tools/net/ynl/ynl-regen.sh for patch #12
  - checkpatch issues

v3->v4:
  - Rebase and adapted to new enum variable typed attributes from Jiri:
    https://lore.kernel.org/netdev/20250505114513.53370-1-jiri@resnulli.us/

v2->v3:
 - ynl-gen: allow noncontiguous enums, Jakub
 - devlink.yaml: var-attr-type enum, Jakub

v1->v2:
 - Fix ynl-regen issue reported by Simon.
 - Fix smatch "could be null" warning reported by Dan Carpenter
 - Fix double include reported by Kernel test robot
 - Only allow per PF sriov setting - by Jiri
 - Add Reviewed-by Jiri and Tested-by Kamal.

Below is a summary of the key changes:

1) Enable support for devlink port parameters

2) Implement multi attribute devlink param value data, for u32 array
   type parameters

3) Implement the following parameters:

   3.a) total_vfs Parameter:
   -------------------------

Adds support for managing the number of VFs (total_vfs) and enabling
SR-IOV (enable_sriov for mlx5) through devlink. These additions enhance
user control over virtualization features directly from standard kernel
interfaces without relying on additional external tools. total_vfs
functionality is critical for environments that require flexible num VF
configuration.

   3.b) devlink keep_link_up Parameter:
   ------------------------------------

Introduces a new devlink parameter 'keep_link_up', allowing devices to
keep the link active even when the driver is not loaded. This
functionality is especially useful for maintaining link stability during
driver upgrades or reboots without dropping connectivity.

   3.c) eSwitch Hairpin per Priority Buffers:
   ------------------------------------------

Implements new devlink parameters to configure eSwitch hairpin per
priority buffers. These parameters provide granular control over how
packets are buffered for IEEE802.1p priorities, offering improved traffic
management and efficiency for specific priority levels.

   3.d) CQE Compression Type:
   --------------------------

Introduces a new devlink parameter, cqe_compress_type, to configure the
rate of CQE compression based on PCIe bus conditions. This setting
provides a balance between compression efficiency and overall NIC
performance under different traffic loads.

Detailed examples of usage for each parameter have been included in the
respective commits.

Thanks,
Saeed
Jiri Pirko (1):
  devlink: pass struct devlink_port * as arg to devlink_nl_param_fill()

Saeed Mahameed (9):
  net/mlx5: Implement cqe_compress_type via devlink params
  devlink: Implement port params registration
  devlink: Implement get/dump netlink commands for port params
  devlink: Implement set netlink command for port params
  devlink: Add 'keep_link_up' generic devlink device param
  net/mlx5: Implement devlink keep_link_up port parameter
  devlink: Throw extack messages on param value validation error
  devlink: Implement devlink param multi attribute nested data values
  net/mlx5: Implement eSwitch hairpin per prio buffers devlink params

Vlad Dumitrescu (3):
  devlink: Add 'total_vfs' generic device param
  net/mlx5: Implement devlink enable_sriov parameter
  net/mlx5: Implement devlink total_vfs parameter

 Documentation/netlink/specs/devlink.yaml      |   25 +-
 .../networking/devlink/devlink-params.rst     |    7 +
 Documentation/networking/devlink/mlx5.rst     |   65 +-
 .../net/ethernet/mellanox/mlx5/core/Makefile  |    2 +-
 .../net/ethernet/mellanox/mlx5/core/devlink.c |    8 +
 .../net/ethernet/mellanox/mlx5/core/devlink.h |    3 +
 .../ethernet/mellanox/mlx5/core/en/devlink.c  |   17 +-
 .../ethernet/mellanox/mlx5/core/en/devlink.h  |    3 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c |    4 +-
 .../mellanox/mlx5/core/lib/nv_param.c         | 1001 +++++++++++++++++
 .../mellanox/mlx5/core/lib/nv_param.h         |   18 +
 include/linux/mlx5/driver.h                   |    1 +
 include/net/devlink.h                         |   30 +
 include/uapi/linux/devlink.h                  |    1 +
 net/devlink/netlink_gen.c                     |   25 +-
 net/devlink/param.c                           |  412 +++++--
 net/devlink/port.c                            |    3 +
 17 files changed, 1535 insertions(+), 90 deletions(-)
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.h

-- 
2.50.0


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

end of thread, other threads:[~2025-09-03 21:32 UTC | newest]

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09  3:04 [PATCH net-next V6 00/13] devlink, mlx5: Add new parameters for link management and SRIOV/eSwitch configurations Saeed Mahameed
2025-07-09  3:04 ` [PATCH net-next V6 01/13] devlink: Add 'total_vfs' generic device param Saeed Mahameed
2025-07-09  8:36   ` Simon Horman
2025-07-10  2:53   ` Jakub Kicinski
2025-07-10  5:38     ` Saeed Mahameed
2025-09-02 21:24       ` Jacob Keller
2025-09-03 21:32         ` Saeed Mahameed
2025-07-09  3:04 ` [PATCH net-next V6 02/13] net/mlx5: Implement cqe_compress_type via devlink params Saeed Mahameed
2025-07-09  8:37   ` Simon Horman
2025-07-09  9:06   ` Subbaraya Sundeep
2025-07-10  5:51     ` Saeed Mahameed
2025-07-11 16:19       ` Subbaraya Sundeep
2025-07-10  2:53   ` Jakub Kicinski
2025-07-10  5:44     ` Saeed Mahameed
2025-07-10 22:16       ` Jakub Kicinski
2025-07-09  3:04 ` [PATCH net-next V6 03/13] net/mlx5: Implement devlink enable_sriov parameter Saeed Mahameed
2025-07-09  8:37   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 04/13] net/mlx5: Implement devlink total_vfs parameter Saeed Mahameed
2025-07-09  8:37   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 05/13] devlink: pass struct devlink_port * as arg to devlink_nl_param_fill() Saeed Mahameed
2025-07-09  8:38   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 06/13] devlink: Implement port params registration Saeed Mahameed
2025-07-09  8:38   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 07/13] devlink: Implement get/dump netlink commands for port params Saeed Mahameed
2025-07-09  8:38   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 08/13] devlink: Implement set netlink command " Saeed Mahameed
2025-07-09  8:40   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 09/13] devlink: Add 'keep_link_up' generic devlink device param Saeed Mahameed
2025-07-09  8:40   ` Simon Horman
2025-07-10  2:58   ` Jakub Kicinski
2025-07-10  6:04     ` Saeed Mahameed
2025-07-10 12:45       ` Jiri Pirko
2025-07-10 22:24       ` Jakub Kicinski
2025-08-28 20:09         ` Saeed Mahameed
2025-08-28 22:38           ` Jakub Kicinski
2025-09-02 19:02             ` Saeed Mahameed
2025-09-02 21:57           ` Jacob Keller
2025-09-03  6:45             ` Saeed Mahameed
2025-09-03 19:59               ` Jacob Keller
2025-09-03 21:30                 ` Saeed Mahameed
2025-07-09  3:04 ` [PATCH net-next V6 10/13] net/mlx5: Implement devlink keep_link_up port parameter Saeed Mahameed
2025-07-09  8:40   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 11/13] devlink: Throw extack messages on param value validation error Saeed Mahameed
2025-07-09  8:40   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 12/13] devlink: Implement devlink param multi attribute nested data values Saeed Mahameed
2025-07-09  8:41   ` Simon Horman
2025-07-09  3:04 ` [PATCH net-next V6 13/13] net/mlx5: Implement eSwitch hairpin per prio buffers devlink params Saeed Mahameed
2025-07-09  8:41   ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).