From: Stephen Hemminger <shemminger@vyatta.com>
To: David Miller <davem@davemloft.net>, jamal <hadi@cyberus.ca>
Cc: netdev@vger.kernel.org
Subject: [PATCH] net sched: cleanup and rate limit warning
Date: Tue, 11 May 2010 17:24:12 -0700 [thread overview]
Message-ID: <20100511172412.76aff184@nehalam> (raw)
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);
next reply other threads:[~2010-05-12 0:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-12 0:24 Stephen Hemminger [this message]
2010-05-12 17:17 ` [PATCH] net sched: cleanup and rate limit warning 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100511172412.76aff184@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox