Commit b60b6592baa69c43a5a0f55d6300a7feaab15338

Authored by stephen hemminger
Committed by David S. Miller
1 parent 207024b947

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>

Showing 1 changed file with 6 additions and 3 deletions Side-by-side Diff

... ... @@ -1637,9 +1637,12 @@
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);