From: Joe Perches <joe@perches.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Gerrit Renker <gerrit@erg.abdn.ac.uk>
Subject: [PATCH net-next] dccp: Convert DCCP_WARN to net_warn_ratelimited
Date: Thu, 06 Nov 2014 12:53:41 -0800 [thread overview]
Message-ID: <1415307221.21526.0.camel@perches.com> (raw)
In-Reply-To: <20141106.151149.1321164537677873976.davem@davemloft.net>
Remove the dependency on the "warning" sysctl (net_msg_warn)
which is only used by the LIMIT_NETDEBUG macro.
Convert the LIMIT_NETDEBUG use in DCCP_WARN to the more
common net_warn_ratelimited mechanism.
This still ratelimits based on the net_ratelimit()
function, but removes the check for the sysctl.
Signed-off-by: Joe Perches <joe@perches.com>
---
On Thu, 2014-11-06 at 15:11 -0500, David Miller wrote:
> Applied, thanks for doing this work Joe.
No worries.
What about the LIMIT_NETDEBUG stuff now?
Maybe all of them might as well be net_dbg_ratelimited
even if it changes some of the logging levels.
Probably DCCP_WARN should be net_warn_ratelimited
so let's start there...
net/dccp/dccp.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index c678166..e4c144f 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -22,8 +22,8 @@
/*
* DCCP - specific warning and debugging macros.
*/
-#define DCCP_WARN(fmt, a...) LIMIT_NETDEBUG(KERN_WARNING "%s: " fmt, \
- __func__, ##a)
+#define DCCP_WARN(fmt, ...) \
+ net_warn_ratelimited("%s: " fmt, __func__, ##__VA_ARGS__)
#define DCCP_CRIT(fmt, a...) printk(KERN_CRIT fmt " at %s:%d/%s()\n", ##a, \
__FILE__, __LINE__, __func__)
#define DCCP_BUG(a...) do { DCCP_CRIT("BUG: " a); dump_stack(); } while(0)
next prev parent reply other threads:[~2014-11-06 20:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 23:36 [PATCH net-next] net: esp: Convert NETDEBUG to pr_info Joe Perches
2014-11-05 23:42 ` [PATCH net-next] sock.h: Remove unused NETDEBUG macro Joe Perches
2014-11-06 20:11 ` David Miller
2014-11-06 20:53 ` Joe Perches [this message]
2014-11-09 1:42 ` [PATCH net-next] dccp: Convert DCCP_WARN to net_warn_ratelimited David Miller
2014-11-09 19:17 ` [RFC PATCH net-next] net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited Joe Perches
2014-11-10 14:27 ` Nicolas Dichtel
2014-11-10 15:26 ` Joe Perches
2014-11-11 18:30 ` David Miller
2014-11-11 18:59 ` [PATCH V2 " Joe Perches
2014-11-11 19:18 ` David Miller
2014-11-06 20:11 ` [PATCH net-next] net: esp: Convert NETDEBUG to pr_info David Miller
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=1415307221.21526.0.camel@perches.com \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=gerrit@erg.abdn.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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).