diff options
| author | Joe Perches <joe@perches.com> | 2012-03-12 03:03:32 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2012-03-12 20:05:21 -0400 |
| commit | afd465030acb4098abcb6b965a5aebc7ea2209e0 (patch) | |
| tree | 59c93e8eda99cd59339dfbb77f1d2c4f79c634ee | |
| parent | 058bd4d2a4ff0aaa4a5381c67e776729d840c785 (diff) | |
net: ipv4: Standardize prefixes for message logging
Add #define pr_fmt(fmt) as appropriate.
Add "IPv4: ", "TCP: ", and "IPsec: " to appropriate files.
Standardize on "UDPLite: " for appropriate uses.
Some prefixes were previously "UDPLITE: " and "UDP-Lite: ".
Add KBUILD_MODNAME ": " to icmp and gre.
Remove embedded prefixes as appropriate.
Add missing "\n" to pr_info in gre.c.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
| -rw-r--r-- | include/net/udplite.h | 4 | ||||
| -rw-r--r-- | net/ipv4/af_inet.c | 2 | ||||
| -rw-r--r-- | net/ipv4/ah4.c | 9 | ||||
| -rw-r--r-- | net/ipv4/esp4.c | 2 | ||||
| -rw-r--r-- | net/ipv4/gre.c | 6 | ||||
| -rw-r--r-- | net/ipv4/icmp.c | 6 | ||||
| -rw-r--r-- | net/ipv4/ip_fragment.c | 8 | ||||
| -rw-r--r-- | net/ipv4/ip_gre.c | 2 | ||||
| -rw-r--r-- | net/ipv4/ip_input.c | 2 | ||||
| -rw-r--r-- | net/ipv4/ip_options.c | 2 | ||||
| -rw-r--r-- | net/ipv4/route.c | 4 | ||||
| -rw-r--r-- | net/ipv4/tcp.c | 11 | ||||
| -rw-r--r-- | net/ipv4/tcp_cong.c | 8 | ||||
| -rw-r--r-- | net/ipv4/tcp_input.c | 2 | ||||
| -rw-r--r-- | net/ipv4/tcp_ipv4.c | 6 | ||||
| -rw-r--r-- | net/ipv4/tcp_probe.c | 4 | ||||
| -rw-r--r-- | net/ipv4/tcp_timer.c | 14 | ||||
| -rw-r--r-- | net/ipv4/udp.c | 34 | ||||
| -rw-r--r-- | net/ipv4/udplite.c | 3 | ||||
| -rw-r--r-- | net/ipv4/xfrm4_tunnel.c | 2 |
20 files changed, 81 insertions, 50 deletions
diff --git a/include/net/udplite.h b/include/net/udplite.h index 5f097ca7d5c5..71375459a884 100644 --- a/include/net/udplite.h +++ b/include/net/udplite.h | |||
| @@ -40,7 +40,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) | |||
| 40 | * checksum. UDP-Lite (like IPv6) mandates checksums, hence packets | 40 | * checksum. UDP-Lite (like IPv6) mandates checksums, hence packets |
| 41 | * with a zero checksum field are illegal. */ | 41 | * with a zero checksum field are illegal. */ |
| 42 | if (uh->check == 0) { | 42 | if (uh->check == 0) { |
| 43 | LIMIT_NETDEBUG(KERN_DEBUG "UDPLITE: zeroed checksum field\n"); | 43 | LIMIT_NETDEBUG(KERN_DEBUG "UDPLite: zeroed checksum field\n"); |
| 44 | return 1; | 44 | return 1; |
| 45 | } | 45 | } |
| 46 | 46 | ||
| @@ -52,7 +52,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) | |||
| 52 | /* | 52 | /* |
| 53 | * Coverage length violates RFC 3828: log and discard silently. | 53 | * Coverage length violates RFC 3828: log and discard silently. |
| 54 | */ | 54 | */ |
| 55 | LIMIT_NETDEBUG(KERN_DEBUG "UDPLITE: bad csum coverage %d/%d\n", | 55 | LIMIT_NETDEBUG(KERN_DEBUG "UDPLite: bad csum coverage %d/%d\n", |
| 56 | cscov, skb->len); | 56 | cscov, skb->len); |
| 57 | return 1; | 57 | return 1; |
| 58 | 58 | ||
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index b7a946611f2f..fdf49fd44bb4 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
| @@ -65,6 +65,8 @@ | |||
| 65 | * 2 of the License, or (at your option) any later version. | 65 | * 2 of the License, or (at your option) any later version. |
| 66 | */ | 66 | */ |
| 67 | 67 | ||
| 68 | #define pr_fmt(fmt) "IPv4: " fmt | ||
| 69 | |||
| 68 | #include <linux/err.h> | 70 | #include <linux/err.h> |
| 69 | #include <linux/errno.h> | 71 | #include <linux/errno.h> |
| 70 | #include <linux/types.h> | 72 | #include <linux/types.h> |
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index b5524660c81d..fd508b526014 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #define pr_fmt(fmt) "IPsec: " fmt | ||
| 2 | |||
| 1 | #include <crypto/hash.h> | 3 | #include <crypto/hash.h> |
| 2 | #include <linux/err.h> | 4 | #include <linux/err.h> |
| 3 | #include <linux/module.h> | 5 | #include <linux/module.h> |
| @@ -445,9 +447,10 @@ static int ah_init_state(struct xfrm_state *x) | |||
| 445 | 447 | ||
| 446 | if (aalg_desc->uinfo.auth.icv_fullbits/8 != | 448 | if (aalg_desc->uinfo.auth.icv_fullbits/8 != |
| 447 | crypto_ahash_digestsize(ahash)) { | 449 | crypto_ahash_digestsize(ahash)) { |
| 448 | pr_info("AH: %s digestsize %u != %hu\n", | 450 | pr_info("%s: %s digestsize %u != %hu\n", |
| 449 | x->aalg->alg_name, crypto_ahash_digestsize(ahash), | 451 | __func__, x->aalg->alg_name, |
| 450 | aalg_desc->uinfo.auth.icv_fullbits/8); | 452 | crypto_ahash_digestsize(ahash), |
| 453 | aalg_desc->uinfo.auth.icv_fullbits / 8); | ||
| 451 | goto error; | 454 | goto error; |
| 452 | } | 455 | } |
| 453 | 456 | ||
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index 0a86dbe9454b..89a47b35905d 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
| @@ -1,3 +1,5 @@ | |||
| 1 | #define pr_fmt(fmt) "IPsec: " fmt | ||
| 2 | |||
| 1 | #include <crypto/aead.h> | 3 | #include <crypto/aead.h> |
| 2 | #include <crypto/authenc.h> | 4 | #include <crypto/authenc.h> |
| 3 | #include <linux/err.h> | 5 | #include <linux/err.h> |
diff --git a/net/ipv4/gre.c b/net/ipv4/gre.c index 8cb1ebb7cd74..42a491055c76 100644 --- a/net/ipv4/gre.c +++ b/net/ipv4/gre.c | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | * | 10 | * |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 14 | |||
| 13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
| 14 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
| 15 | #include <linux/kmod.h> | 17 | #include <linux/kmod.h> |
| @@ -118,10 +120,10 @@ static const struct net_protocol net_gre_protocol = { | |||
| 118 | 120 | ||
| 119 | static int __init gre_init(void) | 121 | static int __init gre_init(void) |
| 120 | { | 122 | { |
| 121 | pr_info("GRE over IPv4 demultiplexor driver"); | 123 | pr_info("GRE over IPv4 demultiplexor driver\n"); |
| 122 | 124 | ||
| 123 | if (inet_add_protocol(&net_gre_protocol, IPPROTO_GRE) < 0) { | 125 | if (inet_add_protocol(&net_gre_protocol, IPPROTO_GRE) < 0) { |
| 124 | pr_err("gre: can't add protocol\n"); | 126 | pr_err("can't add protocol\n"); |
| 125 | return -EAGAIN; | 127 | return -EAGAIN; |
| 126 | } | 128 | } |
| 127 | 129 | ||
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index 5c7323b7810f..9664d353ccd8 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
| @@ -62,6 +62,8 @@ | |||
| 62 | * | 62 | * |
| 63 | */ | 63 | */ |
| 64 | 64 | ||
| 65 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
| 66 | |||
| 65 | #include <linux/module.h> | 67 | #include <linux/module.h> |
| 66 | #include <linux/types.h> | 68 | #include <linux/types.h> |
| 67 | #include <linux/jiffies.h> | 69 | #include <linux/jiffies.h> |
| @@ -670,7 +672,7 @@ static void icmp_unreach(struct sk_buff *skb) | |||
| 670 | break; | 672 | break; |
| 671 | case ICMP_FRAG_NEEDED: | 673 | case ICMP_FRAG_NEEDED: |
| 672 | if (ipv4_config.no_pmtu_disc) { | 674 | if (ipv4_config.no_pmtu_disc) { |
| 673 | LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: fragmentation needed and DF set\n", | 675 | LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: fragmentation needed and DF set\n"), |
| 674 | &iph->daddr); | 676 | &iph->daddr); |
| 675 | } else { | 677 | } else { |
| 676 | info = ip_rt_frag_needed(net, iph, | 678 | info = ip_rt_frag_needed(net, iph, |
| @@ -681,7 +683,7 @@ static void icmp_unreach(struct sk_buff *skb) | |||
| 681 | } | 683 | } |
| 682 | break; | 684 | break; |
| 683 | case ICMP_SR_FAILED: | 685 | case ICMP_SR_FAILED: |
| 684 | LIMIT_NETDEBUG(KERN_INFO "ICMP: %pI4: Source Route Failed\n", | 686 | LIMIT_NETDEBUG(KERN_INFO pr_fmt("%pI4: Source Route Failed\n"), |
| 685 | &iph->daddr); | 687 | &iph->daddr); |
| 686 | break; | 688 | break; |
| 687 | default: | 689 | default: |
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index b2fd333abd59..3727e234c884 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c | |||
| @@ -20,6 +20,8 @@ | |||
| 20 | * Patrick McHardy : LRU queue of frag heads for evictor. | 20 | * Patrick McHardy : LRU queue of frag heads for evictor. |
| 21 | */ | 21 | */ |
| 22 | 22 | ||
| 23 | #define pr_fmt(fmt) "IPv4: " fmt | ||
| 24 | |||
| 23 | #include <linux/compiler.h> | 25 | #include <linux/compiler.h> |
| 24 | #include <linux/module.h> | 26 | #include <linux/module.h> |
| 25 | #include <linux/types.h> | 27 | #include <linux/types.h> |
| @@ -299,7 +301,7 @@ static inline struct ipq *ip_find(struct net *net, struct iphdr *iph, u32 user) | |||
| 299 | return container_of(q, struct ipq, q); | 301 | return container_of(q, struct ipq, q); |
| 300 | 302 | ||
| 301 | out_nomem: | 303 | out_nomem: |
| 302 | LIMIT_NETDEBUG(KERN_ERR "ip_frag_create: no memory left !\n"); | 304 | LIMIT_NETDEBUG(KERN_ERR pr_fmt("ip_frag_create: no memory left !\n")); |
| 303 | return NULL; | 305 | return NULL; |
| 304 | } | 306 | } |
| 305 | 307 | ||
| @@ -637,8 +639,8 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, | |||
| 637 | return 0; | 639 | return 0; |
| 638 | 640 | ||
| 639 | out_nomem: | 641 | out_nomem: |
| 640 | LIMIT_NETDEBUG(KERN_ERR "IP: queue_glue: no memory for gluing " | 642 | LIMIT_NETDEBUG(KERN_ERR pr_fmt("queue_glue: no memory for gluing queue %p\n"), |
| 641 | "queue %p\n", qp); | 643 | qp); |
| 642 | err = -ENOMEM; | 644 | err = -ENOMEM; |
| 643 | goto out_fail; | ||
