From patchwork Thu Oct 12 09:32:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yang, Zhiyong" X-Patchwork-Id: 30223 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5203E1B204; Thu, 12 Oct 2017 11:33:08 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id DE7061B1EF for ; Thu, 12 Oct 2017 11:33:01 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 12 Oct 2017 02:33:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,365,1503385200"; d="scan'208";a="137746930" Received: from unknown (HELO dpdk5.bj.intel.com) ([172.16.182.182]) by orsmga004.jf.intel.com with ESMTP; 12 Oct 2017 02:33:00 -0700 From: Zhiyong Yang To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Zhiyong Yang Date: Thu, 12 Oct 2017 17:32:50 +0800 Message-Id: <20171012093252.53100-5-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20171012093252.53100-1-zhiyong.yang@intel.com> References: <20171012093252.53100-1-zhiyong.yang@intel.com> Subject: [dpdk-dev] [PATCH 4/6] app/pdump: fix port id type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Increase port id range to 16 bits and remove the unnecessary cast. Fixes: f8244c6399d9 ("ethdev: increase port id range") Signed-off-by: Zhiyong Yang --- app/pdump/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index 090a50cfc..3d8e50273 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -579,7 +579,7 @@ signal_handler(int sig_num) } static inline int -configure_vdev(uint8_t port_id) +configure_vdev(uint16_t port_id) { struct ether_addr addr; const uint16_t rxRings = 0, txRings = 1; @@ -609,7 +609,7 @@ configure_vdev(uint8_t port_id) rte_eth_macaddr_get(port_id, &addr); printf("Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8 " %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", - (unsigned)port_id, + port_id, addr.addr_bytes[0], addr.addr_bytes[1], addr.addr_bytes[2], addr.addr_bytes[3], addr.addr_bytes[4], addr.addr_bytes[5]);