From b6ec9ce9e32ac9e86ece11180bac94284158d2ee Mon Sep 17 00:00:00 2001 From: David Marchand Date: Mon, 7 Jan 2019 09:57:12 +0100 Subject: [PATCH] app/testpmd: check mbufs in verbose mode Let's check the received/sent mbufs, it can help debugging. Signed-off-by: David Marchand Acked-by: Bernard Iremonger --- app/test-pmd/util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c index 687bfa4965..6b0791daab 100644 --- a/app/test-pmd/util.c +++ b/app/test-pmd/util.c @@ -36,6 +36,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], uint32_t sw_packet_type; uint16_t udp_port; uint32_t vx_vni; + const char *reason; if (!nb_pkts) return; @@ -147,6 +148,8 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[], printf("\n"); rte_get_rx_ol_flag_list(mb->ol_flags, buf, sizeof(buf)); printf(" ol_flags: %s\n", buf); + if (rte_mbuf_check(mb, 1, &reason) < 0) + printf("INVALID mbuf: %s\n", reason); } } -- 2.20.1