From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id 8DE1DC40E for ; Mon, 13 Apr 2015 22:13:14 +0200 (CEST) Received: by wgsk9 with SMTP id k9so93535058wgs.3 for ; Mon, 13 Apr 2015 13:13:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=A1t4rp0FeMXjwS43hSvlYmut/HdoqS1en0DxfEr8LBQ=; b=ajYaIc4Fm/7dt99usOe7qvhvZPJJf2IDrfsYppqIQzW2Yn4BwKkxUjP7IVmPwK4eVc bf9/gXO6Y6dzKKMU8lsJbsHuNp/6/fgfjfwXg+uq1YJ2t2Mcgf4EZiKISMUxhWS4z71Z dPpY/CWROYoJJL4u9G/SdO8qz5YUgbf0Wzad1Ity0XymPibSl9E0/Q1dilrkJzp4qooC G5MoZbifl4jaZXXtHrJiMgPLTAyQpsaV/Y5OwQQ+0ki1VfDMyYW/BqBGvXiHLcxsJIws 0bcW66L3kqPS7MDGDwYKG9MC3ZKOVKFVWyauNLPeDfuWPk0njH9BjSM2z/qclfsk0SNG KViw== X-Gm-Message-State: ALoCoQnNNcJJDd5+gNlqMJjfI1Pt5BWEbNz4R/m4Y7ll2p70lLsJtBBK8YIWqrksvx4ap3pC4hC8 X-Received: by 10.194.143.20 with SMTP id sa20mr30255537wjb.16.1428955994425; Mon, 13 Apr 2015 13:13:14 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id w5sm12917470wiz.11.2015.04.13.13.13.13 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Apr 2015 13:13:13 -0700 (PDT) From: Thomas Monjalon To: Adrien Mazarguil , ssujith@cisco.com Date: Mon, 13 Apr 2015 22:12:32 +0200 Message-ID: <4095386.TaJDB5L0j8@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: <20150409083223.GF32147@6wind.com> References: <1428428419-25145-1-git-send-email-thomas.monjalon@6wind.com> <20150409083223.GF32147@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] enic: disable debug traces X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Apr 2015 20:13:14 -0000 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.