lartc.org : Linux Advanced Routing & Traffic Control
(Answer) (Category) lartc.org FAQ :
Bug in TBF if you use a big buffer
This bug is reported in Debian Bug report : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=175462 but is still valid for other relases/distributions.

Copy of the bug report :


When I try to add a token bucket filter with a bucket size (buffer) of more than 10737kb, I get strange output, it looks like an integer overflow.

The command:

tc qdisc add dev eth0 parent 1:20 handle 20: tbf latency 10ms buffer 10737kb mpu 64 rate 40kbit
Shows up in tc -s qdiscc as:
qdisc tbf 20: dev eth0 rate 40Kbit burst 10737Kb lat 12.2ms
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
But the command:
tc qdisc add dev eth0 parent 1:20 handle 20: tbf latency 10ms buffer 10738kb mpu 64 rate 40kbit
Shows up as:
qdisc tbf 20: dev eth0 rate 40Kbit burst 4283972180b lat 2147.5s
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
And the latter will not burst at all and seems much worse than the first at delivering packets, but that might just be the huge latency queued up.

The kernel version is 2.4.20 without any special patches. Full set of commands I use available on request, if the problem seems hard to reproduce.

/Mattias Wadenstein
stef.coene@docum.org

[Append to This Answer]
Previous: (Answer) iptables + tc shaping tricks
Next: (Category) Using TC in MPC8250
This document is: http://qos.dyndns.org:3389/cgi-bin/fom?file=51
[Search] [Appearance]
This is a Faq-O-Matic 2.719.