Russell Stuart wrote:
The following patch to tc allows it to perform an exact
ATM / ADSL rate calculation.
I probably haven't read the patch properly - but I don't think you can
do it exactly without patching net/sched/sched_htb.c aswell.
Specifically you need to add overhead - 1 before htb shifts the length
to get the slot num (-1 because you need to get 48 and 49 payload length
to map to different slots 47 and 48 do). The table should be filled
according to this.
It adds one extra keyword
to the "tc class add htb ..." command line: "atm". There
isn't a lot of spare bits hanging around to record this,
so the patch adds the feature at the expense of always
forcing the "overhead" parameter to be even.
With the patch, these commands will generate a correct
rate table for:
PPPoA + VC/Mux: tc class add htb ... overhead 10 atm
PPPoA + VC/LLC: tc class add htb ... overhead 18 atm
PPPoE + VC/Mux: tc class add htb ... overhead 34 atm
PPPoE + VC/LLC: tc class add htb ... overhead 42 atm
Also remember that if you shape on ethX 14 bytes are already added to ip
length when htb looks up rate, so pppoa/vcmux would need to be negative.
When using this command lines, you always specify the ADSL
link capacity as quoted by the modem. Eg, if you are
controlling incoming traffic on a 512k/128k link, you
specify the link speed as 512000bps.
You need to look at the atm user rate shown by your modem, for me in the
past it was 288/576 this was sold as 250/500 by teleco and 256/512 by isp.
You also need to back off a couple of kbit (egress - ingress more for
different reasons) - one of my modems does cell qos bases on rate of
whole cells/sec - don't kmow how common that is. Also if you run exactly
on the rate and queue formed when starting/restarting scripts it would
not drain till the traffic stopped.
Andy.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc