From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by dpdk.org (Postfix) with ESMTP id DD3122E41 for ; Thu, 9 Apr 2015 10:32:25 +0200 (CEST) Received: by wgsk9 with SMTP id k9so89838783wgs.3 for ; Thu, 09 Apr 2015 01:32:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to; bh=Nxzu03Qra+ijfc7MOwI0jq9WTiv7NotnpzMHhq5l7r0=; b=iP2ywlQX5h8CcaocIAWdfp/qlXHmw+lSJ6ZFyDNa79EgDgZzwX6PtN6HIWk2U1cjYZ cZg7G9cTOubrRIvK7/KrvnIeYhzUwXb3oK41xqEwOtC9spWkJ/g/Ylli//rTS5uSq98K yChqBE4DYqYvQyQxkgvJHpzB3BTvjHs9TUb8obrXLvIcCYX7GBjkNAo0IwBs6jcYLEbV jYrJ9eVF8TwHQPUwR7rkx3tacM6pEOA1PmKSP9rsetnRVTBynVKnVWe7lLQ/1jtVhfjJ gQP88WCclSzBWhaIIEZgYqtVD9hQ3yjSYHqvTTOZuplnkBOP5ri9qAoGeVKkPgkMk0wg mp4Q== X-Gm-Message-State: ALoCoQkXr5FOBPBUj1rFrowGydiFLiLWXVqSc9I1Up5m+qVAn2Tiwgm5i1SsPQBvKfENrjb6qbox X-Received: by 10.180.108.81 with SMTP id hi17mr4018361wib.91.1428568345728; Thu, 09 Apr 2015 01:32:25 -0700 (PDT) Received: from 6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id ks2sm19041382wjb.29.2015.04.09.01.32.24 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 09 Apr 2015 01:32:24 -0700 (PDT) Date: Thu, 9 Apr 2015 10:32:24 +0200 From: Adrien Mazarguil To: Thomas Monjalon Message-ID: <20150409083223.GF32147@6wind.com> Mail-Followup-To: Thomas Monjalon , ssujith@cisco.com, dev@dpdk.org References: <1428428419-25145-1-git-send-email-thomas.monjalon@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1428428419-25145-1-git-send-email-thomas.monjalon@6wind.com> 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: Thu, 09 Apr 2015 08:32:26 -0000 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 > --- > config/common_bsdapp | 1 + > config/common_linuxapp | 1 + > lib/librte_pmd_enic/enic_ethdev.c | 4 ++++ > 3 files changed, 6 insertions(+) > > diff --git a/config/common_bsdapp b/config/common_bsdapp > index a8ba484..c2374c0 100644 > --- a/config/common_bsdapp > +++ b/config/common_bsdapp > @@ -214,6 +214,7 @@ CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1 > # Compile burst-oriented Cisco ENIC PMD driver > # > CONFIG_RTE_LIBRTE_ENIC_PMD=y > +CONFIG_RTE_LIBRTE_ENIC_DEBUG=n > > # > # Compile burst-oriented VIRTIO PMD driver > diff --git a/config/common_linuxapp b/config/common_linuxapp > index 0b25f34..0078dc9 100644 > --- a/config/common_linuxapp > +++ b/config/common_linuxapp > @@ -211,6 +211,7 @@ CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1 > # Compile burst-oriented Cisco ENIC PMD driver > # > CONFIG_RTE_LIBRTE_ENIC_PMD=y > +CONFIG_RTE_LIBRTE_ENIC_DEBUG=n > > # > # Compile burst-oriented VIRTIO PMD driver > diff --git a/lib/librte_pmd_enic/enic_ethdev.c b/lib/librte_pmd_enic/enic_ethdev.c > index 4950ede..18fadfb 100644 > --- 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. > +#endif > > /* > * The set of PCI devices this driver supports > -- > 2.2.2 -- Adrien Mazarguil 6WIND