[dpdk-dev] don't use printf!

Stephen Hemminger stephen at networkplumber.org
Wed Mar 9 19:28:26 CET 2016


One thing I noticed while fixing mempool bug, was that there was a printf
in the library there. A reminder, code in DPDK library should never call printf
directly. printf in a real application is often ratholed off to /dev/null
and real output is through API's or syslog.

Offenders now:
 rte_mempool
 rte_acl
 rte_cfgfile

I would fix rte_acl but it would require API breakage.
rte_acl_dump should take a FILE *


Some places have printf in debug path, which is less bad, but
still limits usage of DEBUG options
 rte_sched
 rte_timer

There are also several places in the BSD support, but I care less about those.


More information about the dev mailing list