net/ice: fix dcf init rss blocked

Message ID 20230506064822.4153301-1-kaiwenx.deng@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Qi Zhang
Headers
Series net/ice: fix dcf init rss blocked |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/intel-Testing success Testing PASS

Commit Message

Kaiwen Deng May 6, 2023, 6:48 a.m. UTC
  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")
Cc: stable@dpdk.org

Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
---
 drivers/net/ice/ice_dcf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Tyler Retzlaff May 8, 2023, 3:14 p.m. UTC | #1
On Sat, May 06, 2023 at 02:48:22PM +0800, Kaiwen Deng wrote:
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Kaiwen Deng <kaiwenx.deng@intel.com>
> ---
>  drivers/net/ice/ice_dcf.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
> index 1c3d22ae0f..2cf5de0380 100644
> --- a/drivers/net/ice/ice_dcf.c
> +++ b/drivers/net/ice/ice_dcf.c
> @@ -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

>  	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?

Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
  

Patch

diff --git a/drivers/net/ice/ice_dcf.c b/drivers/net/ice/ice_dcf.c
index 1c3d22ae0f..2cf5de0380 100644
--- a/drivers/net/ice/ice_dcf.c
+++ b/drivers/net/ice/ice_dcf.c
@@ -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;