Hi list,

I've got quite a strange problem with htb. I have following
configuration: dual core athlon, two intel e1000 nics - eth1 is
connected to lan and has private ip, eth0 is connected to our isp and
has public ip (so there's nat on eth0). There is practically same htb
configuration on both interfaces, only the filters are different. On
eth1, packets are classified by their destination address, howewer this
does not work on eth0, because packets are already natted when they
reach scheduling subsystem -- so their source ip is copied into fwmark
by "IPMARK" iptables rule and classified according to this mark. Every
ip has it's own htb class and for each ip something like this is run:

 tc class add dev eth0 parent 1:0011 classid 1:00ab htb rate 96kbit ceil 
1000kbit prio 1 quantum 1500
 tc qdisc add dev eth0 parent 1:00ab handle 00ab: esfq perturb 5 hash src
 tc class add dev eth1 parent 1:0011 classid 1:00ab htb rate 96kbit ceil 
2000kbit prio 1 quantum 1500
 tc qdisc add dev eth1 parent 1:00ab handle 00ab: esfq perturb 5 hash dst
 tc filter add dev eth0 protocol ip prio 5 parent 1:0 u32 ht 800:0: match mark 
0x0a9ad002 0xffffffff flowid 1:00ab
 tc filter add dev eth1 protocol ip prio 5 parent 1:0 u32 ht 2:02: match ip dst 
10.154.208.2 flowid 1:00ab

Few days ago, I noticed that shaping on eth0 does not work. It probably
happened at the same time I recompiled the kernel to support SMP,
changed HZ from 250 to 1000 and changed packet scheduling subsystem
clock source from CPU to gettimeofday() (because of smp). However, it
doesn't neccessarily have to be the cause of the problem.

Shaping on eth1 works ok, though the only difference is in the rate/ceil
values and in the filters, and the filters work right -- packets reach
correct class (byte/packet counters are incremented).

Here is snippet of output from "tc -s class ls dev eth0". It seems
strange to me that the "rate" value is actually higher than the
ceil of the class -- can't it be kernel/tc bug or do I just
misinterpreted the meaning of rate/ceil?

 class htb 1:ab parent 1:11 leaf ab: prio 1 rate 97000bit ceil 1000Kbit burst 
1611b cburst 1725b
 Sent 184781922 bytes 122597 pkt (dropped 0, overlimits 0 requeues 0)
 rate 2465Kbit 203pps backlog 0b 7p requeues 0
 lended: 96087 borrowed: 26507 giants: 0
 tokens: -238223 ctokens: -19556

Does anyone have clue what can be wrong?

Thanks in advance and sorry for my english,

 -MM
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Reply via email to