net/ice: fix RSS hash update
authorWenjun Wu <wenjun1.wu@intel.com>
Fri, 5 Mar 2021 06:03:24 +0000 (14:03 +0800)
committerQi Zhang <qi.z.zhang@intel.com>
Wed, 24 Mar 2021 11:50:16 +0000 (12:50 +0100)
This patch change judgment statements to disable RSS for pf
when users need to disable RSS or RSS hash function configured
is not supported.

Fixes: 4717a12cfaf1 ("net/ice: initialize and update RSS based on user config")
Cc: stable@dpdk.org
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/ice_ethdev.c

index 9c9b84a..5a1190d 100644 (file)
@@ -4457,8 +4457,10 @@ ice_rss_hash_update(struct rte_eth_dev *dev,
        if (status)
                return status;
 
-       if (rss_conf->rss_hf == 0)
+       if (rss_conf->rss_hf == 0) {
+               pf->rss_hf = 0;
                return 0;
+       }
 
        /* RSS hash configuration */
        ice_rss_hash_set(pf, rss_conf->rss_hf);