diff mbox series

[v3,1/2] net/ice: fix wrong RSS hash update

Message ID 20210305060324.21835-1-wenjun1.wu@intel.com (mailing list archive)
State Accepted
Delegated to: Qi Zhang
Headers show
Series [v3,1/2] net/ice: fix wrong RSS hash update | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Wenjun Wu March 5, 2021, 6:03 a.m. UTC
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>

---
v2: do pf->rss_hf = 0 when rss_conf->rss_hf == 0 instead of direct
removal to avoid unnecessary judgment.
v3: fix the same issue for both pf and vf.
---
 drivers/net/ice/ice_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Qi Zhang March 24, 2021, 11:50 a.m. UTC | #1
> -----Original Message-----
> From: Wu, Wenjun1 <wenjun1.wu@intel.com>
> Sent: Friday, March 5, 2021 2:03 PM
> To: dev@dpdk.org; Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: Wu, Wenjun1 <wenjun1.wu@intel.com>; stable@dpdk.org
> Subject: [PATCH v3 1/2] net/ice: fix wrong RSS hash update
> 
> 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>

Applied to dpdk-next-net-intel.

Thanks
Qi
diff mbox series

Patch

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index f43b2e0b2..299162286 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4461,8 +4461,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);