diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-05-12 02:37:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-18 02:23:12 -0400 |
commit | 6ff9c3644e72bfac20844e0155c2cc8108602820 (patch) | |
tree | 81a8ce88d6f0f91ff7f68b234c2d20d6a0d8745f /net/sched/act_api.c | |
parent | 00c60a8312c235cac1c879b620ecb71413e9245d (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/sched/act_api.c')
-rw-r--r-- | net/sched/act_api.c | 20 |
1 files changed, 11 insertions, 9 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 | ||