diff mbox

[dpdk-dev] fix testpmd show port info error

Message ID CY1PR0301MB0684331C3A2ADAF8938A13F6863B0@CY1PR0301MB0684.namprd03.prod.outlook.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

xuelin.shi@freescale.com Feb. 5, 2015, 9:26 a.m. UTC
Hi,

Anybody interested in this patch could have a review or comment on it?
I'm new here. Should I send this patch to some specific maintainer to make this more efficient?

Thanks,
Shi Xuelin

-----Original Message-----
From: xuelin.shi@freescale.com [mailto:xuelin.shi@freescale.com] 
Sent: Monday, February 02, 2015 14:52
To: dev@dpdk.org
Cc: Shi Xuelin-B29237
Subject: [PATCH] fix testpmd show port info error

From: Xuelin Shi <xuelin.shi@freescale.com>

the port number type should be consistent with librte_cmdline, else there is potential endian issue.

Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.9.1

Comments

Olivier Matz Feb. 5, 2015, 9:58 a.m. UTC | #1
Hi,

On 02/05/2015 10:26 AM, Xuelin Shi wrote:
> Hi,
>
> Anybody interested in this patch could have a review or comment on it?
> I'm new here. Should I send this patch to some specific maintainer to make this more efficient?
>
> Thanks,
> Shi Xuelin
>
> -----Original Message-----
> From: xuelin.shi@freescale.com [mailto:xuelin.shi@freescale.com]
> Sent: Monday, February 02, 2015 14:52
> To: dev@dpdk.org
> Cc: Shi Xuelin-B29237
> Subject: [PATCH] fix testpmd show port info error
>
> From: Xuelin Shi <xuelin.shi@freescale.com>
>
> the port number type should be consistent with librte_cmdline, else there is potential endian issue.
>
> Signed-off-by: Xuelin Shi <xuelin.shi@freescale.com>
> ---
>   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 4beb404..488ac63 100644
> --- a/app/test-pmd/cmdline.c
> +++ b/app/test-pmd/cmdline.c
> @@ -5568,7 +5568,7 @@ cmdline_parse_token_string_t cmd_showport_what =
>   	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
>   				 "info#stats#xstats#fdir#stat_qmap");
>   cmdline_parse_token_num_t cmd_showport_portnum =
> -	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, INT32);
> +	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, INT8);
>
>   cmdline_parse_inst_t cmd_showport = {
>   	.f = cmd_showport_parsed,
> --

Thank you for reporting this. However I think it should be UINT8
instead of INT8.

According to http://dpdk.org/dev, I think a better title could be
"testpmd: fix port parsing in show port info command"

Apart from this,
Acked-by: Olivier Matz <olivier.matz@6wind.com>

I think it would be less work for Thomas if you can submit
a v2 that includes these 2 changes.

Regards,
Olivier
diff mbox

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 4beb404..488ac63 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -5568,7 +5568,7 @@  cmdline_parse_token_string_t cmd_showport_what =
 	TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what,
 				 "info#stats#xstats#fdir#stat_qmap");
 cmdline_parse_token_num_t cmd_showport_portnum =
-	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, INT32);
+	TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, INT8);
 
 cmdline_parse_inst_t cmd_showport = {
 	.f = cmd_showport_parsed,