net/ice: fix dcf init rss blocked
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.
--- drivers/net/ice/ice_dcf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
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;int ret; rss_conf = &dev->data->dev_conf.rx_adv_conf.rss_conf;
Signature · 1 line
2.34.1
Quoted 16 lines · Kaiwen Deng
The i variable type is
uint8_twhich causes a dead loop, changing it touint32_twill solve this issue.Fixes 3220d865382c ("net/ice: init RSS during DCF start")Signed-off-by Kaiwen Deng <[email protected]>--- drivers/net/ice/ice_dcf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/ice/ice_dcf.c +0
-0
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
-0int 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?
PATCH v2 1/1 net/ice: fix dcf init rss blocked
In reply to Kaiwen DengThe 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
@@ -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
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_twhich causes a dead loop, changing it tosize_twill solve this issue.
Quoted 2 lines
Signed-off-by Kaiwen Deng <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi