aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-05-12 02:37:05 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-18 02:23:12 -0400
commit6ff9c3644e72bfac20844e0155c2cc8108602820 (patch)
tree81a8ce88d6f0f91ff7f68b234c2d20d6a0d8745f /net
parent00c60a8312c235cac1c879b620ecb71413e9245d (diff)
net sched: printk message severity
The previous patch encourage me to go look at all the messages in the network scheduler and fix them. Many messages were missing any severity level. Some serious ones that should never happen were turned into WARN(), and the random noise messages that were handled changed to pr_debug(). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/act_api.c20
-rw-r--r--net/sched/act_gact.c4
-rw-r--r--net/sched/act_ipt.c3
-rw-r--r--net/sched/act_mirred.c6
-rw-r--r--net/sched/act_pedit.c11
-rw-r--r--net/sched/act_simple.c4
-rw-r--r--net/sched/cls_u32.c10
-rw-r--r--net/sched/ematch.c3
8 files changed, 33 insertions, 28 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 019045174fc3..972378f47f3c 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -153,7 +153,7 @@ int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb,
153 } else if (type == RTM_GETACTION) { 153 } else if (type == RTM_GETACTION) {
154 return tcf_dump_walker(skb, cb, a, hinfo); 154 return tcf_dump_walker(skb, cb, a, hinfo);
155 } else { 155 } else {
156 printk("tcf_generic_walker: unknown action %d\n", type); 156 WARN(1, "tcf_generic_walker: unknown action %d\n", type);
157 return -EINVAL; 157 return -EINVAL;
158 } 158 }
159} 159}
@@ -403,8 +403,9 @@ void tcf_action_destroy(struct tc_action *act, int bind)
403 module_put(a->ops->owner); 403 module_put(a->ops->owner);
404 act = act->next; 404 act = act->next;
405 kfree(a); 405 kfree(a);
406 } else { /*FIXME: Remove later - catch insertion bugs*/ 406 } else {
407 printk("tcf_action_destroy: BUG? destroying NULL ops\n"); 407 /*FIXME: Remove later - catch insertion bugs*/
408 WARN(1, "tcf_action_destroy: BUG? destroying NULL ops\n");
408 act = act->next; 409 act = act->next;
409 kfree(a); 410 kfree(a);
410 } 411 }
@@ -744,7 +745,7 @@ static struct tc_action *create_a(int i)
744 745
745 act = kzalloc(sizeof(*act), GFP_KERNEL); 746 act = kzalloc(sizeof(*act), GFP_KERNEL);
746 if (act == NULL) { 747 if (act == NULL) {
747 printk("create_a: failed to alloc!\n"); 748 pr_debug("create_a: failed to alloc!\n");
748 return NULL; 749 return NULL;
749 } 750 }
750 act->order = i; 751 act->order = i;
@@ -766,13 +767,13 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
766 int err = -ENOMEM; 767 int err = -ENOMEM;
767 768
768 if (a == NULL) { 769 if (a == NULL) {
769 printk("tca_action_flush: couldnt create tc_action\n"); 770 pr_debug("tca_action_flush: couldnt create tc_action\n");
770 return err; 771 return err;
771 } 772 }
772 773
773 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); 774 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
774 if (!skb) { 775 if (!skb) {
775 printk("tca_action_flush: failed skb alloc\n"); 776 pr_debug("tca_action_flush: failed skb alloc\n");
776 kfree(a); 777 kfree(a);
777 return err; 778 return err;
778 } 779 }
@@ -979,7 +980,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
979 return ret; 980 return ret;
980 981
981 if (tca[TCA_ACT_TAB] == NULL) { 982 if (tca[TCA_ACT_TAB] == NULL) {
982 printk("tc_ctl_action: received NO action attribs\n"); 983 pr_notice("tc_ctl_action: received NO action attribs\n");
983 return -EINVAL; 984 return -EINVAL;
984 } 985 }
985 986
@@ -1056,7 +1057,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
1056 struct nlattr *kind = find_dump_kind(cb->nlh); 1057 struct nlattr *kind = find_dump_kind(cb->nlh);
1057 1058
1058 if (kind == NULL) { 1059 if (kind == NULL) {
1059 printk("tc_dump_action: action bad kind\n"); 1060 pr_info("tc_dump_action: action bad kind\n");
1060 return 0; 1061 return 0;
1061 } 1062 }
1062 1063
@@ -1069,7 +1070,8 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
1069 a.ops = a_o; 1070 a.ops = a_o;
1070 1071
1071 if (a_o->walk == NULL) { 1072 if (a_o->walk == NULL) {
1072 printk("tc_dump_action: %s !capable of dumping table\n", a_o->kind); 1073 WARN(1, "tc_dump_action: %s !capable of dumping table\n",
1074 a_o->kind);
1073 goto nla_put_failure; 1075 goto nla_put_failure;
1074 } 1076 }
1075 1077
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index e7f796aec657..8406c6654990 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -202,9 +202,9 @@ MODULE_LICENSE("GPL");
202static int __init gact_init_module(void) 202static int __init gact_init_module(void)
203{ 203{
204#ifdef CONFIG_GACT_PROB 204#ifdef CONFIG_GACT_PROB
205 printk("GACT probability on\n"); 205 printk(KERN_INFO "GACT probability on\n");
206#else 206#else
207 printk("GACT probability NOT on\n"); 207 printk(KERN_INFO "GACT probability NOT on\n");
208#endif 208#endif
209 return tcf_register_action(&act_gact_ops); 209 return tcf_register_action(&act_gact_ops);
210} 210}
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 1f9595467c17..c7e59e6ec349 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -235,7 +235,8 @@ static int tcf_ipt(struct sk_buff *skb, struct tc_action *a,
235 break; 235 break;
236 default: 236 default:
237 if (net_ratelimit()) 237 if (net_ratelimit())
238 printk("Bogus netfilter code %d assume ACCEPT\n", ret); 238 pr_notice("tc filter: Bogus netfilter code"
239 " %d assume ACCEPT\n", ret);
239 result = TC_POLICE_OK; 240 result = TC_POLICE_OK;
240 break; 241 break;
241 } 242 }
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index c046682054eb..c0b6863e3b87 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -164,8 +164,8 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a,
164 dev = m->tcfm_dev; 164 dev = m->tcfm_dev;
165 if (!(dev->flags & IFF_UP)) { 165 if (!(dev->flags & IFF_UP)) {
166 if (net_ratelimit()) 166 if (net_ratelimit())
167 printk("mirred to Houston: device %s is gone!\n", 167 pr_notice("tc mirred to Houston: device %s is gone!\n",
168 dev->name); 168 dev->name);
169 goto out; 169 goto out;
170 } 170 }
171 171
@@ -252,7 +252,7 @@ MODULE_LICENSE("GPL");
252 252
253static int __init mirred_init_module(void) 253static int __init mirred_init_module(void)
254{ 254{
255 printk("Mirror/redirect action on\n"); 255 pr_info("Mirror/redirect action on\n");
256 return tcf_register_action(&act_mirred_ops); 256 return tcf_register_action(&act_mirred_ops);
257} 257}
258 258
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index b7dcfedc802e..fdbd0b7bd840 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -158,11 +158,13 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
158 } 158 }
159 159
160 if (offset % 4) { 160 if (offset % 4) {
161 printk("offset must be on 32 bit boundaries\n"); 161 pr_info("tc filter pedit"
162 " offset must be on 32 bit boundaries\n");
162 goto bad; 163 goto bad;
163 } 164 }
164 if (offset > 0 && offset > skb->len) { 165 if (offset > 0 && offset > skb->len) {
165 printk("offset %d cant exceed pkt length %d\n", 166 pr_info("tc filter pedit"
167 " offset %d cant exceed pkt length %d\n",
166 offset, skb->len); 168 offset, skb->len);
167 goto bad; 169 goto bad;
168 } 170 }
@@ -176,9 +178,8 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
176 if (munged) 178 if (munged)
177 skb->tc_verd = SET_TC_MUNGED(skb->tc_verd); 179 skb->tc_verd = SET_TC_MUNGED(skb->tc_verd);
178 goto done; 180 goto done;
179 } else { 181 } else
180 printk("pedit BUG: index %d\n", p->tcf_index); 182 WARN(1, "pedit BUG: index %d\n", p->tcf_index);
181 }
182 183
183bad: 184bad:
184 p->tcf_qstats.overlimits++; 185 p->tcf_qstats.overlimits++;
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index 622ca809c15c..1b4bc691d7d1 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -49,7 +49,7 @@ static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result
49 * Example if this was the 3rd packet and the string was "hello" 49 * Example if this was the 3rd packet and the string was "hello"
50 * then it would look like "hello_3" (without quotes) 50 * then it would look like "hello_3" (without quotes)
51 **/ 51 **/
52 printk("simple: %s_%d\n", 52 pr_info("simple: %s_%d\n",
53 (char *)d->tcfd_defdata, d->tcf_bstats.packets); 53 (char *)d->tcfd_defdata, d->tcf_bstats.packets);
54 spin_unlock(&d->tcf_lock); 54 spin_unlock(&d->tcf_lock);
55 return d->tcf_action; 55 return d->tcf_action;
@@ -205,7 +205,7 @@ static int __init simp_init_module(void)
205{ 205{
206 int ret = tcf_register_action(&act_simp_ops); 206 int ret = tcf_register_action(&act_simp_ops);
207 if (!ret) 207 if (!ret)
208 printk("Simple TC action Loaded\n"); 208 pr_info("Simple TC action Loaded\n");
209 return ret; 209 return ret;
210} 210}
211 211
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 593eac056e8d..96275422c619 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -211,7 +211,7 @@ check_terminal:
211 211
212deadloop: 212deadloop:
213 if (net_ratelimit()) 213 if (net_ratelimit())
214 printk("cls_u32: dead loop\n"); 214 printk(KERN_WARNING "cls_u32: dead loop\n");
215 return -1; 215 return -1;
216} 216}
217 217
@@ -768,15 +768,15 @@ static struct tcf_proto_ops cls_u32_ops __read_mostly = {
768 768
769static int __init init_u32(void) 769static int __init init_u32(void)
770{ 770{
771 printk("u32 classifier\n"); 771 pr_info("u32 classifier\n");
772#ifdef CONFIG_CLS_U32_PERF 772#ifdef CONFIG_CLS_U32_PERF
773 printk(" Performance counters on\n"); 773 pr_info(" Performance counters on\n");
774#endif 774#endif
775#ifdef CONFIG_NET_CLS_IND 775#ifdef CONFIG_NET_CLS_IND
776 printk(" input device check on\n"); 776 pr_info(" input device check on\n");
777#endif 777#endif
778#ifdef CONFIG_NET_CLS_ACT 778#ifdef CONFIG_NET_CLS_ACT
779 printk(" Actions configured\n"); 779 pr_info(" Actions configured\n");
780#endif 780#endif
781 return register_tcf_proto_ops(&cls_u32_ops); 781 return register_tcf_proto_ops(&cls_u32_ops);
782} 782}
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index e782bdeedc58..5e37da961f80 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -527,7 +527,8 @@ pop_stack:
527 527
528stack_overflow: 528stack_overflow:
529 if (net_ratelimit()) 529 if (net_ratelimit())
530 printk("Local stack overflow, increase NET_EMATCH_STACK\n"); 530 printk(KERN_WARNING "tc ematch: local stack overflow,"
531 " increase NET_EMATCH_STACK\n");
531 return -1; 532 return -1;
532} 533}
533EXPORT_SYMBOL(__tcf_em_tree_match); 534EXPORT_SYMBOL(__tcf_em_tree_match);