diff options
author | Parav Pandit <parav@mellanox.com> | 2019-07-08 23:17:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-09 12:02:13 -0700 |
commit | 378ef01b5f75e6c485b8f16b4f6a7842a312aa07 (patch) | |
tree | ccb5866a1547b8d3c66d91af2a59729a8472fe83 /include/net/devlink.h | |
parent | b14a260e33ddb4536088a799f24f321593201a64 (diff) | |
download | linux-378ef01b5f75e6c485b8f16b4f6a7842a312aa07.tar.bz2 |
devlink: Refactor physical port attributes
To support additional devlink port flavours and to support few common
and few different port attributes, move physical port attributes to a
different structure.
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 6625ea068d5e..4538c80fe293 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -38,14 +38,23 @@ struct devlink { char priv[0] __aligned(NETDEV_ALIGN); }; +struct devlink_port_phys_attrs { + u32 port_number; /* Same value as "split group". + * A physical port which is visible to the user + * for a given port flavour. + */ + u32 split_subport_number; +}; + struct devlink_port_attrs { u8 set:1, split:1, switch_port:1; enum devlink_port_flavour flavour; - u32 port_number; /* same value as "split group" */ - u32 split_subport_number; struct netdev_phys_item_id switch_id; + union { + struct devlink_port_phys_attrs phys; + }; }; struct devlink_port { |