]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: devlink: introduce nested devlink entity for line card
authorJiri Pirko <jiri@nvidia.com>
Mon, 25 Jul 2022 08:29:16 +0000 (10:29 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 26 Jul 2022 20:50:51 +0000 (13:50 -0700)
commit7b2d9a1a50ec3bedf067fe234a4a71196c89e826
tree8de734364bbb96af55ce475e288d9b7455e99dac
parent294c4f57cfe3303ee2f050d1728c76a401e573a7
net: devlink: introduce nested devlink entity for line card

For the purpose of exposing device info and allow flash update which is
going to be implemented in follow-up patches, introduce a possibility
for a line card to expose relation to nested devlink entity. The nested
devlink entity represents the line card.

Example:

$ devlink lc show pci/0000:01:00.0 lc 1
pci/0000:01:00.0:
  lc 1 state active type 16x100G nested_devlink auxiliary/mlxsw_core.lc.0
    supported_types:
       16x100G
$ devlink dev show auxiliary/mlxsw_core.lc.0
auxiliary/mlxsw_core.lc.0

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/devlink.h
include/uapi/linux/devlink.h
net/core/devlink.c