Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ff9c364 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 00c60a83
Loading
Loading
Loading
Loading
+11 −9
Original line number Original line Diff line number Diff line
@@ -153,7 +153,7 @@ int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb,
	} else if (type == RTM_GETACTION) {
	} else if (type == RTM_GETACTION) {
		return tcf_dump_walker(skb, cb, a, hinfo);
		return tcf_dump_walker(skb, cb, a, hinfo);
	} else {
	} else {
		printk("tcf_generic_walker: unknown action %d\n", type);
		WARN(1, "tcf_generic_walker: unknown action %d\n", type);
		return -EINVAL;
		return -EINVAL;
	}
	}
}
}
@@ -403,8 +403,9 @@ void tcf_action_destroy(struct tc_action *act, int bind)
				module_put(a->ops->owner);
				module_put(a->ops->owner);
			act = act->next;
			act = act->next;
			kfree(a);
			kfree(a);
		} else { /*FIXME: Remove later - catch insertion bugs*/
		} else {
			printk("tcf_action_destroy: BUG? destroying NULL ops\n");
			/*FIXME: Remove later - catch insertion bugs*/
			WARN(1, "tcf_action_destroy: BUG? destroying NULL ops\n");
			act = act->next;
			act = act->next;
			kfree(a);
			kfree(a);
		}
		}
@@ -744,7 +745,7 @@ static struct tc_action *create_a(int i)


	act = kzalloc(sizeof(*act), GFP_KERNEL);
	act = kzalloc(sizeof(*act), GFP_KERNEL);
	if (act == NULL) {
	if (act == NULL) {
		printk("create_a: failed to alloc!\n");
		pr_debug("create_a: failed to alloc!\n");
		return NULL;
		return NULL;
	}
	}
	act->order = i;
	act->order = i;
@@ -766,13 +767,13 @@ static int tca_action_flush(struct net *net, struct nlattr *nla,
	int err = -ENOMEM;
	int err = -ENOMEM;


	if (a == NULL) {
	if (a == NULL) {
		printk("tca_action_flush: couldnt create tc_action\n");
		pr_debug("tca_action_flush: couldnt create tc_action\n");
		return err;
		return err;
	}
	}


	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
	skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
	if (!skb) {
	if (!skb) {
		printk("tca_action_flush: failed skb alloc\n");
		pr_debug("tca_action_flush: failed skb alloc\n");
		kfree(a);
		kfree(a);
		return err;
		return err;
	}
	}
@@ -979,7 +980,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
		return ret;
		return ret;


	if (tca[TCA_ACT_TAB] == NULL) {
	if (tca[TCA_ACT_TAB] == NULL) {
		printk("tc_ctl_action: received NO action attribs\n");
		pr_notice("tc_ctl_action: received NO action attribs\n");
		return -EINVAL;
		return -EINVAL;
	}
	}


@@ -1056,7 +1057,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
	struct nlattr *kind = find_dump_kind(cb->nlh);
	struct nlattr *kind = find_dump_kind(cb->nlh);


	if (kind == NULL) {
	if (kind == NULL) {
		printk("tc_dump_action: action bad kind\n");
		pr_info("tc_dump_action: action bad kind\n");
		return 0;
		return 0;
	}
	}


@@ -1069,7 +1070,8 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
	a.ops = a_o;
	a.ops = a_o;


	if (a_o->walk == NULL) {
	if (a_o->walk == NULL) {
		printk("tc_dump_action: %s !capable of dumping table\n", a_o->kind);
		WARN(1, "tc_dump_action: %s !capable of dumping table\n",
		     a_o->kind);
		goto nla_put_failure;
		goto nla_put_failure;
	}
	}


+2 −2
Original line number Original line Diff line number Diff line
@@ -202,9 +202,9 @@ MODULE_LICENSE("GPL");
static int __init gact_init_module(void)
static int __init gact_init_module(void)
{
{
#ifdef CONFIG_GACT_PROB
#ifdef CONFIG_GACT_PROB
	printk("GACT probability on\n");
	printk(KERN_INFO "GACT probability on\n");
#else
#else
	printk("GACT probability NOT on\n");
	printk(KERN_INFO "GACT probability NOT on\n");
#endif
#endif
	return tcf_register_action(&act_gact_ops);
	return tcf_register_action(&act_gact_ops);
}
}
+2 −1
Original line number Original line Diff line number Diff line
@@ -235,7 +235,8 @@ static int tcf_ipt(struct sk_buff *skb, struct tc_action *a,
		break;
		break;
	default:
	default:
		if (net_ratelimit())
		if (net_ratelimit())
			printk("Bogus netfilter code %d assume ACCEPT\n", ret);
			pr_notice("tc filter: Bogus netfilter code"
				  " %d assume ACCEPT\n", ret);
		result = TC_POLICE_OK;
		result = TC_POLICE_OK;
		break;
		break;
	}
	}
+3 −3
Original line number Original line Diff line number Diff line
@@ -164,7 +164,7 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a,
	dev = m->tcfm_dev;
	dev = m->tcfm_dev;
	if (!(dev->flags & IFF_UP)) {
	if (!(dev->flags & IFF_UP)) {
		if (net_ratelimit())
		if (net_ratelimit())
			printk("mirred to Houston: device %s is gone!\n",
			pr_notice("tc mirred to Houston: device %s is gone!\n",
				  dev->name);
				  dev->name);
		goto out;
		goto out;
	}
	}
@@ -252,7 +252,7 @@ MODULE_LICENSE("GPL");


static int __init mirred_init_module(void)
static int __init mirred_init_module(void)
{
{
	printk("Mirror/redirect action on\n");
	pr_info("Mirror/redirect action on\n");
	return tcf_register_action(&act_mirred_ops);
	return tcf_register_action(&act_mirred_ops);
}
}


+6 −5
Original line number Original line Diff line number Diff line
@@ -158,11 +158,13 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
			}
			}


			if (offset % 4) {
			if (offset % 4) {
				printk("offset must be on 32 bit boundaries\n");
				pr_info("tc filter pedit"
					" offset must be on 32 bit boundaries\n");
				goto bad;
				goto bad;
			}
			}
			if (offset > 0 && offset > skb->len) {
			if (offset > 0 && offset > skb->len) {
				printk("offset %d cant exceed pkt length %d\n",
				pr_info("tc filter pedit"
					" offset %d cant exceed pkt length %d\n",
				       offset, skb->len);
				       offset, skb->len);
				goto bad;
				goto bad;
			}
			}
@@ -176,9 +178,8 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
		if (munged)
		if (munged)
			skb->tc_verd = SET_TC_MUNGED(skb->tc_verd);
			skb->tc_verd = SET_TC_MUNGED(skb->tc_verd);
		goto done;
		goto done;
	} else {
	} else
		printk("pedit BUG: index %d\n", p->tcf_index);
		WARN(1, "pedit BUG: index %d\n", p->tcf_index);
	}


bad:
bad:
	p->tcf_qstats.overlimits++;
	p->tcf_qstats.overlimits++;
Loading