diff options
author | Jiri Pirko <jiri@nvidia.com> | 2022-04-25 06:44:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-25 12:42:28 +0300 |
commit | 8d92e4fbcf0fb7ecb24223b7b1ce95b9beb4dfa2 (patch) | |
tree | 474bac40f2a2ca2471c9c5506eee650b740b2eff /include/net/devlink.h | |
parent | cfc1d91a7d78cf9de25b043d81efcc16966d55b3 (diff) | |
download | linux-8d92e4fbcf0fb7ecb24223b7b1ce95b9beb4dfa2.tar.xz |
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>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 2a2a2a0c93f7..c84b52fb9ff0 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1578,6 +1578,13 @@ struct devlink_linecard * devlink_linecard_create(struct devlink *devlink, unsigned int linecard_index, const struct devlink_linecard_ops *ops, void *priv); void devlink_linecard_destroy(struct devlink_linecard *linecard); +struct devlink_linecard_device; +struct devlink_linecard_device * +devlink_linecard_device_create(struct devlink_linecard *linecard, + unsigned int device_index); +void +devlink_linecard_device_destroy(struct devlink_linecard *linecard, + struct devlink_linecard_device *linecard_device); void devlink_linecard_provision_set(struct devlink_linecard *linecard, const char *type); void devlink_linecard_provision_clear(struct devlink_linecard *linecard); |