summaryrefslogtreecommitdiff
path: root/drivers/net/hyperv/netvsc.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2018-09-14 22:54:57 +0300
committerDavid S. Miller <davem@davemloft.net>2018-09-17 17:59:41 +0300
commit00d7ddba1143623b31bc2c15d18216e2da031b14 (patch)
treee0815806a52bc6669417949d52257c22539bdf70 /drivers/net/hyperv/netvsc.c
parenta15f2c08c70811f120d99288d81f70d7f3d104f1 (diff)
downloadlinux-00d7ddba1143623b31bc2c15d18216e2da031b14.tar.xz
hv_netvsc: pair VF based on serial number
Matching network device based on MAC address is problematic since a non VF network device can be creted with a duplicate MAC address causing confusion and problems. The VMBus API does provide a serial number that is a better matching method. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc.c')
-rw-r--r--drivers/net/hyperv/netvsc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 31c3d77b4733..fe01e141c8f8 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -1203,6 +1203,9 @@ static void netvsc_send_vf(struct net_device *ndev,
net_device_ctx->vf_alloc = nvmsg->msg.v4_msg.vf_assoc.allocated;
net_device_ctx->vf_serial = nvmsg->msg.v4_msg.vf_assoc.serial;
+ netdev_info(ndev, "VF slot %u %s\n",
+ net_device_ctx->vf_serial,
+ net_device_ctx->vf_alloc ? "added" : "removed");
}
static void netvsc_receive_inband(struct net_device *ndev,