Bug#438717: linux-2.6: net scheduling: filter attached to prio qdisc breaks priomap handling of packets it does _not_ match
Package: linux-2.6
Version: 2.6.22-3
Severity: normal
Attach: /home/master/prio_filter_map_fallback_test.sh
Subject area: network, packet schedulers (qdisc), filters for
classifying packets in classful qdiscs
When I attach a filter to a prio qdisc, the packets that it does _not_
match are not correctly handled (enqueued) according to the priomap
anymore, that is the same way than when there is no filter attached to
the qdisc.
For a concrete example, run the attached script (as root), trying to
ensure no other traffic happens over the interface: it installs qdiscs
on interface ${TIF} (defaults to eth0), pings host ${PHOST} (defaults
to master.debian.org - numerical IP hardcoded) with various IP TOS
bits set, installs a filter that matches TCP (_not_ ICMP) and does the
pings again.
Notice how the first pings (before filters get installed) get in the
right queue according to their TOS bits, but after the filter gets
installed, they all end up in the "best effort" queue.
The output I get (non-relevant bits snipped out) is:
Running test on interface eth0
by pinging host 70.103.162.29
Pinging with normal service 1 times
Pinging with minimise delay 2 times
Pinging with minimise cost 4 times
qdisc pfifo 22: parent 20:2 limit 1000p
Sent 196 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 23: parent 20:3 limit 1000p
Sent 98 bytes 1 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 24: parent 20:4 limit 1000p
Sent 392 bytes 4 pkt (dropped 0, overlimits 0 requeues 0)
Adding a filter that does _not_ match ICMP
Pinging with normal service 8 times
qdisc pfifo 22: parent 20:2 limit 1000p
Sent 196 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 23: parent 20:3 limit 1000p
Sent 924 bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 24: parent 20:4 limit 1000p
Sent 392 bytes 4 pkt (dropped 0, overlimits 0 requeues 0)
Pinging with minimise delay 16 times
qdisc pfifo 22: parent 20:2 limit 1000p
Sent 196 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 23: parent 20:3 limit 1000p
Sent 2492 bytes 26 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 24: parent 20:4 limit 1000p
Sent 392 bytes 4 pkt (dropped 0, overlimits 0 requeues 0)
Pinging with minimise cost 32 times
qdisc pfifo 22: parent 20:2 limit 1000p
Sent 196 bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 23: parent 20:3 limit 1000p
Sent 5628 bytes 58 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 24: parent 20:4 limit 1000p
Sent 392 bytes 4 pkt (dropped 0, overlimits 0 requeues 0)
The output I would expect is:
(... snip ...)
Adding a filter that does _not_ match ICMP
Pinging with normal service 8 times
qdisc pfifo 22: parent 20:2 limit 1000p
Sent XXX bytes 2 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 23: parent 20:3 limit 1000p
Sent XXX bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 24: parent 20:4 limit 1000p
Sent XXX bytes 4 pkt (dropped 0, overlimits 0 requeues 0)
Pinging with minimise delay 16 times
qdisc pfifo 22: parent 20:2 limit 1000p
Sent XXX bytes 18 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 23: parent 20:3 limit 1000p
Sent XXX bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 24: parent 20:4 limit 1000p
Sent XXX bytes 4 pkt (dropped 0, overlimits 0 requeues 0)
Pinging with minimise cost 32 times
qdisc pfifo 22: parent 20:2 limit 1000p
Sent XXX bytes 18 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 23: parent 20:3 limit 1000p
Sent XXX bytes 10 pkt (dropped 0, overlimits 0 requeues 0)
qdisc pfifo 24: parent 20:4 limit 1000p
Sent XXX bytes 36 pkt (dropped 0, overlimits 0 requeues 0)
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-1-686 (SMP w/1 CPU core)
Locale: LANG=fr_LU.UTF-8, LC_CTYPE=fr_LU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Reply to: