]> 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)
commitff172301a320218377f8bb02c59b5ca2574a6111
tree6add1d59d1087110a15f98e637cb820b2fe9ed5e
parent424a36526eae213b9001c64b3d458fd0222cdfd8
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