DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>, ssujith@cisco.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] enic: disable debug traces
Date: Mon, 13 Apr 2015 22:12:32 +0200	[thread overview]
Message-ID: <4095386.TaJDB5L0j8@xps13> (raw)
In-Reply-To: <20150409083223.GF32147@6wind.com>

2015-04-09 10:32, Adrien Mazarguil:
> On Tue, Apr 07, 2015 at 07:40:19PM +0200, Thomas Monjalon wrote:
> > The function name is printed in each enic_ethdev function.
> > Disable it by default with a new build option.
> > 
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
[...]
> > --- a/lib/librte_pmd_enic/enic_ethdev.c
> > +++ b/lib/librte_pmd_enic/enic_ethdev.c
> > @@ -48,8 +48,12 @@
> >  #include "vnic_enet.h"
> >  #include "enic.h"
> >  
> > +#ifdef RTE_LIBRTE_ENIC_DEBUG
> >  #define ENICPMD_FUNC_TRACE() \
> >  	RTE_LOG(DEBUG, PMD, "ENICPMD trace: %s\n", __func__)
> > +#else
> > +#define ENICPMD_FUNC_TRACE() do {} while (0)
> 
> How about defining it as (void)0 instead of an empty do/while block?
> 
> Doing so will prevent warnings if this macro happens to be used in an
> expression. RTE_LOG() supports it.

Applied with Adrien's suggestion.

      parent reply	other threads:[~2015-04-13 20:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 17:40 Thomas Monjalon
2015-04-08  3:29 ` Sujith Sankar (ssujith)
2015-04-09  8:32 ` Adrien Mazarguil
2015-04-09 16:28   ` Stephen Hemminger
2015-04-13 10:32     ` Adrien Mazarguil
2015-04-13 20:12   ` 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=4095386.TaJDB5L0j8@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=ssujith@cisco.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).