From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 804A54C92; Wed, 14 Nov 2018 09:56:49 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 00:56:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,231,1539673200"; d="scan'208";a="85712099" Received: from silpixa00399502.ir.intel.com (HELO silpixa00399502.ger.corp.intel.com) ([10.237.223.218]) by fmsmga007.fm.intel.com with ESMTP; 14 Nov 2018 00:56:47 -0800 From: Marko Kovacevic To: dev@dpdk.org Cc: ferruh.yigit@intel.com, reshma.pattan@intel.com, Marko Kovacevic , zhiyong.yang@intel.com, stable@dpdk.org Date: Wed, 14 Nov 2018 08:56:45 +0000 Message-Id: <20181114085645.27565-1-marko.kovacevic@intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20181113143320.28717-1-marko.kovacevic@intel.com> References: <20181113143320.28717-1-marko.kovacevic@intel.com> Subject: [dpdk-dev] [PATCH v3] app/pdump: fix port id storage size 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: , X-List-Received-Date: Wed, 14 Nov 2018 08:56:50 -0000 port_id size should be uint16_t, fix where it is defined as uint8_t Fixes: f8244c6399d9 ("ethdev: increase port id range") Cc: zhiyong.yang@intel.com Cc: stable@dpdk.org Signed-off-by: Marko Kovacevic -- v2: Added cc to stable v3: Changed two more values to uint16_t (Reshma) --- app/pdump/main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/pdump/main.c b/app/pdump/main.c index d96556e..9e86bf6 100644 --- a/app/pdump/main.c +++ b/app/pdump/main.c @@ -119,8 +119,8 @@ struct pdump_tuples { /* params for packet dumping */ enum pdump_by dump_by_type; - int rx_vdev_id; - int tx_vdev_id; + uint16_t rx_vdev_id; + uint16_t tx_vdev_id; enum pcap_stream rx_vdev_stream_type; enum pcap_stream tx_vdev_stream_type; bool single_pdump_dev; @@ -266,7 +266,7 @@ parse_pdump(const char *optarg) &parse_uint_value, &v); if (ret < 0) goto free_kvlist; - pt->port = (uint8_t) v.val; + pt->port = (uint16_t) v.val; pt->dump_by_type = PORT_ID; } else if (cnt2 == 1) { ret = rte_kvargs_process(kvlist, PDUMP_PCI_ARG, @@ -435,7 +435,7 @@ disable_pdump(struct pdump_tuples *pt) } static inline void -pdump_rxtx(struct rte_ring *ring, uint8_t vdev_id, struct pdump_stats *stats) +pdump_rxtx(struct rte_ring *ring, uint16_t vdev_id, struct pdump_stats *stats) { /* write input packets of port to vdev for pdump */ struct rte_mbuf *rxtx_bufs[BURST_SIZE]; @@ -462,7 +462,7 @@ pdump_rxtx(struct rte_ring *ring, uint8_t vdev_id, struct pdump_stats *stats) } static void -free_ring_data(struct rte_ring *ring, uint8_t vdev_id, +free_ring_data(struct rte_ring *ring, uint16_t vdev_id, struct pdump_stats *stats) { while (rte_ring_count(ring)) -- 2.9.5