Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 195280
b: refs/heads/master
c: 6ff9c36
h: refs/heads/master
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed May 18, 2010
1 parent 2bb03f4 commit 6024abb
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 00c60a8312c235cac1c879b620ecb71413e9245d
refs/heads/master: 6ff9c3644e72bfac20844e0155c2cc8108602820
20 changes: 11 additions & 9 deletions trunk/net/sched/act_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb,
} else if (type == RTM_GETACTION) {
return tcf_dump_walker(skb, cb, a, hinfo);
} else {
printk("tcf_generic_walker: unknown action %d\n", type);
WARN(1, "tcf_generic_walker: unknown action %d\n", type);
return -EINVAL;
}
}
Expand Down Expand Up @@ -403,8 +403,9 @@ void tcf_action_destroy(struct tc_action *act, int bind)
module_put(a->ops->owner);
act = act->next;
kfree(a);
} else { /*FIXME: Remove later - catch insertion bugs*/
printk("tcf_action_destroy: BUG? destroying NULL ops\n");
} else {
/*FIXME: Remove later - catch insertion bugs*/
WARN(1, "tcf_action_destroy: BUG? destroying NULL ops\n");
act = act->next;
kfree(a);
}
Expand Down Expand Up @@ -744,7 +745,7 @@ static struct tc_action *create_a(int i)

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

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

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

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;
}

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

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

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

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;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sched/act_gact.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ MODULE_LICENSE("GPL");
static int __init gact_init_module(void)
{
#ifdef CONFIG_GACT_PROB
printk("GACT probability on\n");
printk(KERN_INFO "GACT probability on\n");
#else
printk("GACT probability NOT on\n");
printk(KERN_INFO "GACT probability NOT on\n");
#endif
return tcf_register_action(&act_gact_ops);
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/sched/act_ipt.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ static int tcf_ipt(struct sk_buff *skb, struct tc_action *a,
break;
default:
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;
break;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/sched/act_mirred.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ static int tcf_mirred(struct sk_buff *skb, struct tc_action *a,
dev = m->tcfm_dev;
if (!(dev->flags & IFF_UP)) {
if (net_ratelimit())
printk("mirred to Houston: device %s is gone!\n",
dev->name);
pr_notice("tc mirred to Houston: device %s is gone!\n",
dev->name);
goto out;
}

Expand Down Expand Up @@ -252,7 +252,7 @@ MODULE_LICENSE("GPL");

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);
}

Expand Down
11 changes: 6 additions & 5 deletions trunk/net/sched/act_pedit.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
}

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;
}
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);
goto bad;
}
Expand All @@ -176,9 +178,8 @@ static int tcf_pedit(struct sk_buff *skb, struct tc_action *a,
if (munged)
skb->tc_verd = SET_TC_MUNGED(skb->tc_verd);
goto done;
} else {
printk("pedit BUG: index %d\n", p->tcf_index);
}
} else
WARN(1, "pedit BUG: index %d\n", p->tcf_index);

bad:
p->tcf_qstats.overlimits++;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sched/act_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ static int tcf_simp(struct sk_buff *skb, struct tc_action *a, struct tcf_result
* Example if this was the 3rd packet and the string was "hello"
* then it would look like "hello_3" (without quotes)
**/
printk("simple: %s_%d\n",
pr_info("simple: %s_%d\n",
(char *)d->tcfd_defdata, d->tcf_bstats.packets);
spin_unlock(&d->tcf_lock);
return d->tcf_action;
Expand Down Expand Up @@ -205,7 +205,7 @@ static int __init simp_init_module(void)
{
int ret = tcf_register_action(&act_simp_ops);
if (!ret)
printk("Simple TC action Loaded\n");
pr_info("Simple TC action Loaded\n");
return ret;
}

Expand Down
10 changes: 5 additions & 5 deletions trunk/net/sched/cls_u32.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static int u32_classify(struct sk_buff *skb, struct tcf_proto *tp, struct tcf_re

deadloop:
if (net_ratelimit())
printk("cls_u32: dead loop\n");
printk(KERN_WARNING "cls_u32: dead loop\n");
return -1;
}

Expand Down Expand Up @@ -768,15 +768,15 @@ static struct tcf_proto_ops cls_u32_ops __read_mostly = {

static int __init init_u32(void)
{
printk("u32 classifier\n");
pr_info("u32 classifier\n");
#ifdef CONFIG_CLS_U32_PERF
printk(" Performance counters on\n");
pr_info(" Performance counters on\n");
#endif
#ifdef CONFIG_NET_CLS_IND
printk(" input device check on\n");
pr_info(" input device check on\n");
#endif
#ifdef CONFIG_NET_CLS_ACT
printk(" Actions configured\n");
pr_info(" Actions configured\n");
#endif
return register_tcf_proto_ops(&cls_u32_ops);
}
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/sched/ematch.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,8 @@ int __tcf_em_tree_match(struct sk_buff *skb, struct tcf_ematch_tree *tree,

stack_overflow:
if (net_ratelimit())
printk("Local stack overflow, increase NET_EMATCH_STACK\n");
printk(KERN_WARNING "tc ematch: local stack overflow,"
" increase NET_EMATCH_STACK\n");
return -1;
}
EXPORT_SYMBOL(__tcf_em_tree_match);

0 comments on commit 6024abb

Please sign in to comment.