Skip to content

RFC net/mlx5: Introduce shared devlink instance for PFs on same chip

Jiri Pirko netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3faux: extend the creation function for module namespacedrivers/base/faux.c include/linux/device/faux.h include/linux/module.h+17 -118 replies
2/3net/mlx5: Introduce shared devlink instance for PFs on same chipdrivers/net/ethernet/mellanox/mlx5/core/Makefile drivers/net/ethernet/mellanox/mlx5/core/main.c drivers/net/ethernet/mellanox/mlx5/core/sh_devlink.c +2 more+185 -26 replies
3/3net/mlx5: Introduce enable_sriov param for shared devlinkdrivers/net/ethernet/mellanox/mlx5/core/Makefile drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.c drivers/net/ethernet/mellanox/mlx5/core/lib/nv_param.h +3 more+269 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next RFC 0/3] net/mlx5: Introduce shared devlink instance for PFs on same chip

From: Jiri Pirko <[email protected]>

This patchsets aims to introduce an entity, that allows to pin devlink configuration objects (params, resources, etc) on for things shared among multiple PFs.

As the shared entity that kind of float above the actual PFs does not have explicit a PCI function, use faux device to back the devlink instance. Expose the relationship between PF devlink instances and this new shared instance by nested devlink attributes.

Example:

$ devlink dev
pci/0000:08:00.0:                   <--- PF0
  nested_devlink:
    auxiliary/mlx5_core.eth.0
faux/mlx5_core_83013c12b77faa1a30000c82a1045c91:  <--- shared devlink for chip that PF0 and PF1 are part of
  nested_devlink:
    pci/0000:08:00.0
    pci/0000:08:00.1
auxiliary/mlx5_core.eth.0           <--- ethernet auxiliary device of PF0
pci/0000:08:00.1:                   <--- PF1
  nested_devlink:
    auxiliary/mlx5_core.eth.1
auxiliary/mlx5_core.eth.1           <--- ethernet auxiliary device of PF1

The first patch is a little adjustment to recently introduced faux driver. The second patch introduces the shared devlink instance.
The last patch introduces example devlink param for the shared instance.

Jiri Pirko (3):
faux: extend the creation function for module namespace net/mlx5: Introduce shared devlink instance for PFs on same chip net/mlx5: Introduce enable_sriov param for shared devlink

 drivers/base/faux.c                           |  20 +-
 .../net/ethernet/mellanox/mlx5/core/Makefile  |   5 +-
 .../mellanox/mlx5/core/lib/nv_param.c         | 236 ++++++++++++++++++
 .../mellanox/mlx5/core/lib/nv_param.h         |  14 ++
 .../net/ethernet/mellanox/mlx5/core/main.c    |  18 ++
 .../ethernet/mellanox/mlx5/core/sh_devlink.c  | 164 ++++++++++++
 .../ethernet/mellanox/mlx5/core/sh_devlink.h  |  11 +
 include/linux/device/faux.h                   |   6 +-
 include/linux/mlx5/driver.h                   |   6 +
 include/linux/module.h                        |   2 +-
 10 files changed, 469 insertions(+), 13 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
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/sh_devlink.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/sh_devlink.h
Signature · 1 line
2.48.1