History

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.

Jiri Pirko committed 8 years ago

Commit 5ec13801 parent b9ffcba5 files · +24 −4Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/devlink.h+11−0
@@ -132,6 +132,16 @@ enum devlink_eswitch_encap_mode { · 131 unmodified lines
132132 DEVLINK_ESWITCH_ENCAP_MODE_BASIC,
133133 };
134134
135+enum devlink_port_flavour {
136+ DEVLINK_PORT_FLAVOUR_PHYSICAL, /* Any kind of a port physically
137+ * facing the user.
138+ */
139+ DEVLINK_PORT_FLAVOUR_CPU, /* CPU port */
140+ DEVLINK_PORT_FLAVOUR_DSA, /* Distributed switch architecture
141+ * interconnect port.
142+ */
143+};
144+
135145 enum devlink_attr {
136146 /* don't change the order or add anything between, this is ABI! */
137147 DEVLINK_ATTR_UNSPEC,
@@ -224,6 +234,7 @@ enum devlink_attr { · 86 unmodified lines
224234 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_ID, /* u64 */
225235 DEVLINK_ATTR_DPIPE_TABLE_RESOURCE_UNITS,/* u64 */
226236
237+ DEVLINK_ATTR_PORT_FLAVOUR, /* u16 */
227238 DEVLINK_ATTR_PORT_NUMBER, /* u32 */
228239 DEVLINK_ATTR_PORT_SPLIT_SUBPORT_NUMBER, /* u32 */
229240