[Cake] overhead and mpu

Ryan Mounce ryan at mounce.com.au
Mon Sep 4 23:37:05 EDT 2017


I will clarify a little further, that cake does make a guess as to the
overhead of an interface based on what it 'sees' however this is
overridden (rather than simply added to) if the overhead is specified
directly or via a keyword.

In my case running cake on a VLAN subinterface, it happens to guess 18
bytes (14 ethernet + 4 802.1q) which is subsequently set to 18 bytes
again by the 'docsis' keyword. 'tc qdisc show dev eth0.2' naively
determines that since my configured overhead is the same as the
overhead it 'sees', that I must have configured cake to use the 'raw'
overhead.

On 5 September 2017 at 12:56, Ryan Mounce <ryan at mounce.com.au> wrote:
> Hi Dennis,
>
> I am probably qualified to answer your question as I have done
> extensive testing for this case with DOCSIS modems, indeed I was
> prompted to contribute the 'mpu' option to cake in order to optimise
> this case.
>
> Short answer: just use the 'docsis' keyword for cake which configures
> the correct overhead and mpu, then it is just a matter of tuning the
> bandwidth.
>
> e.g. this is my command for cake on a DOCSIS connection advertised as
> 2Mbps upstream but actually shaped to 2.5Mbps:
> tc qdisc add dev eth0.2 root cake dual-srchost nat oceanic docsis
> bandwidth 2496Kbit
>
>
> The shaper in DOCSIS modems for upstream traffic (and I believe also
> in the CMTS for downstream traffic) works with ethernet frames
> including the 14-byte MAC header and 4-byte CRC and excluding any
> preamble / inter-packet gap, for 18 bytes total. Cake rounds runt
> frames up to the MPU after the overhead has been added, thus 64 bytes
> is our MPU for DOCSIS.
>
> It doesn't matter what packet size cake 'sees' on an interface, the
> overhead specified at the command line (directly or via keywords) is
> always interpreted relative to IP packets rather than relative to the
> PDU of a given interface.
>
> Regards,
> Ryan Mounce
>
> On 5 September 2017 at 12:16, Dennis Fedtke <dennisfedtke at gmail.com> wrote:
>> Hi!
>>
>> what values should be used for an Ethernet connection running over docsis
>> modem?
>>
>> I think cake automatically accounts for the Ethernet header.
>> But how large is the ethernet header? Some sites say 1514 some other sites
>> say 1518.
>> So we have the mac header (14bytes) + the crc checksum (4 bytes) + max
>> payload 1500bytes = 1518 bytes?
>>
>> I looked at the code and there is hard_header_len used.
>>
>> After some quick googling i found this info:
>> The value ofhard_header_lenis14(ETH_HLEN) for Ethernet interfaces.
>>
>> Which "packets size(1500 or 1514 or 1518)" does cake really see and work
>> with when running on an Ethernet interface?
>> Minimum Ethernet payload size is 46 bytes. So should i use mpu 46, mpu 60 or
>> mpu 64 setting for an Ethernet interface?
>>
>> Thanks
>>
>> _______________________________________________
>> Cake mailing list
>> Cake at lists.bufferbloat.net
>> https://lists.bufferbloat.net/listinfo/cake


More information about the Cake mailing list