[dpdk-dev] [PATCH] vhost: Fix compilation issue
Thomas Monjalon
thomas.monjalon at 6wind.com
Tue May 12 11:23:47 CEST 2015
> Minor fix for the referring of a pointer when debug and dump is enabled.
> The original commit is: 72ec8d77
>
> Signed-off-by: Changchun Ouyang <changchun.ouyang at intel.com>
Applied, thanks
This bug was not seen before because it was disabled:
examples/vhost/main.h: //#define DEBUG
That's why we must avoid putting some code in #if blocks.
Please use log levels when possible.
If you absolutely want a compile-time option (other than CONFIG_RTE_LOG_LEVEL),
please put it in the config file instead of commenting a #define in a header file.
In this case, it should be handled only with CONFIG_RTE_LOG_LEVEL.
I think we can assume the debug level will have an impact on datapath performance.
And maybe we should raise the default log level to RTE_LOG_NOTICE.
Last comment about logs in vhost example: CONFIG_RTE_LOG_LEVEL should be used
to define the macro PRINT_PACKET. In case of debug level at compile-time, it
should call a function checking the runtime log level as in rte_vlog().
Please, let's avoid defining entirely a function in a macro, it's ugly.
Thanks
More information about the dev
mailing list