netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases
@ 2017-09-22 22:31 Haiyang Zhang
  2017-09-25 10:38 ` Stephen Hemminger
  2017-09-26  3:21 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Haiyang Zhang @ 2017-09-22 22:31 UTC (permalink / raw)
  To: davem, netdev; +Cc: haiyangz, kys, olaf, vkuznets, linux-kernel

From: Haiyang Zhang <haiyangz@microsoft.com>

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")
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
---
 drivers/net/hyperv/netvsc_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index d4902ee5f260..68eac12fbf75 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -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;
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases
  2017-09-22 22:31 [PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases Haiyang Zhang
@ 2017-09-25 10:38 ` Stephen Hemminger
  2017-09-26  3:21 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2017-09-25 10:38 UTC (permalink / raw)
  To: Haiyang Zhang; +Cc: haiyangz, davem, netdev, kys, olaf, vkuznets, linux-kernel

On Fri, 22 Sep 2017 15:31:38 -0700
Haiyang Zhang <haiyangz@exchange.microsoft.com> wrote:

> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> 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")
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

Yes, this should fix issues with WS2012.

Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases
  2017-09-22 22:31 [PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases Haiyang Zhang
  2017-09-25 10:38 ` Stephen Hemminger
@ 2017-09-26  3:21 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-09-26  3:21 UTC (permalink / raw)
  To: haiyangz, haiyangz; +Cc: netdev, kys, olaf, vkuznets, linux-kernel

From: Haiyang Zhang <haiyangz@exchange.microsoft.com>
Date: Fri, 22 Sep 2017 15:31:38 -0700

> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> 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")
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-09-26  3:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-22 22:31 [PATCH net-next] hv_netvsc: Fix the real number of queues of non-vRSS cases Haiyang Zhang
2017-09-25 10:38 ` Stephen Hemminger
2017-09-26  3:21 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).