Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

stephen hemminger and committed by
David S. Miller
b60b6592 207024b9

+6 -3
+6 -3
net/sched/sch_api.c
··· 1637 1637 tp = otp; 1638 1638 1639 1639 if (verd++ >= MAX_REC_LOOP) { 1640 - printk("rule prio %u protocol %02x reclassify loop, " 1641 - "packet dropped\n", 1642 - tp->prio&0xffff, ntohs(tp->protocol)); 1640 + if (net_ratelimit()) 1641 + printk(KERN_NOTICE 1642 + "%s: packet reclassify loop" 1643 + " rule prio %u protocol %02x\n", 1644 + tp->q->ops->id, 1645 + tp->prio & 0xffff, ntohs(tp->protocol)); 1643 1646 return TC_ACT_SHOT; 1644 1647 } 1645 1648 skb->tc_verd = SET_TC_VERD(skb->tc_verd, verd);