From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0144.outbound.protection.outlook.com [65.55.169.144]) by dpdk.org (Postfix) with ESMTP id 7CB8DB47C for ; Fri, 6 Feb 2015 03:33:02 +0100 (CET) Received: from BY2PR03CA007.namprd03.prod.outlook.com (10.255.93.24) by BY2PR0301MB0678.namprd03.prod.outlook.com (25.160.63.145) with Microsoft SMTP Server (TLS) id 15.1.81.19; Fri, 6 Feb 2015 02:33:01 +0000 Received: from BN1AFFO11FD048.protection.gbl (10.255.93.4) by BY2PR03CA007.outlook.office365.com (10.255.93.24) with Microsoft SMTP Server (TLS) id 15.1.81.19 via Frontend Transport; Fri, 6 Feb 2015 02:33:00 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD048.mail.protection.outlook.com (10.58.53.63) with Microsoft SMTP Server (TLS) id 15.1.87.10 via Frontend Transport; Fri, 6 Feb 2015 02:33:00 +0000 Received: from localhost (rock.ap.freescale.net [10.193.20.106]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id t162WvnQ015812; Thu, 5 Feb 2015 19:32:58 -0700 From: To: Date: Fri, 6 Feb 2015 09:29:20 +0800 Message-ID: <1423186160-26035-1-git-send-email-xuelin.shi@freescale.com> X-Mailer: git-send-email 1.8.4 X-EOPAttributedMessage: 0 Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=b29237@freescale.com; freescale.mail.onmicrosoft.com; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(339900001)(76506005)(36756003)(105606002)(50226001)(46102003)(6806004)(106466001)(47776003)(110136001)(19580395003)(19580405001)(92566002)(50466002)(86152002)(85426001)(77096005)(87936001)(57986006)(104016003)(77156002)(86362001)(48376002)(33646002)(50986999)(62966003)(229853001)(2351001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR0301MB0678; H:az84smr01.freescale.net; FPR:; SPF:Fail; MLV:sfv; LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB0678; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:BY2PR0301MB0678; X-Forefront-PRVS: 047999FF16 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:; SRVR:BY2PR0301MB0678; X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2015 02:33:00.4137 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.158.2] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB0678 Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH v2] testpmd: fix port parsing in show port info command X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Feb 2015 02:33:03 -0000 From: Xuelin Shi the port number type should be consistent with librte_cmdline, else there is potential endian issue. Signed-off-by: Xuelin Shi --- v2 change: change port type to uint8 rephrase patch title 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 590e427..d5f31f2 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -5584,7 +5584,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, UINT8); cmdline_parse_inst_t cmd_showport = { .f = cmd_showport_parsed, -- 1.9.1