From: Simon Kagstrom Date: Mon, 20 Jun 2016 10:44:35 +0000 (+0200) Subject: mbuf: fix dump format X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=5590a60241d254f46fce973efb8b55e8712f75f5;p=dpdk.git mbuf: fix dump format Do not add 0x when using %p in format strings to 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 --- diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 8cf54361dc..250a00ca9a 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -236,7 +236,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, @@ -246,7 +246,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)