net: Add sysfs file for port number
Add a sysfs file to enable user space to query the device port number used by a netdevice instance. This is needed for devices that have multiple ports on the same PCI function. Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f2ea0cfd6b
commit
3f85944fe2
2 changed files with 6 additions and 0 deletions
|
@ -1279,6 +1279,10 @@ struct net_device {
|
|||
* that share the same link
|
||||
* layer address
|
||||
*/
|
||||
unsigned short dev_port; /* Used to differentiate
|
||||
* devices that share the same
|
||||
* function
|
||||
*/
|
||||
spinlock_t addr_list_lock;
|
||||
struct netdev_hw_addr_list uc; /* Unicast mac addresses */
|
||||
struct netdev_hw_addr_list mc; /* Multicast mac addresses */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue