* [PATCH 1/2] enic: replace use of printf with log
@ 2015-02-14 15:32 Stephen Hemminger
[not found] ` <1423927979-13607-1-git-send-email-shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2015-02-14 15:32 UTC (permalink / raw)
To: dev-VfR2kkLFssw; +Cc: Stephen Hemminger
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-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.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
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <1423927979-13607-1-git-send-email-shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org>]
* [PATCH 2/2] enic: change probe log message level [not found] ` <1423927979-13607-1-git-send-email-shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org> @ 2015-02-14 15:32 ` Stephen Hemminger 2015-02-14 16:28 ` [PATCH 1/2] enic: replace use of printf with log Neil Horman 1 sibling, 0 replies; 5+ messages in thread From: Stephen Hemminger @ 2015-02-14 15:32 UTC (permalink / raw) To: dev-VfR2kkLFssw; +Cc: Stephen Hemminger Drivers should be silent on boot. Signed-off-by: Stephen Hemminger <stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> --- lib/librte_pmd_enic/enic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_pmd_enic/enic_main.c b/lib/librte_pmd_enic/enic_main.c index 48fdca2..c66f139 100644 --- a/lib/librte_pmd_enic/enic_main.c +++ b/lib/librte_pmd_enic/enic_main.c @@ -1046,7 +1046,7 @@ int enic_probe(struct enic *enic) struct rte_pci_device *pdev = enic->pdev; int err = -1; - dev_info(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION); + dev_debug(enic, " Initializing ENIC PMD version %s\n", DRV_VERSION); enic->bar0.vaddr = (void *)pdev->mem_resource[0].addr; enic->bar0.len = pdev->mem_resource[0].len; -- 2.1.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] enic: replace use of printf with log [not found] ` <1423927979-13607-1-git-send-email-shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org> 2015-02-14 15:32 ` [PATCH 2/2] enic: change probe log message level Stephen Hemminger @ 2015-02-14 16:28 ` Neil Horman [not found] ` <20150214162822.GA14643-0o1r3XBGOEbbgkc5XkKeNuvMHUBZFtU3YPYVAmT7z5s@public.gmane.org> 1 sibling, 1 reply; 5+ messages in thread From: Neil Horman @ 2015-02-14 16:28 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev-VfR2kkLFssw, Stephen Hemminger 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-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.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-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20150214162822.GA14643-0o1r3XBGOEbbgkc5XkKeNuvMHUBZFtU3YPYVAmT7z5s@public.gmane.org>]
* Re: [PATCH 1/2] enic: replace use of printf with log [not found] ` <20150214162822.GA14643-0o1r3XBGOEbbgkc5XkKeNuvMHUBZFtU3YPYVAmT7z5s@public.gmane.org> @ 2015-02-23 16:43 ` David Marchand [not found] ` <CALwxeUti=ykMWDLA0X4jKRv9MTwv9tfbsBefhRRuj=QyYu-=NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: David Marchand @ 2015-02-23 16:43 UTC (permalink / raw) To: Neil Horman; +Cc: dev-VfR2kkLFssw@public.gmane.org, Stephen Hemminger On Sat, Feb 14, 2015 at 5:28 PM, Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> 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-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.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-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> > 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> -- David Marchand ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <CALwxeUti=ykMWDLA0X4jKRv9MTwv9tfbsBefhRRuj=QyYu-=NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 1/2] enic: replace use of printf with log [not found] ` <CALwxeUti=ykMWDLA0X4jKRv9MTwv9tfbsBefhRRuj=QyYu-=NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2015-02-24 2:37 ` Thomas Monjalon 0 siblings, 0 replies; 5+ messages in thread From: Thomas Monjalon @ 2015-02-24 2:37 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev-VfR2kkLFssw > > > 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-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> > > > > Series > > Acked-by: Neil Horman <nhorman-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> > > 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-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> Applied, thanks ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-24 2:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-14 15:32 [PATCH 1/2] enic: replace use of printf with log Stephen Hemminger
[not found] ` <1423927979-13607-1-git-send-email-shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org>
2015-02-14 15:32 ` [PATCH 2/2] enic: change probe log message level Stephen Hemminger
2015-02-14 16:28 ` [PATCH 1/2] enic: replace use of printf with log Neil Horman
[not found] ` <20150214162822.GA14643-0o1r3XBGOEbbgkc5XkKeNuvMHUBZFtU3YPYVAmT7z5s@public.gmane.org>
2015-02-23 16:43 ` David Marchand
[not found] ` <CALwxeUti=ykMWDLA0X4jKRv9MTwv9tfbsBefhRRuj=QyYu-=NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-02-24 2:37 ` Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox