DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemming@brocade.com>
To: <ssujith@cisco.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled
Date: Thu, 30 Jul 2015 10:03:38 -0700	[thread overview]
Message-ID: <20150730100338.76cd581b@urahara> (raw)
In-Reply-To: <1428514670-7982-2-git-send-email-stephen@networkplumber.org>

This blocks the annoying ENIC driver initialization message unless
debug is enabled. Drivers should speak only when spoken to and not
be chatty.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/enic/enic_compat.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/enic/enic_compat.h b/drivers/net/enic/enic_compat.h
index f3598ed..94656c8 100644
--- a/drivers/net/enic/enic_compat.h
+++ b/drivers/net/enic/enic_compat.h
@@ -82,7 +82,11 @@
 #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)
+#ifdef RTE_LIBRTE_ENIC_DEBUG
 #define dev_debug(x, args...) dev_printk(DEBUG, args)
+#else
+#define dev_debug(x, args...) do { } while(0)
+#endif
 
 #define __le16 u16
 #define __le32 u32
-- 
2.1.4

  parent reply	other threads:[~2015-07-30 17:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 17:37 [dpdk-dev] [PATCH 0/2] small changes Stephen Hemminger
2015-04-08 17:37 ` [dpdk-dev] [PATCH 1/2] enic: silence log message Stephen Hemminger
2015-05-19 10:08   ` Bruce Richardson
2015-05-20 16:30     ` Sujith Sankar (ssujith)
2015-05-20 17:47       ` Stephen Hemminger
2015-05-21  1:52         ` Sujith Sankar (ssujith)
2015-07-30 17:03   ` Stephen Hemminger [this message]
2015-07-30 19:18     ` [dpdk-dev] [PATCH v2] enic: silence log message unless debug enabled Thomas Monjalon
2015-04-08 17:37 ` [dpdk-dev] [PATCH 2/2] tools: fix comment in bind script Stephen Hemminger
2015-04-15  9:43   ` Bruce Richardson
2015-08-03 16:38     ` 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=20150730100338.76cd581b@urahara \
    --to=shemming@brocade.com \
    --cc=dev@dpdk.org \
    --cc=ssujith@cisco.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).