summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorJiri Pirko <jiri@nvidia.com>2026-03-12 13:04:07 +0300
committerJakub Kicinski <kuba@kernel.org>2026-03-14 23:08:51 +0300
commit2a8c8a03f306e21a0ea74c93d4332119557f4575 (patch)
tree5fb34a4e749566fe020860e27af0a0938c999992 /tools/testing
parent63fff8c0f7025a838f1afab5fc8e6ad989e4823e (diff)
downloadlinux-2a8c8a03f306e21a0ea74c93d4332119557f4575.tar.xz
net/mlx5: Add a shared devlink instance for PFs on same chip
Use the previously introduced shared devlink infrastructure to create a shared devlink instance for mlx5 PFs that reside on the same physical chip. The shared instance is identified by the chip's serial number extracted from PCI VPD (V3 keyword, with fallback to serial number for older devices). Each PF that probes calls mlx5_shd_init() which extracts the chip serial number and uses devlink_shd_get() to get or create the shared instance. When a PF is removed, mlx5_shd_uninit() calls devlink_shd_put() to release the reference. The shared instance is automatically destroyed when the last PF is removed. Make the PF devlink instances nested in this shared devlink instance, allowing userspace to identify which PFs belong to the same physical chip. Example: pci/0000:08:00.0: index 0 nested_devlink: auxiliary/mlx5_core.eth.0 devlink_index/1: index 1 nested_devlink: pci/0000:08:00.0 pci/0000:08:00.1 auxiliary/mlx5_core.eth.0: index 2 pci/0000:08:00.1: index 3 nested_devlink: auxiliary/mlx5_core.eth.1 auxiliary/mlx5_core.eth.1: index 4 Signed-off-by: Jiri Pirko <jiri@nvidia.com> Link: https://patch.msgid.link/20260312100407.551173-14-jiri@resnulli.us Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions