diff options
author | Haiyang Zhang <haiyangz@microsoft.com> | 2017-09-23 00:31:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-26 05:20:51 +0200 |
commit | 6450f8f269a9271985e4a8c13920b7e4cf21c0f3 (patch) | |
tree | 7aec9cbc2d4067ea8c72464ef6ae89c7722f0558 /drivers/net/hyperv/netvsc_drv.c | |
parent | Merge branch 'tun-NAPI-and-gro' (diff) | |
download | linux-6450f8f269a9271985e4a8c13920b7e4cf21c0f3.tar.xz linux-6450f8f269a9271985e4a8c13920b7e4cf21c0f3.zip |
hv_netvsc: Fix the real number of queues of non-vRSS cases
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>
Reviewed-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/netvsc_drv.c')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index a32ae02e1b6c..e9d54c9ee78c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1935,6 +1935,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; |