]> www.infradead.org Git - users/willy/xarray.git/commit
hv_netvsc: Make netvsc/VF binding check both MAC and serial number
authorDexuan Cui <decui@microsoft.com>
Sat, 24 Apr 2021 01:12:35 +0000 (18:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Apr 2021 01:19:23 +0000 (18:19 -0700)
commit64ff412ad41fe3a5bf759ff4844dc1382176485c
treebbf651de73b0111189a33f6b87e19512604fc927
parentbf7d20cd51d7b6aa969e263b33805af6e147a70e
hv_netvsc: Make netvsc/VF binding check both MAC and serial number

Currently the netvsc/VF binding logic only checks the PCI serial number.

The Microsoft Azure Network Adapter (MANA) supports multiple net_device
interfaces (each such interface is called a "vPort", and has its unique
MAC address) which are backed by the same VF PCI device, so the binding
logic should check both the MAC address and the PCI serial number.

The change should not break any other existing VF drivers, because
Hyper-V NIC SR-IOV implementation requires the netvsc network
interface and the VF network interface have the same MAC address.

Co-developed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Co-developed-by: Shachar Raindel <shacharr@microsoft.com>
Signed-off-by: Shachar Raindel <shacharr@microsoft.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dexuan Cui <decui@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c