DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Ouyang Changchun <changchun.ouyang@intel.com>, huawei.xie@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] vhost: Fix compilation issue
Date: Tue, 12 May 2015 11:23:47 +0200	[thread overview]
Message-ID: <2042841.HJ0llvHanu@xps13> (raw)
In-Reply-To: <1430723719-27999-1-git-send-email-changchun.ouyang@intel.com>

> 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@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

      reply	other threads:[~2015-05-12  9:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-04  7:15 Ouyang Changchun
2015-05-12  9:23 ` Thomas Monjalon [this message]

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=2042841.HJ0llvHanu@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=changchun.ouyang@intel.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    /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).