All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH] mbuf: rte_pktmbuf_dump: don't add 0x when using %p in format strings
@ 2016-06-20 10:44 Simon Kagstrom
  2016-06-20 16:19 ` Stephen Hemminger
  2016-06-23 21:26 ` Thomas Monjalon
  0 siblings, 2 replies; 9+ messages in thread
From: Simon Kagstrom @ 2016-06-20 10:44 UTC (permalink / raw)
  To: olivier.matz, dev

I.e., avoid dump messages with double 0x0x, e.g.,

  dump mbuf at 0x0x7fac7b17c800, phys=17b17c880, buf_len=2176
    pkt_len=2064, ol_flags=0, nb_segs=1, in_port=255
    segment at 0x0x7fac7b17c800, data=0x0x7fac7b17c8f0, data_len=2064

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
 lib/librte_mbuf/rte_mbuf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index dc0467c..523e219 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -218,7 +218,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 
 	__rte_mbuf_sanity_check(m, 1);
 
-	fprintf(f, "dump mbuf at 0x%p, phys=%"PRIx64", buf_len=%u\n",
+	fprintf(f, "dump mbuf at %p, phys=%"PRIx64", buf_len=%u\n",
 	       m, (uint64_t)m->buf_physaddr, (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,
@@ -228,7 +228,7 @@ rte_pktmbuf_dump(FILE *f, const struct rte_mbuf *m, unsigned dump_len)
 	while (m && nb_segs != 0) {
 		__rte_mbuf_sanity_check(m, 0);
 
-		fprintf(f, "  segment at 0x%p, data=0x%p, data_len=%u\n",
+		fprintf(f, "  segment at %p, data=%p, data_len=%u\n",
 			m, rte_pktmbuf_mtod(m, void *), (unsigned)m->data_len);
 		len = dump_len;
 		if (len > m->data_len)
-- 
1.9.1

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

end of thread, other threads:[~2016-06-24 16:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-20 10:44 PATCH] mbuf: rte_pktmbuf_dump: don't add 0x when using %p in format strings Simon Kagstrom
2016-06-20 16:19 ` Stephen Hemminger
2016-06-21 13:11   ` Ferruh Yigit
2016-06-22  7:08     ` Simon Kågström
2016-06-23 10:52       ` [PATCH] vmxnet3: remove 0x prefix for %p format Ferruh Yigit
2016-06-23 20:45         ` Yong Wang
2016-06-24 16:44           ` Bruce Richardson
2016-06-23 10:58       ` PATCH] mbuf: rte_pktmbuf_dump: don't add 0x when using %p in format strings Ferruh Yigit
2016-06-23 21:26 ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.