From: Stephen Hemminger Date: Thu, 30 Apr 2020 19:08:53 +0000 (-0700) Subject: net/netvsc: do not configure RSS if disabled X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c6611b77d0613b6dddc0c207f19e6f5574e13d8e;p=dpdk.git net/netvsc: do not configure RSS if disabled This fixes the problem where driver would not start if only have a single Rx queue and multiple Txq. In that case, RSS should stay disabled. Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters") Cc: stable@dpdk.org Signed-off-by: Stephen Hemminger --- diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c index 60102362e1..55b8a63804 100644 --- a/drivers/net/netvsc/hn_ethdev.c +++ b/drivers/net/netvsc/hn_ethdev.c @@ -376,14 +376,15 @@ static int hn_rss_hash_update(struct rte_eth_dev *dev, hn_rss_hash_init(hv, rss_conf); - err = hn_rndis_conf_rss(hv, 0); - if (err) { - PMD_DRV_LOG(NOTICE, - "rss reconfig failed (RSS disabled)"); - return err; + if (rss_conf->rss_hf != 0) { + err = hn_rndis_conf_rss(hv, 0); + if (err) { + PMD_DRV_LOG(NOTICE, + "rss reconfig failed (RSS disabled)"); + return err; + } } - return hn_vf_rss_hash_update(dev, rss_conf); } @@ -595,11 +596,13 @@ static int hn_dev_configure(struct rte_eth_dev *dev) return err; } - err = hn_rndis_conf_rss(hv, 0); - if (err) { - PMD_DRV_LOG(NOTICE, - "initial RSS config failed"); - return err; + if (rss_conf->rss_hf != 0) { + err = hn_rndis_conf_rss(hv, 0); + if (err) { + PMD_DRV_LOG(NOTICE, + "initial RSS config failed"); + return err; + } } }