summaryrefslogtreecommitdiff
path: root/drivers/net/netvsc/hn_ethdev.c
diff options
context:
space:
mode:
authorStephen Hemminger <sthemmin@microsoft.com>2018-12-05 14:11:58 -0800
committerThomas Monjalon <thomas@monjalon.net>2018-12-19 03:02:13 +0100
commitafbc22bf51ab98b9b61b11eb6d38278a9d577111 (patch)
tree921dd01a1174ce0d14517778c7d2b8a403c87fe5 /drivers/net/netvsc/hn_ethdev.c
parent825ab257b5ce8235ab0cdc260e5b7b757e102875 (diff)
downloaddpdk-afbc22bf51ab98b9b61b11eb6d38278a9d577111.zip
dpdk-afbc22bf51ab98b9b61b11eb6d38278a9d577111.tar.gz
dpdk-afbc22bf51ab98b9b61b11eb6d38278a9d577111.tar.xz
net/netvsc: disable multi-queue on older servers
NDIS multi-queue support is only in WS2012 or later. Check the NDIS version to limit to single queue on older versions. Similar code exists in Linux driver. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Diffstat (limited to 'drivers/net/netvsc/hn_ethdev.c')
-rw-r--r--drivers/net/netvsc/hn_ethdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index b330bf3..1256fa3 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -732,6 +732,7 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
hv->chim_res = &vmbus->resource[HV_SEND_BUF_MAP];
hv->port_id = eth_dev->data->port_id;
hv->latency = HN_CHAN_LATENCY_NS;
+ hv->max_queues = 1;
err = hn_parse_args(eth_dev);
if (err)
@@ -770,6 +771,10 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
if (err)
goto failed;
+ /* Multi queue requires later versions of windows server */
+ if (hv->nvs_ver < NVS_VERSION_5)
+ return 0;
+
max_chan = rte_vmbus_max_channels(vmbus);
PMD_INIT_LOG(DEBUG, "VMBus max channels %d", max_chan);
if (max_chan <= 0)