DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Subject: [dpdk-dev] 32-bit compilation & debug logs
Date: Tue, 13 Feb 2018 21:59:05 +0100	[thread overview]
Message-ID: <1626400.QN1GMNLe81@xps> (raw)

Hi all,

There is a very common pattern with build failures in DPDK.
When compiling in 32-bit mode, there are some mismatches between
printf format "%lu" / "%lx" and the size of the data being 64-bit.
In 32-bit mode, a long is 32 bits long :)
That's why "%lx" must be replaced by "%" PRIx64.

	long     -> %lx
	uint64_t -> %PRIx64

Most of the times, using %l is wrong (except when printing a long).
So next time you write %l, please think "I am probably wrong".

For the existing codebase, please grep "%l".
There are probably some remaining wrong "%l" which are not detected
when compiling, because the code is in debug functions never enabled.
Note that debug code should be tested but there can be some forgotten
code paths.

Thanks

             reply	other threads:[~2018-02-13 20:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 20:59 Thomas Monjalon [this message]
2018-02-26 18:55 ` Burakov, Anatoly

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1626400.QN1GMNLe81@xps \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).