Skip to contentSkip to conversation

hv_netvsc: set master device

PATCH In review Stephen Hemminger 2 participants 2 messages May 9, 2018 – May 10, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hv_netvsc: set master device

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")
---
 drivers/net/hyperv/netvsc_drv.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +2 -1
index ecc84954c511..da07ccdf84bf 100644
@@ -1840,7 +1840,8 @@ static int netvsc_vf_join(struct net_device *vf_netdev,
 		goto rx_handler_failed;
 	}
 
-	ret = netdev_upper_dev_link(vf_netdev, ndev, NULL);
+	ret = netdev_master_upper_dev_link(vf_netdev, ndev,
+					   NULL, NULL, NULL);
 	if (ret != 0) {
 		netdev_err(vf_netdev,
 			   "can not set master device %s (err = %d)\n",
Signature · 1 line
2.17.0
maintainer
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Wed, 9 May 2018 14:09:04 -0700

Quoted 9 lines

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")

Applied and queued up for -stable.