From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] enic: disable debug traces Date: Mon, 13 Apr 2015 22:12:32 +0200 Message-ID: <4095386.TaJDB5L0j8@xps13> References: <1428428419-25145-1-git-send-email-thomas.monjalon@6wind.com> <20150409083223.GF32147@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Adrien Mazarguil , ssujith-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org Return-path: In-Reply-To: <20150409083223.GF32147-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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 [...] > > --- 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.