summaryrefslogtreecommitdiffstats
path: root/include/net/devlink.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2018-05-18 09:29:01 +0200
committerDavid S. Miller <davem@davemloft.net>2018-05-19 22:30:39 +0200
commit5ec1380a21bb6cd2ba89e31c44dfcc150f9ef792 (patch)
tree654c2744fe5672d8500e18998f787241a744f340 /include/net/devlink.h
parentdevlink: introduce devlink_port_attrs_set (diff)
downloadlinux-5ec1380a21bb6cd2ba89e31c44dfcc150f9ef792.tar.xz
linux-5ec1380a21bb6cd2ba89e31c44dfcc150f9ef792.zip
devlink: extend attrs_set for setting port flavours
Devlink ports can have specific flavour according to the purpose of use. This patch extend attrs_set so the driver can say which flavour port has. Initial flavours are: physical, cpu, dsa User can query this to see right away what is the purpose of each port. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r--include/net/devlink.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h
index d6ca92266709..6eae15cf0f57 100644
--- a/include/net/devlink.h
+++ b/include/net/devlink.h
@@ -37,6 +37,7 @@ struct devlink {
struct devlink_port_attrs {
bool set;
+ enum devlink_port_flavour flavour;
u32 port_number; /* same value as "split group" */
bool split;
u32 split_subport_number;
@@ -374,6 +375,7 @@ void devlink_port_type_ib_set(struct devlink_port *devlink_port,
struct ib_device *ibdev);
void devlink_port_type_clear(struct devlink_port *devlink_port);
void devlink_port_attrs_set(struct devlink_port *devlink_port,
+ enum devlink_port_flavour flavour,
u32 port_number, bool split,
u32 split_subport_number);
int devlink_sb_register(struct devlink *devlink, unsigned int sb_index,
@@ -474,6 +476,7 @@ static inline void devlink_port_type_clear(struct devlink_port *devlink_port)
}
static inline void devlink_port_attrs_set(struct devlink_port *devlink_port,
+ enum devlink_port_flavour flavour,
u32 port_number, bool split,
u32 split_subport_number)
{