devlink: introduce line card devices support
authorJiri Pirko <jiri@nvidia.com>
Mon, 25 Apr 2022 03:44:21 +0000 (06:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Apr 2022 09:42:28 +0000 (10:42 +0100)
commit8d92e4fbcf0fb7ecb24223b7b1ce95b9beb4dfa2
tree474bac40f2a2ca2471c9c5506eee650b740b2eff
parentcfc1d91a7d78cf9de25b043d81efcc16966d55b3
devlink: introduce line card devices support

Line card can contain one or more devices that makes sense to make
visible to the user. For example, this can be a gearbox with
flash memory, which could be updated.

Provide the driver possibility to attach such devices to a line card
and expose those to user.

Example:
$ devlink lc show pci/0000:01:00.0 lc 8
pci/0000:01:00.0:
  lc 8 state active type 16x100G
    supported_types:
      16x100G
    devices:
      device 0
      device 1
      device 2
      device 3

Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/devlink.h
include/uapi/linux/devlink.h
net/core/devlink.c