[Cerowrt-devel] AQM scripts modified for DSL exploration

Sebastian Moeller moeller0 at gmx.de
Mon Aug 12 05:42:41 EDT 2013


Hi Dave,



On Aug 12, 2013, at 02:06 , Dave Taht <dave.taht at gmail.com> wrote:

> Alright I slammed them into ceropackages for the next build but I
> don't get this line:
> 
>        STABSTRING="stab mtu 2048 tsize ${TSIZE} overhead ${OVERHEAD}
> linklayer ${LINKLAYER}"
> 
> mtu 2048?


I agree that looks wrong on the face of it, but it is not as bad as it seems. From td-stab's man page (http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=tc-stab&ampsect=8):

> NAME
> 
>        tc-stab - Generic size table manipulations
> 
> 
> SYNOPSIS
> 
>        tc qdisc add ... stab \
>            [ mtu BYTES ] [ tsize SLOTS ] \
>            [ mpu BYTES ] [ overhead BYTES ] [ linklayer TYPE ] ...
> 
>        TYPE := adsl | atm | ethernet
> 
>        For  the  description  of  BYTES - please refer to the UNITS section of
>        
> tc(8)
> .
> 
>        mtu
>            maximum packet size we create size table for, assumed 2048  if  not
>            specified explicitly
> 
>        tsize
>            required table size, assumed 512 if not specified explicitly
> 
>        mpu
>            minimum packet size used in computations
> 
>        overhead
>            per-packet size overhead (can be negative) used in computations
> 
>        linklayer
>            required linklayer adaptation.
> 

So tc-stab's MTU value is only used to create a size table up to that value, HTB, by the way, also has:

{
        fprintf(stderr, "Usage: ... qdisc add ... htb [default N] [r2q N]\n"
                " default  minor id of class to which unclassified packets are sent {0}\n"
                " r2q      DRR quantums are computed as rate in Bps/r2q {10}\n"
                " debug    string of 16 numbers each 0-3 {0}\n\n"
                "... class add ... htb rate R1 [burst B1] [mpu B] [overhead O]\n"
                "                      [prio P] [slot S] [pslot PS]\n"
                "                      [ceil R2] [cburst B2] [mtu MTU] [quantum Q]\n"
                " rate     rate allocated to this class (class can still borrow)\n"
                " burst    max bytes burst which can be accumulated during idle period {computed}\n"
                " mpu      minimum packet size used in rate computations\n"
                " overhead per-packet size overhead used in rate computations\n"

                " ceil     definite upper class rate (no borrows) {rate}\n"
                " cburst   burst but for ceil {computed}\n"
                " mtu      max packet size we create rate map for {1600}\n"
                " prio     priority of leaf; lower are served first {0}\n"
                " quantum  how much bytes to serve from leaf at once {use r2q}\n"
                "\nTC HTB version %d.%d\n",HTB_TC_VER>>16,HTB_TC_VER&0xffff
                );
}

So, I guess this should have been called max_MTU_tablesize to not be confusing.
My understanding is that the kernel builds a table giving the effective size for each packet length (by taking ATM cell overhead and per packet overhead into account) by looking it up in a table, the "mtu" here just tells tc how large a table to create. I picked 2048, since it seems to be the default just to be verbose (and to account for baby giant frames that seem to be intudiced at some del ISPs to allow 1500 effective MTU in spite of PPPOE overhead, but I digress). Looking at it again I assume that 1600 (HTB's default) might be large enough, but 2048 (actually 2047) allows an easier way to get 16byte size table steps which work well for 48byte ATM payload per cell sizes…
	I guess I will change the AQM scripts to allow direct manipulation of MTU, MPU and TSIZE just to be compete (of these only TSIZE is stab only, the other two also apply to HTB), so that it becomes easier to experiment with those from the GUI...


hope that helps & best regards
	Sebastian









More information about the Cerowrt-devel mailing list