[dpdk-dev,v3] app/testpmd: fix port_id alloction issue

Message ID 20180205075306.104779-1-yanglong.wu@intel.com (mailing list archive)
State Rejected, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Yanglong Wu Feb. 5, 2018, 7:53 a.m. UTC
  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")

Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
---
v2:
modified commit message
---
v3:
add review tag
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Yang, Zhiyong Feb. 5, 2018, 8 a.m. UTC | #1
It seems that the patch has been applied by Thomas. Please check mail list.

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yanglong Wu
> Sent: Monday, February 5, 2018 3:53 PM
> To: dev@dpdk.org
> Cc: shahafs@mellanox.com; Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu,
> Yanglong <yanglong.wu@intel.com>
> Subject: [dpdk-dev] [PATCH v3] 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")
> 
> Signed-off-by: Yanglong Wu <yanglong.wu@intel.com>
> Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>
> ---
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index f71d96301..8990ebf6b 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -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,