[net-stable,24/24] hv_netvsc: set master device

Message ID 20180514223223.25433-25-sthemmin@microsoft.com
State Not Applicable
Delegated to: David Miller
Headers show
  • hv_netvsc patches for 4.14 stable
Related show

Commit Message

Stephen Hemminger May 14, 2018, 10:32 p.m.
From: Stephen Hemminger <stephen@networkplumber.org>

commit 97f3efb64323beb0690576e9d74e94998ad6e82a upstream

The hyper-v transparent bonding should have used master_dev_link.
The netvsc device should look like a master bond device not
like the upper side of a tunnel.

This makes the semantics the same so that userspace applications
looking at network devices see the correct master relationshipship.

Fixes: 0c195567a8f6 ("netvsc: transparent VF management")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
 drivers/net/hyperv/netvsc_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index be4b15b63355..11b46c8d2d67 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -1778,7 +1778,8 @@  static int netvsc_vf_join(struct net_device *vf_netdev,
 		goto rx_handler_failed;
-	ret = netdev_upper_dev_link(vf_netdev, ndev);
+	ret = netdev_master_upper_dev_link(vf_netdev, ndev,
+					   NULL, NULL);
 	if (ret != 0) {
 			   "can not set master device %s (err = %d)\n",