diff options
author | Joe Perches <joe@perches.com> | 2014-11-11 13:59:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-11 14:10:31 -0500 |
commit | ba7a46f16dd29f93303daeb1fee8af316c5a07f4 (patch) | |
tree | 72568f33fadf0b75d02f6e30bca1404a5aae2530 /net/ipv4/icmp.c | |
parent | 5b61c4db49e2530ed10631321d4c73f49d560a93 (diff) |
net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited
Use the more common dynamic_debug capable net_dbg_ratelimited
and remove the LIMIT_NETDEBUG macro.
All messages are still ratelimited.
Some KERN_<LEVEL> uses are changed to KERN_DEBUG.
This may have some negative impact on messages that were
emitted at KERN_INFO that are not not enabled at all unless
DEBUG is defined or dynamic_debug is enabled. Even so,
these messages are now _not_ emitted by default.
This also eliminates the use of the net_msg_warn sysctl
"/proc/sys/net/core/warnings". For backward compatibility,
the sysctl is not removed, but it has no function. The extern
declaration of net_msg_warn is removed from sock.h and made
static in net/core/sysctl_net_core.c
Miscellanea:
o Update the sysctl documentation
o Remove the embedded uses of pr_fmt
o Coalesce format fragments
o Realign arguments
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r-- | net/ipv4/icmp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 5882f584910e..36b7bfa609d6 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -784,8 +784,8 @@ static void icmp_unreach(struct sk_buff *skb) | |||
784 | */ | 784 | */ |
785 | switch (net->ipv4.sysctl_ip_no_pmtu_disc) { | 785 | switch (net->ipv4.sysctl_ip_no_pmtu_disc) { |
786 | default: | 786 | default: |
787 | LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: fragmentation needed and DF set\n"), | 787 | net_dbg_ratelimited("%pI4: fragmentation needed and DF set\n", |
788 | &iph->daddr); | 788 | &iph->daddr); |
789 | break; | 789 | break; |
790 | case 2: | 790 | case 2: |
791 | goto out; | 791 | goto out; |
@@ -798,8 +798,8 @@ static void icmp_unreach(struct sk_buff *skb) | |||
798 | } | 798 | } |
799 | break; | 799 | break; |
800 | case ICMP_SR_FAILED: | 800 | case ICMP_SR_FAILED: |
801 | LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: Source Route Failed\n"), | 801 | net_dbg_ratelimited("%pI4: Source Route Failed\n", |
802 | &iph->daddr); | 802 | &iph->daddr); |
803 | break; | 803 | break; |
804 | default: | 804 | default: |
805 | break; | 805 | break; |