[v3] app/testpmd: fix show RSS RETA on Windows

Message ID 20220313125702.11884-1-adham@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series [v3] app/testpmd: fix show RSS RETA on Windows |

Checks

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

Commit Message

Adham Masarwah March 13, 2022, 12:57 p.m. UTC
  Replaced using strtoul with strtoull when converting to
64-bit mask field.
In Windows strtoul returns 32-bit values which cause an
issue with show RSS RETA.

Fixes: 66c594904ac ("ethdev: support multiple sizes of redirection table")
Cc: stable@dpdk.org

Signed-off-by: Adham Masarwah <adham@nvidia.com>
Acked-by: Aman Singh <aman.deep.singh@intel.com>
--
v2: Change commit message
v3: Added Acked-by
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Tal Shnaiderman March 13, 2022, 1:21 p.m. UTC | #1
> Subject: [PATCH v3] app/testpmd: fix show RSS RETA on Windows
> 
> Replaced using strtoul with strtoull when converting to 64-bit mask field.
> In Windows strtoul returns 32-bit values which cause an issue with show RSS
> RETA.
> 
> Fixes: 66c594904ac ("ethdev: support multiple sizes of redirection table")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Adham Masarwah <adham@nvidia.com>
> Acked-by: Aman Singh <aman.deep.singh@intel.com>
> --
> v2: Change commit message
> v3: Added Acked-by
> ---
>  app/test-pmd/cmdline.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index
> b4ba8da2b0..efa02bd301 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -3127,7 +3127,7 @@ showport_parse_reta_config(struct
> rte_eth_rss_reta_entry64 *conf,
>  		return -1;
>  	}
>  	for (i = 0; i < ret; i++)
> -		conf[i].mask = (uint64_t)strtoul(str_fld[i], &end, 0);
> +		conf[i].mask = (uint64_t)strtoull(str_fld[i], &end, 0);
> 
>  	return 0;
>  }
> --
> 2.16.1.windows.4

Acked-by: Tal Shnaiderman <talshn@nvidia.com>
  
Thomas Monjalon March 14, 2022, 8:27 p.m. UTC | #2
13/03/2022 14:21, Tal Shnaiderman:
> > Subject: [PATCH v3] app/testpmd: fix show RSS RETA on Windows
> > 
> > Replaced using strtoul with strtoull when converting to 64-bit mask field.
> > In Windows strtoul returns 32-bit values which cause an issue with show RSS
> > RETA.
> > 
> > Fixes: 66c594904ac ("ethdev: support multiple sizes of redirection table")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Adham Masarwah <adham@nvidia.com>
> > Acked-by: Aman Singh <aman.deep.singh@intel.com>
> Acked-by: Tal Shnaiderman <talshn@nvidia.com>

Applied, thanks.
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index b4ba8da2b0..efa02bd301 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -3127,7 +3127,7 @@  showport_parse_reta_config(struct rte_eth_rss_reta_entry64 *conf,
 		return -1;
 	}
 	for (i = 0; i < ret; i++)
-		conf[i].mask = (uint64_t)strtoul(str_fld[i], &end, 0);
+		conf[i].mask = (uint64_t)strtoull(str_fld[i], &end, 0);
 
 	return 0;
 }