[dpdk-dev] [PATCH v2] app/pdump: fix port id storage size
Marko Kovacevic
marko.kovacevic at intel.com
Tue Nov 13 15:33:20 CET 2018
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 at intel.com
Cc: stable at dpdk.org
Signed-off-by: Marko Kovacevic <marko.kovacevic at intel.com>
--
v2:
Added cc to stable
---
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
More information about the dev
mailing list