From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ernst.netinsight.se (ernst.netinsight.se [194.16.221.21]) by dpdk.org (Postfix) with SMTP id 6E7A09AA7 for ; Mon, 20 Jun 2016 12:44:44 +0200 (CEST) Received: from miho (unverified [10.100.1.152]) by ernst.netinsight.se (EMWAC SMTPRS 0.83) with SMTP id ; Mon, 20 Jun 2016 12:45:15 +0200 Date: Mon, 20 Jun 2016 12:44:35 +0200 From: Simon Kagstrom To: olivier.matz@6wind.com, dev@dpdk.org Message-ID: <20160620124435.23d43f28@miho> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.27; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] PATCH] mbuf: rte_pktmbuf_dump: don't add 0x when using %p in format strings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2016 10:44:44 -0000 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 --- 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