Skip to contentSkip to conversation

net/ice: fix dcf init rss blocked

PATCH Superseded Kaiwen Deng 3 participants 4 messages May 6, 2023 – May 15, 2023 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/ice: fix dcf init rss blocked

The i variable type is uint8_t which causes a dead loop, changing it to uint32_t will solve this issue.

Fixes 3220d865382c ("net/ice: init RSS during DCF start")
---
 drivers/net/ice/ice_dcf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ice/ice_dcf.c +2 -1
index 1c3d22ae0f..2cf5de0380 100644
@@ -854,7 +854,8 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
 {
 	struct rte_eth_dev *dev = hw->eth_dev;
 	struct rte_eth_rss_conf *rss_conf;
-	uint8_t i, j, nb_q;
+	uint8_t j, nb_q;
+	uint32_t i;
 	int ret;
 
 	rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
Signature · 1 line
2.34.1
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Kaiwen Deng

The i variable type is uint8_t which causes a dead loop, changing it to uint32_t will solve this issue.

Fixes 3220d865382c ("net/ice: init RSS during DCF start")
---
 drivers/net/ice/ice_dcf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ice/ice_dcf.c +0 -0
index 1c3d22ae0f..2cf5de0380 100644

drivers/net/ice/ice_dcf.c ice_dcf_init_rss(struct ice_dcf_hw *hw) · line 858

Quoted 6 lines
drivers/net/ice/ice_dcf.c +2 -1
@@ -854,7 +854,8 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
 {
 	struct rte_eth_dev *dev = hw->eth_dev;
 	struct rte_eth_rss_conf *rss_conf;
-	uint8_t i, j, nb_q;
+	uint8_t j, nb_q;
+	uint32_t i;

should be size_t

drivers/net/ice/ice_dcf.c ice_dcf_init_rss(struct ice_dcf_hw *hw) · line 861

Quoted 3 lines
drivers/net/ice/ice_dcf.c +0 -0
 	int ret;
 
 	rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;

with or without suggested change, also isn't there a warning on gcc or clang that can be enabled to detect this?

#2 lore raw

PATCH v2 1/1 net/ice: fix dcf init rss blocked

In reply to Kaiwen Deng

The i variable type is uint8_t which causes a dead loop, changing it to size_t will solve this issue.

---
 drivers/net/ice/ice_dcf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ice/ice_dcf.c +2 -1
index 1c3d22ae0f..3e3004f51b 100644
@@ -854,7 +854,8 @@ ice_dcf_init_rss(struct ice_dcf_hw *hw)
 {
 	struct rte_eth_dev *dev = hw->eth_dev;
 	struct rte_eth_rss_conf *rss_conf;
-	uint8_t i, j, nb_q;
+	uint8_t j, nb_q;
+	size_t i;
 	int ret;
 
 	rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
Signature · 1 line
2.34.1
Acked-by on v2 1/1 Applied
#3 lore raw
Quoted 11 lines

-----Original Message-----
From: Deng, KaiwenX <[email protected]>
Sent: Tuesday, May 9, 2023 9:22 AM
To: [email protected]
Cc: [email protected]; Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Deng, KaiwenX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] net/ice: fix dcf init rss blocked

Quoted 2 lines

The i variable type is uint8_t which causes a dead loop, changing it to size_t will solve this issue.

Fixes 3220d865382c ("net/ice: init RSS during DCF start")
Quoted 2 lines

Applied to dpdk-next-net-intel.

Thanks
Qi