DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] 32-bit compilation & debug logs
@ 2018-02-13 20:59 Thomas Monjalon
  2018-02-26 18:55 ` Burakov, Anatoly
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Monjalon @ 2018-02-13 20:59 UTC (permalink / raw)
  To: dev

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

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

end of thread, other threads:[~2018-02-26 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-13 20:59 [dpdk-dev] 32-bit compilation & debug logs Thomas Monjalon
2018-02-26 18:55 ` Burakov, Anatoly

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).