net/netvsc: disable before changing RSS parameters
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 6 Dec 2019 23:52:48 +0000 (15:52 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:45:23 +0000 (19:45 +0100)
In order to change RSS parameters, the host requires that RSS
is disable first.

Fixes: 92d23a57cafe ("net/netvsc: support configuring RSS parameters")
Cc: stable@dpdk.org
Signed-off-by: Donald Lee <donald_lee@trendmicro.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Tested-by: Dexuan Cui <decui@microsoft.com>
Tested-by: Abhishek Marathe <abmarath@microsoft.com>
drivers/net/netvsc/hn_ethdev.c

index 5ef7a45..159116f 100644 (file)
@@ -292,6 +292,13 @@ static int hn_rss_reta_update(struct rte_eth_dev *dev,
                        hv->rss_ind[i] = reta_conf[idx].reta[shift];
        }
 
+       err = hn_rndis_conf_rss(hv, NDIS_RSS_FLAG_DISABLE);
+       if (err) {
+               PMD_DRV_LOG(NOTICE,
+                       "rss disable failed");
+               return err;
+       }
+
        err = hn_rndis_conf_rss(hv, 0);
        if (err) {
                PMD_DRV_LOG(NOTICE,
@@ -579,6 +586,13 @@ static int hn_dev_configure(struct rte_eth_dev *dev)
                        return err;
                }
 
+               err = hn_rndis_conf_rss(hv, NDIS_RSS_FLAG_DISABLE);
+               if (err) {
+                       PMD_DRV_LOG(NOTICE,
+                               "rss disable failed");
+                       return err;
+               }
+
                err = hn_rndis_conf_rss(hv, 0);
                if (err) {
                        PMD_DRV_LOG(NOTICE,