hv_netvsc: fix network namespace issues with VF support
authorStephen Hemminger <stephen@networkplumber.org>
Mon, 11 Jun 2018 19:44:55 +0000 (12:44 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:22 +0000 (07:50 +0200)
commit0a84c912f575c083e2cdc123bcae93e0847f9e63
tree5061b9c4e1bf6f9516c0ea8aa7c36001fc0e1a73
parent51b694070738e93ef319c464208a7f524b2b5b15
hv_netvsc: fix network namespace issues with VF support

[ Upstream commit 7bf7bb37f16a80465ee3bd7c6c966f96f5a075a6 ]

When finding the parent netvsc device, the search needs to be across
all netvsc device instances (independent of network namespace).

Find parent device of VF using upper_dev_get routine which
searches only adjacent list.

Fixes: e8ff40d4bff1 ("hv_netvsc: improve VF device matching")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
netns aware byref
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/hyperv_net.h
drivers/net/hyperv/netvsc_drv.c