summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDanielle Ratson <danieller@mellanox.com>2020-07-09 16:18:18 +0300
committerDavid S. Miller <davem@davemloft.net>2020-07-09 23:15:29 +0300
commita21cf0a8330bba60e44ca6c99e1591042f336ff5 (patch)
tree47f66f8336258aac25fe6d09a31a25ec663a5a82 /include/net
parent622d3e9201072aaa94d6291b8dee05e3dd50c3af (diff)
downloadlinux-a21cf0a8330bba60e44ca6c99e1591042f336ff5.tar.xz
devlink: Add a new devlink port lanes attribute and pass to netlink
Add a new devlink port attribute that indicates the port's number of lanes. Drivers are expected to set it via devlink_port_attrs_set(), before registering the port. The attribute is not passed to user space in case the number of lanes is invalid (0). Signed-off-by: Danielle Ratson <danieller@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/devlink.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index 8f9db991192d..91a9f8770d08 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -68,10 +68,12 @@ struct devlink_port_pci_vf_attrs {
* struct devlink_port_attrs - devlink port object
* @flavour: flavour of the port
* @split: indicates if this is split port
+ * @lanes: maximum number of lanes the port supports. 0 value is not passed to netlink.
* @switch_id: if the port is part of switch, this is buffer with ID, otherwise this is NULL
*/
struct devlink_port_attrs {
u8 split:1;
+ u32 lanes;
enum devlink_port_flavour flavour;
struct netdev_phys_item_id switch_id;
union {