> It would have been helpful to simply point out that any degenerate
> tcfilter produces this result. I've reproduced the problem and the
> attached patch ignores such tcfulters with a warning.
>   
I had no idea that would be the case. Anyway, the attached patch works.

> I had originally mis-read your post and thought that it was dmax that
> was not supplied. Shorewall does supply the mtu as umax if it is
> omitted. From the above tcclass, the actual command executed is:
>
> tc class add dev ifb0 parent ba:1 classid ba:25 hfsc sc umax 1500b dmax
>                                                         ----------
> 350ms rate 500000kbit ul rate 1000000kbit
>
> You can see what 'tc class add' commands Shorewall is executing by:
>
> /var/lib/shorewall/firewall trace restart 2> trace
> fgrep 'class add' trace
>   
OK, I used the (grand-calculation) example I started in the hfsc thread. 
To recap, this is what I had, according to my calculations:

a:11 - 10*full/100 20*full/100 1 tcp-ack
a:18 - 80*full/100 full 9 default
a:13 - 320kbit 320kbit 2
a:13:14 - 120kbit:60ms:1500b full 2
a:13:15 - 80kbit:100ms:1500b full 3      
a:13:16 - 80kbit:224ms:1500b full 4      
a:13:17 - 40kbit:374ms:1500b full 5      

"a" is eth0, the speed of which is capped at 100mbit in tcdevices (it 
can go up to 1gbit, but I am placing the cap intentionally here). So, 
this is the output from shorewall show tc eth0:

Shorewall 4.4.19.3 Traffic Control at test1.my.net - Tue May 17 23:32:56 
BST 2011

Device eth0:
qdisc hfsc a: root refcnt 2 default 18
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc sfq ff: parent a:11 limit 127p quantum 2500b flows 127/1024 
perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc sfq 100: parent a:14 limit 127p quantum 1500b flows 127/1024 
perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc sfq 101: parent a:15 limit 127p quantum 1500b flows 127/1024 
perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc sfq 102: parent a:16 limit 127p quantum 1500b flows 127/1024 
perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc sfq 103: parent a:17 limit 127p quantum 1500b flows 127/1024 
perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc sfq 104: parent a:18 limit 127p quantum 20000b flows 127/1024 
perturb 10sec
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
qdisc ingress ffff: parent ffff:fff1 ----------------
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0

class hfsc a:11 parent a:1 leaf ff: sc m1 0bit d 0us m2 10000Kbit ul m1 
0bit d 0us m2 20000Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class hfsc a: root
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 3

class hfsc a:1 parent a: sc m1 0bit d 0us m2 100000Kbit ul m1 0bit d 0us 
m2 100000Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 2

class hfsc a:13 parent a:1 sc m1 0bit d 0us m2 320000bit ul m1 0bit d 
0us m2 320000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 1

class hfsc a:15 parent a:13 leaf 101: sc m1 120000bit d 100.0ms m2 
80000bit ul m1 0bit d 0us m2 320000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class hfsc a:14 parent a:13 leaf 100: sc m1 200000bit d 60.0ms m2 
120000bit ul m1 0bit d 0us m2 320000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class hfsc a:17 parent a:13 leaf 103: sc m1 0bit d 74.0ms m2 40000bit ul 
m1 0bit d 0us m2 320000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class hfsc a:16 parent a:13 leaf 102: sc m1 0bit d 74.0ms m2 80000bit ul 
m1 0bit d 0us m2 320000bit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

class hfsc a:18 parent a:1 leaf 104: sc m1 0bit d 0us m2 80000Kbit ul m1 
0bit d 0us m2 100000Kbit
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 backlog 0b 0p requeues 0
 period 0 level 0

So, for the parts I haven't got a clue as to why they are set as they are:

qdisc sfq ff: parent a:11 limit 127p quantum 2500b flows 127/1024 
perturb 10sec  <---- Why 2500b? Where does that come from?
qdisc sfq 104: parent a:18 limit 127p quantum 20000b flows 127/1024 
perturb 10sec <-- Same as above...
class hfsc a:17 parent a:13 leaf 103: sc m1 0bit d 74.0ms m2 40000bit ul 
m1 0bit d 0us m2 320000bit <-- Why 74ms when I specified 375ms? Where 
does that come from (see my calculations on the hfsc thread for details)?
class hfsc a:16 parent a:13 leaf 102: sc m1 0bit d 74.0ms m2 80000bit ul 
m1 0bit d 0us m2 320000bit <-- Same as above...

Another query: On one of my machines I get a large number of 
"overlimits" count - this is on the main (root) class, not a leaf. What 
does that mean? I do not have "overlimits" anywhere else though.

------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to