[v2,3/3] app/testpmd: check mbufs in verbose mode

Message ID 1546851432-19397-4-git-send-email-david.marchand@redhat.com
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series
  • segment sanity checks
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

David Marchand Jan. 7, 2019, 8:57 a.m.
Let's check the received/sent mbufs, it can help debugging.

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 app/test-pmd/util.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Bernard Iremonger Jan. 8, 2019, 9:53 a.m. | #1
> -----Original Message-----
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Monday, January 7, 2019 8:57 AM
> To: dev@dpdk.org
> Cc: olivier.matz@6wind.com; yskoh@mellanox.com;
> arybchenko@solarflare.com; Iremonger, Bernard
> <bernard.iremonger@intel.com>
> Subject: [PATCH v2 3/3] app/testpmd: check mbufs in verbose mode
> 
> Let's check the received/sent mbufs, it can help debugging.
> 
> Signed-off-by: David Marchand <david.marchand@redhat.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Patch

diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index 687bfa4..6b0791d 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -36,6 +36,7 @@ 
 	uint32_t sw_packet_type;
 	uint16_t udp_port;
 	uint32_t vx_vni;
+	const char *reason;
 
 	if (!nb_pkts)
 		return;
@@ -147,6 +148,8 @@ 
 		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);
 	}
 }