DPDK patches and discussions
 help / color / mirror / Atom feed
From: Marko Kovacevic <marko.kovacevic@intel.com>
To: dev@dpdk.org
Cc: ferruh.yigit@intel.com, reshma.pattan@intel.com,
	Marko Kovacevic <marko.kovacevic@intel.com>,
	zhiyong.yang@intel.com
Subject: [dpdk-dev] [PATCH] app/pdump: fix port id storage size
Date: Tue, 13 Nov 2018 14:26:55 +0000	[thread overview]
Message-ID: <20181113142655.28535-1-marko.kovacevic@intel.com> (raw)

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

Signed-off-by: Marko Kovacevic <marko.kovacevic@intel.com>
---
 app/pdump/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/app/pdump/main.c b/app/pdump/main.c
index d96556e..baabd04 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -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

             reply	other threads:[~2018-11-13 14:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 14:26 Marko Kovacevic [this message]
2018-11-13 14:30 ` Marko Kovacevic
2018-11-13 14:33   ` [dpdk-dev] [PATCH v2] " Marko Kovacevic
2018-11-14  8:56     ` [dpdk-dev] [PATCH v3] " Marko Kovacevic
2018-11-14 10:28       ` Pattan, Reshma
2018-11-18 20:42         ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2018-11-13 17:09 ` [dpdk-dev] [PATCH] " Pattan, Reshma
2018-11-14  8:39   ` Kovacevic, Marko
2018-11-14 10:00     ` Pattan, Reshma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181113142655.28535-1-marko.kovacevic@intel.com \
    --to=marko.kovacevic@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=reshma.pattan@intel.com \
    --cc=zhiyong.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).