netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net sched: cleanup and rate limit warning
@ 2010-05-12  0:24 Stephen Hemminger
  2010-05-12 17:17 ` jamal
  0 siblings, 1 reply; 11+ messages in thread
From: Stephen Hemminger @ 2010-05-12  0:24 UTC (permalink / raw)
  To: David Miller, jamal; +Cc: netdev

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>

---
Please think about this for 2.6.34 and could even be -stable material.

--- a/net/sched/sch_api.c	2010-05-11 17:08:42.177374275 -0700
+++ b/net/sched/sch_api.c	2010-05-11 17:16:59.560612078 -0700
@@ -1637,9 +1638,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);

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-05-18  6:06 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-12  0:24 [PATCH] net sched: cleanup and rate limit warning Stephen Hemminger
2010-05-12 17:17 ` jamal
2010-05-12 18:17   ` Stephen Hemminger
2010-05-12 19:13     ` jamal
2010-05-12 20:20       ` Stephen Hemminger
2010-05-12 20:41         ` jamal
2010-05-13 13:12           ` Patrick McHardy
2010-05-13 16:20             ` jamal
2010-05-13 16:26               ` Stephen Hemminger
2010-05-13 16:40                 ` jamal
2010-05-18  6:06                   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).