[Cake] overhead and mpu

Kevin Darbyshire-Bryant kevin at darbyshire-bryant.me.uk
Tue Sep 5 04:35:01 EDT 2017



On 05/09/17 09:01, Sebastian Moeller wrote:
<snip>
> 	I believe this is used internally so cake can deduce the size of the automatically added overhead (the linux kernel will add 14 bytes on ethernet interfaces automatically, which while certainly justifiable are not the ideal value for an ethernet shaper); with this cake allows the user to specify absolute overhead (so if you specify overhead 18, cake will give you 14 - 14 + 18 = 18, while tc's stab method will give you 14 + 18  = 32). So cake is doing the right thing here (the only thing it could do even better is to report the size of the automatically corrected in-kernel hard_header_len, but then the audience for that information is probably to small to justify this feature).


Actually for the sake of a one line change in the tc code it is an 
extremely useful confidence boost and info source as to just what linux 
thinks the overhead actually is:

                // This is actually the *amount* of automatic 
compensation, but we only report
                // its presence as a boolean for now.
                if (ethernet)
-                      fprintf(f, "via-ethernet ");
+                      fprintf(f, "via-ethernet(%d) ", ethernet);

I've run that in a local patch to tc on LEDE for AGES.  Very useful.

Kevin


More information about the Cake mailing list