DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH] mbuf: display more fields in dump
@ 2019-11-20 17:41 Stephen Hemminger
  2019-11-21 16:16 ` Morten Brørup
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Stephen Hemminger @ 2019-11-20 17:41 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

The rte_pktmbuf_dump should display offset, refcount, and vlan
info since these are often useful during debugging.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/librte_mbuf/rte_mbuf.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 35df1c4c38a5..a964464bd598 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -473,11 +473,14 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 
 	__rte_mbuf_sanity_check(m, 1);
 
-	fprintf(f, "dump mbuf at %p, iova=%"PRIx64", buf_len=%u\n",
-	       m, (uint64_t)m->buf_iova, (unsigned)m->buf_len);
-	fprintf(f, "  pkt_len=%"PRIu32", ol_flags=%"PRIx64", nb_segs=%u, "
-	       "in_port=%u\n", m->pkt_len, m->ol_flags,
-	       (unsigned)m->nb_segs, (unsigned)m->port);
+	fprintf(f, "dump mbuf at %p, iova=%"PRIx64", buf_len=%u,"
+		" offs=%u, refcnt=%u\n",
+		m, (uint64_t)m->buf_iova, (unsigned)m->buf_len,
+		(unsigned)m->data_off, (unsigned)rte_mbuf_refcnt_read(m));
+	fprintf(f, "  pkt_len=%u, ol_flags=%#"PRIx64","
+		" nb_segs=%u, in_port=%u, vlan_tci=%#x\n",
+		(unsigned)m->pkt_len, m->ol_flags,
+		(unsigned)m->nb_segs, (unsigned)m->port, (unsigned)m->vlan_tci);
 	nb_segs = m->nb_segs;
 
 	while (m && nb_segs != 0) {
-- 
2.20.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, back to index

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-20 17:41 [dpdk-dev] [PATCH] mbuf: display more fields in dump Stephen Hemminger
2019-11-21 16:16 ` Morten Brørup
2019-11-21 16:43   ` Stephen Hemminger
2019-11-21 18:30 ` [dpdk-dev] [PATCH v2] " Stephen Hemminger
2019-11-22 12:31   ` Andrew Rybchenko
2019-12-26 16:15   ` Olivier Matz
2019-12-26 16:58     ` Stephen Hemminger
2019-12-27  9:10       ` Olivier Matz
2019-12-27 17:05         ` Stephen Hemminger
2019-12-30  8:11           ` Olivier Matz
2020-01-22 17:39 ` [dpdk-dev] [PATCH v3] " Stephen Hemminger
2020-02-06  9:48   ` Olivier Matz
2020-02-06 14:32     ` Thomas Monjalon

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox