aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorParav Pandit <parav@mellanox.com>2019-07-09 00:17:38 -0400
committerDavid S. Miller <davem@davemloft.net>2019-07-09 15:02:13 -0400
commite41b6bf3cdd474dc9c587cb55906b0256835bf6d (patch)
treea4d3ae70a18d475a29903ab48252d7016621c192 /include/uapi
parent98fd2d6563fe4a799934a2a74d632601cd089beb (diff)
devlink: Introduce PCI VF port flavour and port attribute
In an eswitch, PCI VF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with VF, and its representor netdevice, introduce a PCI VF port flavour. When devlink port flavour is PCI VF, fill up PCI VF attributes of the port. Extend port name creation using PCI PF and VF number scheme on best effort basis, so that vendor drivers can skip defining their own scheme. $ devlink port show pci/0000:05:00.0/0: type eth netdev eth0 flavour pcipf pfnum 0 pci/0000:05:00.0/1: type eth netdev eth1 flavour pcivf pfnum 0 vfnum 0 pci/0000:05:00.0/2: type eth netdev eth2 flavour pcivf pfnum 0 vfnum 1 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/uapi')
-rw-r--r--include/uapi/linux/devlink.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index f7323884c3fe..ffc993256527 100644
--- a/include/uapi/linux/devlink.h
+++ b/include/uapi/linux/devlink.h
@@ -173,6 +173,10 @@ enum devlink_port_flavour {
173 * the PCI PF. It is an internal 173 * the PCI PF. It is an internal
174 * port that faces the PCI PF. 174 * port that faces the PCI PF.
175 */ 175 */
176 DEVLINK_PORT_FLAVOUR_PCI_VF, /* Represents eswitch port
177 * for the PCI VF. It is an internal
178 * port that faces the PCI VF.
179 */
176}; 180};
177 181
178enum devlink_param_cmode { 182enum devlink_param_cmode {
@@ -342,6 +346,8 @@ enum devlink_attr {
342 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL, /* u64 */ 346 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL, /* u64 */
343 347
344 DEVLINK_ATTR_PORT_PCI_PF_NUMBER, /* u16 */ 348 DEVLINK_ATTR_PORT_PCI_PF_NUMBER, /* u16 */
349 DEVLINK_ATTR_PORT_PCI_VF_NUMBER, /* u16 */
350
345 /* add new attributes above here, update the policy in devlink.c */ 351 /* add new attributes above here, update the policy in devlink.c */
346 352
347 __DEVLINK_ATTR_MAX, 353 __DEVLINK_ATTR_MAX,