Skip to contentSkip to conversation

app/testpmd: fix port_id alloction issue

PATCH Superseded Yanglong Wu 5 participants 9 messages Nov 23, 2017 – Jan 9, 2018

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

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

Fixes 28caa76aea71 ("app/testpmd: fix port id type")
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline.c +1 -1
index f71d96301..8990ebf6b 100644
@@ -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
#1 lore raw

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: fix port_id alloction issue

the port_id was 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")
---
 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..8990ebf6b 100644

app/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

Reviewed-by
#2 lore raw
Quoted 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: fix port_id alloction issue

Hi Yanglong,

Good catch! Thanks for your patch.

Thanks
Zhiyong

Quoted 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: fix port_id alloction issue

Quoted 5 lines
Quoted 2 lines

the port_id was allocated as a inccrete number, for init function was passthroughed a wrong size of parameter

The 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")
---
 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..8990ebf6b 100644

app/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

#3 lore raw

PATCH v2 1/1 app/testpmd: fix port_id alloction issue

In reply to Yanglong Wu

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 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
index f71d96301..8990ebf6b 100644
@@ -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
#4 lore raw

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.

Fixes 28caa76aea71 ("app/testpmd: fix port id type")

---
v2:
modified commit message

---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline.c +1 -1
index f71d96301..8990ebf6b 100644
@@ -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
Reviewed-by Zhiyong Yang on v2 1/1
#5 lore raw
Quoted 7 lines · Yanglong Wu

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.

Fixes 28caa76aea71 ("app/testpmd: fix port id type")

(carrying existing review tag)

#6 lore raw

PATCH v3 1/1 app/testpmd: fix port_id alloction issue

In reply to Yanglong Wu

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.

Fixes 28caa76aea71 ("app/testpmd: fix port id type")

---
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
index f71d96301..8990ebf6b 100644
@@ -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
Acked-by on v3 1/1
#7 lore raw

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: fix port_id alloction issue

Quoted 8 lines

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.

Fixes 28caa76aea71 ("app/testpmd: fix port id type")
#8 lore raw
Quoted 5 lines
Quoted 5 lines

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.

Fixes 28caa76aea71 ("app/testpmd: fix port id type")
Quoted 3 lines
Quoted 2 lines

Applied, thanks