From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f43.google.com (mail-oi0-f43.google.com [209.85.218.43]) by dpdk.org (Postfix) with ESMTP id 859F9ADB9 for ; Mon, 23 Feb 2015 17:43:07 +0100 (CET) Received: by mail-oi0-f43.google.com with SMTP id z81so14440612oif.2 for ; Mon, 23 Feb 2015 08:43:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=iV3esNRpqJ0HBqm4N14gkZOy1LTwcIT1NFy/3UMFUgQ=; b=Gao0C6/ShsPH6J1fWVCjzrLWrMNuLDKE5B0Wl5tR405xz6E+AS3cY2TI5Z+QXBXz2U kXldMfe5k6B79/uFvNzHjic9hbBdwWY/WEMzOTledk1ufCXuGAZZkSdPzax+jl61iI0a xJkqSTnMwFokvBbYzK5E9lnUGr0DNncuCJHfUujcofNB9a6gQbhMjtX9KB280vG1Na6G piDz39nkhe3QVSjAiloX9ihfwMMEnkV8/ul2YD/LC3eHdcNJlYM9fz7WBH+p9Kg3FcCq KvH6T8Dl/mFIQKvojIsSCli/SvSdxOtucvGbLJSMBiJU7zWAfMNjcbqNoLFAFilGa4mK AFSg== X-Gm-Message-State: ALoCoQmW82ehNRls4JnlIAXCYN+gIm8DnkxAcJ+WG5RAK9Yl8rnkSFRSUSdmnNa7qwJ6TMe+h1sm MIME-Version: 1.0 X-Received: by 10.202.129.70 with SMTP id c67mr7612517oid.46.1424709786920; Mon, 23 Feb 2015 08:43:06 -0800 (PST) Received: by 10.76.133.162 with HTTP; Mon, 23 Feb 2015 08:43:06 -0800 (PST) In-Reply-To: <20150214162822.GA14643@neilslaptop.think-freely.org> References: <1423927979-13607-1-git-send-email-shemming@brocade.com> <20150214162822.GA14643@neilslaptop.think-freely.org> Date: Mon, 23 Feb 2015 17:43:06 +0100 Message-ID: From: David Marchand To: Neil Horman Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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: Mon, 23 Feb 2015 16:43:07 -0000 On Sat, Feb 14, 2015 at 5:28 PM, Neil Horman wrote: > 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 > Use of rte_log would be better for init messages, but since the driver makes no difference, this looks good enough to me. Thanks Stephen. Acked-by: David Marchand -- David Marchand