From: Saeed Mahameed <saeed@kernel.org>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
Leon Romanovsky <leonro@nvidia.com>, Jiri Pirko <jiri@nvidia.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Simon Horman <horms@kernel.org>
Subject: [PATCH V7 net-next 00/11] *devlink, mlx5: Add new parameters for link management and SRIOV/eSwitch configurations
Date: Sat, 6 Sep 2025 18:29:42 -0700 [thread overview]
Message-ID: <20250907012953.301746-1-saeed@kernel.org> (raw)
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/
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/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 (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
--
2.51.0
next reply other threads:[~2025-09-07 1:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-07 1:29 Saeed Mahameed [this message]
2025-09-07 1:29 ` [PATCH V7 net-next 01/11] devlink: Add 'total_vfs' generic device param Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 02/11] net/mlx5: Implement cqe_compress_type via devlink params Saeed Mahameed
2025-10-17 21:51 ` Daniel Zahka
2025-10-17 21:54 ` Daniel Zahka
2025-10-20 5:24 ` Tariq Toukan
2025-10-22 13:42 ` Dragos Tatulea
2025-10-22 16:26 ` Daniel Zahka
2025-09-07 1:29 ` [PATCH V7 net-next 03/11] net/mlx5: Implement devlink enable_sriov parameter Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 04/11] net/mlx5: Implement devlink total_vfs parameter Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 05/11] devlink: pass struct devlink_port * as arg to devlink_nl_param_fill() Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 06/11] devlink: Implement port params registration Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 07/11] devlink: Implement get/dump netlink commands for port params Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 08/11] devlink: Implement set netlink command " Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 09/11] devlink: Throw extack messages on param value validation error Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 10/11] devlink: Implement devlink param multi attribute nested data values Saeed Mahameed
2025-09-07 1:29 ` [PATCH V7 net-next 11/11] net/mlx5: Implement eSwitch hairpin per prio buffers devlink params Saeed Mahameed
2025-09-10 2:13 ` [PATCH V7 net-next 00/11] *devlink, mlx5: Add new parameters for link management and SRIOV/eSwitch configurations Jakub Kicinski
2025-09-10 2:30 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250907012953.301746-1-saeed@kernel.org \
--to=saeed@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=leonro@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.com \
--cc=tariqt@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).