diff options
| author | Amir Vadai <amirv@mellanox.com> | 2014-02-25 11:17:50 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-02-26 15:38:06 -0500 |
| commit | 3f85944fe207d0225ef21a2c0951d4946fc9a95d (patch) | |
| tree | a7183f4fe0dfd0d86120535654516a265bc787e2 /include/linux | |
| parent | f2ea0cfd6b5fb7daf4cf48bdc364f1cf9ef55d0c (diff) | |
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>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netdevice.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5e4756553c18..5e84483c0650 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
| @@ -1279,6 +1279,10 @@ struct net_device { | |||
| 1279 | * that share the same link | 1279 | * that share the same link |
| 1280 | * layer address | 1280 | * layer address |
| 1281 | */ | 1281 | */ |
| 1282 | unsigned short dev_port; /* Used to differentiate | ||
| 1283 | * devices that share the same | ||
| 1284 | * function | ||
| 1285 | */ | ||
| 1282 | spinlock_t addr_list_lock; | 1286 | spinlock_t addr_list_lock; |
| 1283 | struct netdev_hw_addr_list uc; /* Unicast mac addresses */ | 1287 | struct netdev_hw_addr_list uc; /* Unicast mac addresses */ |
| 1284 | struct netdev_hw_addr_list mc; /* Multicast mac addresses */ | 1288 | struct netdev_hw_addr_list mc; /* Multicast mac addresses */ |
