From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 3FC42B4CE for ; Sat, 14 Feb 2015 17:28:33 +0100 (CET) Received: from [67.210.173.2] (helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YMfa1-0000LV-9P; Sat, 14 Feb 2015 11:28:31 -0500 Date: Sat, 14 Feb 2015 11:28:22 -0500 From: Neil Horman To: Stephen Hemminger Message-ID: <20150214162822.GA14643@neilslaptop.think-freely.org> References: <1423927979-13607-1-git-send-email-shemming@brocade.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1423927979-13607-1-git-send-email-shemming@brocade.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: dev@dpdk.org, Stephen Hemminger Subject: Re: [dpdk-dev] [PATCH 1/2] enic: replace use of printf with log 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: Sat, 14 Feb 2015 16:28:33 -0000 On Sat, Feb 14, 2015 at 10:32:58AM -0500, Stephen Hemminger wrote: > Device driver should log via DPDK log, not to printf which is > sends to /dev/null in a daemon application. > > Signed-off-by: Stephen Hemminger > --- > lib/librte_pmd_enic/enic_compat.h | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/lib/librte_pmd_enic/enic_compat.h b/lib/librte_pmd_enic/enic_compat.h > index b1af838..c3ab76e 100644 > --- a/lib/librte_pmd_enic/enic_compat.h > +++ b/lib/librte_pmd_enic/enic_compat.h > @@ -75,10 +75,13 @@ > #define kzalloc(size, flags) calloc(1, size) > #define kfree(x) free(x) > > -#define dev_err(x, args...) printf("rte_enic_pmd : Error - " args) > -#define dev_info(x, args...) printf("rte_enic_pmd: Info - " args) > -#define dev_warning(x, args...) printf("rte_enic_pmd: Warning - " args) > -#define dev_trace(x, args...) printf("rte_enic_pmd: Trace - " args) > +#define dev_printk(level, fmt, args...) \ > + RTE_LOG(level, PMD, "rte_enic_pmd:" fmt, ## args) > + > +#define dev_err(x, args...) dev_printk(ERR, args) > +#define dev_info(x, args...) dev_printk(INFO, args) > +#define dev_warning(x, args...) dev_printk(WARNING, args) > +#define dev_debug(x, args...) dev_printk(DEBUG, args) > > #define __le16 u16 > #define __le32 u32 > -- > 2.1.4 > > Series Acked-by: Neil Horman