app/testpmd: fix port_id alloction issue
PATCH 1/1 app/testpmd: fix port_id alloction issue
the port_id was allocated as a inccrete number,
for init function was passthroughed a wrong
size of parameter
--- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline.c +1 -1
@@ -3352,7 +3352,7 @@ cmdline_parse_token_num_t cmd_vlan_tpid_tpid = tp_id, UINT16);cmdline_parse_token_num_t cmd_vlan_tpid_portid = TOKEN_NUM_INITIALIZER(struct cmd_vlan_tpid_result, - port_id,UINT8 ); + port_id,UINT16 );cmdline_parse_inst_t cmd_vlan_tpid = { .f = cmd_vlan_tpid_parsed,
Signature · 1 line
2.11.0
Hi Yanglong,
Good catch! Thanks for your patch.
Thanks
Zhiyong
Quoted 9 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Thursday, November 23, 2017 9:27 AM
To: [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] app/testpmd: fixport_idalloction issuethe
port_idwas allocated as a inccrete number, for init function was passthroughed a wrong size of parameter
The commit log is not clear enough.
Quoted 23 lines
Fixes 28caa76aea71 ("app/testpmd: fix port id type")Signed-off-by Yanglong Wu <[email protected]>--- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
f71d96301..8990ebf6b100644app/test-pmd/cmdline.c +1
-2@@ -3352,7 +3352,7 @@ cmdline_parse_token_num_t cmd_vlan_tpid_tpid = tp_id, UINT16);cmdline_parse_token_num_t cmd_vlan_tpid_portid = TOKEN_NUM_INITIALIZER(struct cmd_vlan_tpid_result, - port_id,UINT8 ); + port_id,UINT16 );cmdline_parse_inst_t cmd_vlan_tpid = { .f = cmd_vlan_tpid_parsed, --2.11.0
Yang, Zhiyong
Reviewed-byQuoted 22 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yang, Zhiyong
Sent: Thursday, November 23, 2017 9:57 AM
To: Wu, Yanglong <[email protected]>; [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] app/testpmd: fixport_idalloction issueHi Yanglong,
Good catch! Thanks for your patch.
Thanks
ZhiyongQuoted 7 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Thursday, November 23, 2017 9:27 AM
To: [email protected]
Cc: Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH] app/testpmd: fixport_idalloction issue
Quoted 5 lines
Quoted 2 lines
the
port_idwas allocated as a inccrete number, for init function was passthroughed a wrong size of parameterThe commit log is not clear enough.
Except that, you can add
Quoted 23 lines
Quoted 23 lines
Fixes 28caa76aea71 ("app/testpmd: fix port id type")Signed-off-by Yanglong Wu <[email protected]>--- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)app/test-pmd/cmdline.c index renamed from app/test-pmd/cmdline.c +0
-0
f71d96301..8990ebf6b100644app/test-pmd/cmdline.c +1
-2@@ -3352,7 +3352,7 @@ cmdline_parse_token_num_t cmd_vlan_tpid_tpid = tp_id, UINT16);cmdline_parse_token_num_t cmd_vlan_tpid_portid = TOKEN_NUM_INITIALIZER(struct cmd_vlan_tpid_result, - port_id,UINT8 ); + port_id,UINT16 );cmdline_parse_inst_t cmd_vlan_tpid = { .f = cmd_vlan_tpid_parsed, --2.11.0
PATCH v2 1/1 app/testpmd: fix port_id alloction issue
In reply to Yanglong WuIn the feature of increasing port_id range from 8 bits to 16 bits, vlan port_id allocation function was forget to substitute UINT8 with UINT16, so the vlan port_id was allocated as a invalid number.
---
v2:
modified commit message
--- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline.c +1 -1
@@ -3352,7 +3352,7 @@ cmdline_parse_token_num_t cmd_vlan_tpid_tpid = tp_id, UINT16);cmdline_parse_token_num_t cmd_vlan_tpid_portid = TOKEN_NUM_INITIALIZER(struct cmd_vlan_tpid_result, - port_id,UINT8 ); + port_id,UINT16 );cmdline_parse_inst_t cmd_vlan_tpid = { .f = cmd_vlan_tpid_parsed,
Signature · 1 line
2.11.0
PATCH v2 1/1 app/testpmd: fix port_id alloction issue
In the feature of increasing port_id range from 8 bits to 16 bits, vlan port_id allocation function was forget to substitute UINT8 with UINT16, so the vlan port_id was allocated as a inccrete number.
---
v2:
modified commit message
--- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline.c +1 -1
@@ -3352,7 +3352,7 @@ cmdline_parse_token_num_t cmd_vlan_tpid_tpid = tp_id, UINT16);cmdline_parse_token_num_t cmd_vlan_tpid_portid = TOKEN_NUM_INITIALIZER(struct cmd_vlan_tpid_result, - port_id,UINT8 ); + port_id,UINT16 );cmdline_parse_inst_t cmd_vlan_tpid = { .f = cmd_vlan_tpid_parsed,
Signature · 1 line
2.11.0
Quoted 7 lines · Yanglong Wu
In the feature of increasing
port_idrange from 8 bits to 16 bits, vlanport_idallocation function was forget to substitute UINT8 with UINT16, so the vlanport_idwas allocated as a inccrete number.Fixes 28caa76aea71 ("app/testpmd: fix port id type")Signed-off-by Yanglong Wu <[email protected]>
(carrying existing review tag)
PATCH v3 1/1 app/testpmd: fix port_id alloction issue
In reply to Yanglong WuIn the feature of increasing port_id range from 8 bits to 16 bits, vlan port_id allocation function was forget to substitute UINT8 with UINT16, so the vlan port_id was allocated as a inccrete number.
---
v2:
modified commit message
---
v3:
add review tag
--- app/test-pmd/cmdline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline.c +1 -1
@@ -3352,7 +3352,7 @@ cmdline_parse_token_num_t cmd_vlan_tpid_tpid = tp_id, UINT16);cmdline_parse_token_num_t cmd_vlan_tpid_portid = TOKEN_NUM_INITIALIZER(struct cmd_vlan_tpid_result, - port_id,UINT8 ); + port_id,UINT16 );cmdline_parse_inst_t cmd_vlan_tpid = { .f = cmd_vlan_tpid_parsed,
Signature · 1 line
2.11.0
Hi,
Quoted 8 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Yanglong Wu
Sent: Tuesday, January 2, 2018 1:36 PM
To: [email protected]
Cc: Yang, Zhiyong <[email protected]>; Wu, Yanglong <[email protected]>
Subject: [dpdk-dev] [PATCH v3] app/testpmd: fixport_idalloction issue
Quoted 8 lines
In the feature of increasing
port_idrange from 8 bits to 16 bits, vlanport_idallocation function was forget to substitute UINT8 with UINT16, so the vlanport_idwas allocated as a inccrete number.Fixes 28caa76aea71 ("app/testpmd: fix port id type")Signed-off-by Yanglong Wu <[email protected]>Reviewed-by Zhiyong Yang <[email protected]>
Thomas Monjalon
AppliedQuoted 5 lines
Quoted 5 lines
In the feature of increasing
port_idrange from 8 bits to 16 bits, vlanport_idallocation function was forget to substitute UINT8 with UINT16, so the vlanport_idwas allocated as a inccrete number.Fixes 28caa76aea71 ("app/testpmd: fix port id type")
Quoted 3 lines
Quoted 2 lines
Signed-off-by Yanglong Wu <[email protected]>Reviewed-by Zhiyong Yang <[email protected]>Acked-by Wenzhuo Lu <[email protected]>
Applied, thanks