[Cake] Backporting 'tc class' support

Kevin Darbyshire-Bryant kevin at darbyshire-bryant.me.uk
Sun Jul 15 16:13:11 EDT 2018



> On 15 Jul 2018, at 10:48, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
> 
> Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk> writes:
> 
>>> On 14 Jul 2018, at 22:50, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
>>> 
>>> Now that CAKE has been accepted upstream, I figured it was a good time
>>> to backport the 'tc class' support. So I did, back to kernel v4.9.
>>> 
>>> This is in the master branch; anyone feel like testing? With this, the
>>> version of CAKE in the master branch should be identical to the version
>>> that will be in Linux 4.19 :)
>> 
>> I need the attached patch to get it to build on openwrt - it looks
>> like an include guard order thing.
> 
> Ah, right, thanks! Fixed in master :)

And now that I’ve run it, with Georgios’ help (I’ve never played with tc filters before!) I’ve fallen over a wrinkle:

So using sqm-scripts I have my standard cake instances on eth0 and ifb4eth0, both using diffserv3 <<— diffserv3 is important.  This creates according to tc -s qdisc Bulk, Best Effort & Voice tins. (where is he going with this?)

For ‘fun’ I wanted to classify stuff incoming to my bittorrent port as Bulk.  So you’d think that "tc filter add dev ifb4eth0 parent 8011: protocol ip u32 match ip dport 6981 0xffff action skbedit priority 8011:1” would do the trick.  8011:1 being the target tin.  Whilst syntactically correct you’d be disappointed by the result ‘cos…..diffserv3 & 4 put the bulk traffic in tin 2 although tc displays it as the first tin.

This is a bit horrible.  To fix we need to drop the ‘out of order’ tin dump in cake, and tweak the column heading orders in tc. e.g. from fprintf(f, "                   Bulk  Best Effort        Voice\n");
          to  fprintf(f, "            Best Effort         Bulk        Voice\n");

and break the ABI in the process?

I’ll go and fetch my coat.

KDB

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://lists.bufferbloat.net/pipermail/cake/attachments/20180715/fadfe582/attachment-0001.sig>


More information about the Cake mailing list