From: David Marchand <david.marchand@6wind.com>
To: Neil Horman <nhorman@tuxdriver.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, Stephen Hemminger <shemming@brocade.com>
Subject: Re: [dpdk-dev] [PATCH 1/2] enic: replace use of printf with log
Date: Mon, 23 Feb 2015 17:43:06 +0100 [thread overview]
Message-ID: <CALwxeUti=ykMWDLA0X4jKRv9MTwv9tfbsBefhRRuj=QyYu-=NQ@mail.gmail.com> (raw)
In-Reply-To: <20150214162822.GA14643@neilslaptop.think-freely.org>
On Sat, Feb 14, 2015 at 5:28 PM, Neil Horman <nhorman@tuxdriver.com> 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 <stephen@networkplumber.org>
> > ---
> > 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 <nhorman@tuxdriver.com>
>
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@6wind.com>
--
David Marchand
next prev parent reply other threads:[~2015-02-23 16:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-14 15:32 Stephen Hemminger
2015-02-14 15:32 ` [dpdk-dev] [PATCH 2/2] enic: change probe log message level Stephen Hemminger
2015-02-14 16:28 ` [dpdk-dev] [PATCH 1/2] enic: replace use of printf with log Neil Horman
2015-02-23 16:43 ` David Marchand [this message]
2015-02-24 2:37 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CALwxeUti=ykMWDLA0X4jKRv9MTwv9tfbsBefhRRuj=QyYu-=NQ@mail.gmail.com' \
--to=david.marchand@6wind.com \
--cc=dev@dpdk.org \
--cc=nhorman@tuxdriver.com \
--cc=shemming@brocade.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).