Skip to content

*devlink, mlx5: Add new parameters for link management and SRIOV/eSwitch configurations

Saeed Mahameed netdev 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest11 patches 6 repliesIn review 4 of 11 applied
  2. v613 patches 34 repliesSuperseded
  3. v513 patches 3 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v413 patches0 repliesSuperseded
v315 patches13 repliesSuperseded
v214 patches9 repliesSuperseded
v114 patches19 repliesSuperseded

Changes in v7 from the cover letter

- Improve Documentation for patch #1 and #2, Jakub/JacobK.
- Toss "Add 'keep_link_up' generic devlink device param" patch, Jakub.

Patches in v7 4 of 11 applied

#Subject and filesSizeRepliesApplied
1/11devlink: Add 'total_vfs' generic device paramDocumentation/networking/devlink/devlink-params.rst include/net/devlink.h net/devlink/param.c+14 -00 repliesApplied
2/11net/mlx5: Implement cqe_compress_type via devlink paramsDocumentation/networking/devlink/mlx5.rst drivers/net/ethernet/mellanox/mlx5/core/Makefile drivers/net/ethernet/mellanox/mlx5/core/devlink.c +4 more+280 -15 repliesApplied
3/11net/mlx5: Implement devlink enable_sriov parameterDocumentation/networking/devlink/mlx5.rst drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c+210 -30 repliesApplied
4/11net/mlx5: Implement devlink total_vfs parameterDocumentation/networking/devlink/mlx5.rst drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c+154 -00 repliesApplied
5/11devlink: pass struct devlink_port * as arg to devlink_nl_param_fill()net/devlink/param.c+15 -140 replies
6/11devlink: Implement port params registrationinclude/net/devlink.h net/devlink/param.c net/devlink/port.c+141 -270 replies
7/11devlink: Implement get/dump netlink commands for port paramsDocumentation/netlink/specs/devlink.yaml include/net/devlink.h net/devlink/netlink_gen.c +1 more+100 -190 replies
8/11devlink: Implement set netlink command for port paramsDocumentation/netlink/specs/devlink.yaml net/devlink/netlink_gen.c net/devlink/param.c+25 -70 replies
9/11devlink: Throw extack messages on param value validation errornet/devlink/param.c+74 -180 replies
10/11devlink: Implement devlink param multi attribute nested data valuesDocumentation/netlink/specs/devlink.yaml include/net/devlink.h include/uapi/linux/devlink.h +2 more+53 -10 replies
11/11net/mlx5: Implement eSwitch hairpin per prio buffers devlink paramsDocumentation/networking/devlink/mlx5.rst drivers/net/ethernet/mellanox/mlx5/core/devlink.h drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c+301 -10 replies

Reviews trailers per patch

All 11 patches have a Reviewed-by or Acked-by.

PatchKamal HeibJiri PirkoSimon Horman
1/11T-b R-b R-b
2/11R-b R-b
3/11T-b R-b R-b
4/11T-b R-b R-b
5/11R-b
6/11R-b R-b
7/11R-b R-b
8/11R-b R-b
9/11R-b R-b
10/11R-b R-b
11/11R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v7 thread

Cover letter [PATCH V7 net-next 00/11] *devlink, mlx5: Add new parameters for link management and SRIOV/eSwitch configurations

From: Saeed Mahameed <[email protected]>

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/[email protected]/

v6->v7:
- Improve Documentation for patch #1 and #2, Jakub/JacobK.
- Toss "Add 'keep_link_up' generic devlink device param" patch, Jakub.

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/[email protected]/

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 (7):
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: 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     |   5 +
 Documentation/networking/devlink/mlx5.rst     |  61 +-
 .../net/ethernet/mellanox/mlx5/core/Makefile  |   2 +-
 .../net/ethernet/mellanox/mlx5/core/devlink.c |   8 +
 .../net/ethernet/mellanox/mlx5/core/devlink.h |   3 +
 .../mellanox/mlx5/core/lib/nv_param.c         | 859 ++++++++++++++++++
 .../mellanox/mlx5/core/lib/nv_param.h         |  14 +
 include/linux/mlx5/driver.h                   |   1 +
 include/net/devlink.h                         |  25 +
 include/uapi/linux/devlink.h                  |   1 +
 net/devlink/netlink_gen.c                     |  25 +-
 net/devlink/param.c                           | 416 +++++++--
 net/devlink/port.c                            |   3 +
 14 files changed, 1362 insertions(+), 86 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
Signature · 1 line
2.51.0