History

devlink: Introduce PCI PF port flavour and port attribute

In an eswitch, PCI PF may have port which is normally represented using a representor netdevice. To have better visibility of eswitch port, its association with PF and a representor netdevice, introduce a PCI PF port flavour and port attriute. When devlink port flavour is PCI PF, fill up PCI PF attributes of the port. Extend port name creation using PCI PF number 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

Parav Pandit committed 7 years ago

Commit 98fd2d61 parent a2c6b873 files · +47 −0Browse files

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

Unified · Split

include/uapi/linux/devlink.h+5−0
@@ -169,6 +169,10 @@ enum devlink_port_flavour { · 168 unmodified lines
169169 DEVLINK_PORT_FLAVOUR_DSA, /* Distributed switch architecture
170170 * interconnect port.
171171 */
172+ DEVLINK_PORT_FLAVOUR_PCI_PF, /* Represents eswitch port for
173+ * the PCI PF. It is an internal
174+ * port that faces the PCI PF.
175+ */
172176 };
173177
174178 enum devlink_param_cmode {
@@ -337,6 +341,7 @@ enum devlink_attr { · 162 unmodified lines
337341 DEVLINK_ATTR_FLASH_UPDATE_STATUS_DONE, /* u64 */
338342 DEVLINK_ATTR_FLASH_UPDATE_STATUS_TOTAL, /* u64 */
339343
344+ DEVLINK_ATTR_PORT_PCI_PF_NUMBER, /* u16 */
340345 /* add new attributes above here, update the policy in devlink.c */
341346
342347 __DEVLINK_ATTR_MAX,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t