From 378ef01b5f75e6c485b8f16b4f6a7842a312aa07 Mon Sep 17 00:00:00 2001 From: Parav Pandit Date: Mon, 8 Jul 2019 23:17:35 -0500 Subject: 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 Signed-off-by: Parav Pandit Signed-off-by: David S. Miller --- include/net/devlink.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'include/net/devlink.h') 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 { -- cgit v1.2.3-59-g8ed1b