CBQ filters seem to be ignoring me?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm attempting to set up a test harness involving a large number of
rate-limited connections, and I'm trying to use CBQ on 2.2.16. (I'd use
a 2.4-test kernel, but those don't get on too well with my X server, and
I don't really fancy trying to debug this at the console.)

After failing with my home-grown scripts, I eventually decided to try a
(presumably) known-good one as a basis, so I had a go at the tc setup
script written by Jamal Hadi Salim in issue 62 of the Linux Journal
(http://www2.linuxjournal.com/lj-issues/issue62/3369l1.html). The only
changes I made were to change the paths to tc and ip to those installed
by the Debian iproute package (version 991023-2), to turn on the IP
aliasing support in the script, and to alter the bandwidth of the eth0
device to 100Mbit in the three places where it's mentioned (correct for
this card and network).

The output of the script is as follows (slightly reformatted for line
length):

---- qdisc parameters ----------
qdisc cbq 1: rate 100Mbit (bounded,isolated) prio no-transmit
---- Class parameters ----------
class cbq 1: root rate 100Mbit (bounded,isolated) prio no-transmit
class cbq 1:1 parent 1: rate 1Mbit (bounded,isolated) prio 5
class cbq 1:2 parent 1: rate 3Mbit (bounded) prio 5
---- filter parameters ----------
filter parent 1: protocol ip pref 5 u32 
filter parent 1: protocol ip pref 5 u32 fh 1: ht divisor 256 
filter parent 1: protocol ip pref 5 u32 fh 1:6:800 order 2048 key ht 1
  bkt 6 flowid 1:1 match 0a00000a/ffffffff at 12
filter parent 1: protocol ip pref 5 u32 fh 1:6:801 order 2049 key ht 1
  bkt 6 flowid 1:2 match 0a00000b/ffffffff at 12
filter parent 1: protocol ip pref 5 u32 fh 800: ht divisor 1 
filter parent 1: protocol ip pref 5 u32 fh 800::1 order 1 key ht 800
  bkt 0 link 1: match 00000000/00003fff at 4
    offset 0f00>>6 at 0 
    hash mask 00ff0000 at 8 

As far as I can tell, this is as expected. However, FTP connections (for
example) to 10.0.0.{10,11} don't get rate-limited, and tc says that no
packets have passed through the rate-limiting classes:

[colinw@antor ~]$ tc -s class show dev eth0
class cbq 1: root rate 100Mbit (bounded,isolated) prio no-transmit
 Sent 40329870 bytes 49732 pkts (dropped 0, overlimits 0) 
  borrowed 0 overactions 0 avgidle 62 undertime 0
class cbq 1:1 parent 1: rate 1Mbit (bounded,isolated) prio 5
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
  borrowed 0 overactions 0 avgidle 187672 undertime 0
class cbq 1:2 parent 1: rate 3Mbit (bounded) prio 5
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 
  borrowed 0 overactions 0 avgidle 61293 undertime 0

I'm rather at a loss as to how to debug this. 'tc -s filter ...' doesn't
show anything useful, for instance; I'd like to be able to find out
something about the flow of data through the filters. There's nothing of
interest in the syslog or kernel log. I have CONFIG_EXPERIMENTAL,
everything down to masquerading in 'Networking options' apart from
CONFIG_IP_PNP, and all of the QoS stuff apart from RSVP for IPv6. I
have most of the QoS stuff built as modules; cls_u32 and sch_cbq are
loaded. I also tried QoS non-modular on 2.2.5 (which happened to be
running at the time).

Is there any way to do more fine-grained debugging of what's happening
in the traffic control system? Are there known problems with that
script, or does it work fine for other people? (I haven't got *any* tc
filters to work so far.) Is there anything else I might have to change
when using a 100Mbit Ethernet card? Should I have asked all this
somewhere else?

If possible, I'd appreciate being Cc'ed on any replies, though I'll
check the web archives as well.

Thanks in advance,

-- 
Colin Watson                                     <cjw44@flatline.org.uk>
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux