Blame SOURCES/0003-net-netvsc-disable-multi-queue-on-older-servers.patch

045d85
From 0598625d2e17374b7d5693972f5acb59fef25f63 Mon Sep 17 00:00:00 2001
045d85
From: Stephen Hemminger <sthemmin@microsoft.com>
045d85
Date: Wed, 5 Dec 2018 14:11:58 -0800
045d85
Subject: [PATCH 3/3] net/netvsc: disable multi-queue on older servers
045d85
045d85
[ upstream commit afbc22bf51ab98b9b61b11eb6d38278a9d577111 ]
045d85
045d85
NDIS multi-queue support is only in WS2012 or later. Check the NDIS
045d85
version to limit to single queue on older versions. Similar code
045d85
exists in Linux driver.
045d85
045d85
Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device")
045d85
045d85
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
045d85
(cherry picked from commit d387b7ae45a520970ff55ea6ce75b48d5e69c4d9)
045d85
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
045d85
---
045d85
 drivers/net/netvsc/hn_ethdev.c | 5 +++++
045d85
 1 file changed, 5 insertions(+)
045d85
045d85
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
045d85
index b330bf3d7..1256fa399 100644
045d85
--- a/drivers/net/netvsc/hn_ethdev.c
045d85
+++ b/drivers/net/netvsc/hn_ethdev.c
045d85
@@ -732,6 +732,7 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
045d85
 	hv->chim_res  = &vmbus->resource[HV_SEND_BUF_MAP];
045d85
 	hv->port_id = eth_dev->data->port_id;
045d85
 	hv->latency = HN_CHAN_LATENCY_NS;
045d85
+	hv->max_queues = 1;
045d85
 
045d85
 	err = hn_parse_args(eth_dev);
045d85
 	if (err)
045d85
@@ -770,6 +771,10 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
045d85
 	if (err)
045d85
 		goto failed;
045d85
 
045d85
+	/* Multi queue requires later versions of windows server */
045d85
+	if (hv->nvs_ver < NVS_VERSION_5)
045d85
+		return 0;
045d85
+
045d85
 	max_chan = rte_vmbus_max_channels(vmbus);
045d85
 	PMD_INIT_LOG(DEBUG, "VMBus max channels %d", max_chan);
045d85
 	if (max_chan <= 0)
045d85
-- 
045d85
2.20.1
045d85