Skip to contentSkip to conversation

hv_netvsc: Fix the real number of queues of non-vRSS cases

PATCH Applied Haiyang Zhang 3 participants 3 messages Sep 22, 2017 – Sep 26, 2017

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

PATCH 1/1 hv_netvsc: Fix the real number of queues of non-vRSS cases

From: Haiyang Zhang <[email protected]>

For older hosts without multi-channel (vRSS) support, and some error cases, we still need to set the real number of queues to one. This patch adds this missing setting.

Fixes 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug")
---
 drivers/net/hyperv/netvsc_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/net/hyperv/netvsc_drv.c +6 -0
index d4902ee5f260..68eac12fbf75 100644
@@ -1929,6 +1929,12 @@ static int netvsc_probe(struct hv_device *dev,
 	/* We always need headroom for rndis header */
 	net->needed_headroom = RNDIS_AND_PPI_SIZE;
 
+	/* Initialize the number of queues to be 1, we may change it if more
+	 * channels are offered later.
+	 */
+	netif_set_real_num_tx_queues(net, 1);
+	netif_set_real_num_rx_queues(net, 1);
+
 	/* Notify the netvsc driver of the new device */
 	memset(&device_info, 0, sizeof(device_info));
 	device_info.ring_size = ring_size;
Signature · 1 line
2.14.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Fri, 22 Sep 2017 15:31:38 -0700 Haiyang Zhang…

From: Haiyang Zhang <[email protected]>

For older hosts without multi-channel (vRSS) support, and some error cases, we still need to set the real number of queues to one. This patch adds this missing setting.

Fixes 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug")

Yes, this should fix issues with WS2012.

maintainer Applied
#2 lore raw
In reply to Haiyang Zhang

From: Haiyang Zhang <[email protected]>
Date: Fri, 22 Sep 2017 15:31:38 -0700

Quoted 8 lines

From: Haiyang Zhang <[email protected]>

For older hosts without multi-channel (vRSS) support, and some error cases, we still need to set the real number of queues to one. This patch adds this missing setting.

Fixes 8195b1396ec8 ("hv_netvsc: fix deadlock on hotplug")

Applied.