app/testpmd: fixed using strtoull with 64-bit variables
Checks
Commit Message
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>
---
app/test-pmd/cmdline.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 3/10/2022 11:20 PM, Adham Masarwah wrote:
> 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>
As Windowuses the|LLP64 data model.|
> 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;
> }
> > 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>
Applied, thanks.
@@ -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;
}