]> git.baikalelectronics.ru Git - kernel.git/commit
hv_netvsc: improve VF device matching
authorStephen Hemminger <sthemmin@microsoft.com>
Thu, 22 Sep 2016 23:56:32 +0000 (16:56 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Sep 2016 12:39:49 +0000 (08:39 -0400)
commit57fbf94d53f008e5782b9044262f320462699c09
tree6add1d59d1087110a15f98e637cb820b2fe9ed5e
parentd86d8ce694b9300e313bd53251b7a6d7666b8246
hv_netvsc: improve VF device matching

The code to associate netvsc and VF devices can be made less error prone
by using a better matching algorithms.

On registration, use the permanent address which avoids any possible
issues caused by device MAC address being changed. For all other callbacks,
search by the netdevice pointer value to ensure getting the correct
network device.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/hyperv/netvsc_drv.c