[dpdk-dev] [PATCH 5/5] add FILE arguement to debug functions

Burakov, Anatoly anatoly.burakov at intel.com
Tue May 6 14:52:56 CEST 2014


Hi Stephen,

> The DPDK dump functions are useful for remote debugging of an
> applications. But when application runs as a daemon, stdout
> is typically routed to /dev/null.
> 
> Instead change all these functions to take a stdio FILE * handle
> instead. An application can then use open_memstream() to capture
> the output.
> 

Wouldn't it be better to leave old calls as wrappers with the FILE parameter defaulting to stdout? That way you wouldn't have to change so much code, keep backwards compatibility with old code, and get the additional functionality you need.

Best regards,
Anatoly Burakov
DPDK SW Engineer





More information about the dev mailing list