summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2010-05-11 14:24:12 +0000
committerDavid S. Miller <davem@davemloft.net>2010-05-17 23:23:13 -0700
commitb60b6592baa69c43a5a0f55d6300a7feaab15338 (patch)
tree30e7ba9b38a30d78542b242eda794499a590d26c /net
parent207024b9477e253859abfc30f1ff314cd6008b24 (diff)
downloadlinux-stable-b60b6592baa69c43a5a0f55d6300a7feaab15338.tar.gz
linux-stable-b60b6592baa69c43a5a0f55d6300a7feaab15338.tar.bz2
linux-stable-b60b6592baa69c43a5a0f55d6300a7feaab15338.zip
net sched: cleanup and rate limit warning
If the user has a bad classification configuration, and gets a packet that goes through too many steps. Chances are more packets will arrive, and the message spew will overrun syslog because it is not rate limited. And because it is not tagged with appropriate priority it can't not be screened. Added the qdisc to the message to try and give some more context when the message does arrive. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_api.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 9839b26674f4..fe35c1f338c2 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1637,9 +1637,12 @@ reclassify:
tp = otp;
if (verd++ >= MAX_REC_LOOP) {
- printk("rule prio %u protocol %02x reclassify loop, "
- "packet dropped\n",
- tp->prio&0xffff, ntohs(tp->protocol));
+ if (net_ratelimit())
+ printk(KERN_NOTICE
+ "%s: packet reclassify loop"
+ " rule prio %u protocol %02x\n",
+ tp->q->ops->id,
+ tp->prio & 0xffff, ntohs(tp->protocol));
return TC_ACT_SHOT;
}
skb->tc_verd = SET_TC_VERD(skb->tc_verd, verd);