[Cerowrt-devel] bug in simple_qos.sh on ingress that has been there for a long time...

Dave Taht dave.taht at gmail.com
Sun Jan 6 19:22:25 EST 2013

I have been puzzled over some classification related behaviors for
quite some time. I just finally figured out that the simple_qos script
is buggy on ingress, in that it dumps most of the traffic into the
"background" bin.

Things like

netperf -Y CS1,CS1 -H snapon.lab.bufferbloat.net # ends up in
background bin (1:13)
netperf -Y CS0,CS0 -H snapon.lab.bufferbloat.net # ALSO ends up in
background bin (1:13)

tc -s qdisc show dev ifb0

So there is a bug in the "diffserv" component of that script in that
this match matches almost everything for some reason.

The offending line is:

tc filter add dev $DEV protocol ip parent 1:0 prio 6 u32 match ip tos
0x20 0xfc classid 1:13 # CS1 Bulk

On egress it uses the more "sane to express" iptables version (which
won't work on ingress) to do similar classification.

The reason for the 0xfc was to filter out ECN bits. Maybe I've got
that backwards? or these filters need to be differently masked? or?
/me has brain fail to do an and

Anyway, for those collecting data on up/down bandwidths and playing
with classification, this bug is going to mess up your world. It just
did mine, anyway.

Dave Täht

Fixing bufferbloat with cerowrt: http://www.teklibre.com/cerowrt/subscribe.html

More information about the Cerowrt-devel mailing list