[Cake] Fwd: Does the latest cake support "tc filter"?

Georgios Amanakis gamanakis at gmail.com
Wed May 30 16:14:36 EDT 2018


---------- Forwarded message ----------
From: Georgios Amanakis <gamanakis at gmail.com>
Date: Wed, May 30, 2018 at 4:13 PM
Subject: Re: [Cake] Does the latest cake support "tc filter"?
To: Toke Høiland-Jørgensen <toke at toke.dk>


:) excellent work!
Now it works as expected!

Thanks again,
George

On Wed, May 30, 2018 at 3:58 PM, Toke Høiland-Jørgensen <toke at toke.dk> wrote:
> Georgios Amanakis <gamanakis at gmail.com> writes:
>
>>> Yes, the version submitted to upstream supports this. You can override
>>> which tin packets goes in by setting skb->priority from a filter or
>>> application (the major number needs to be set to the qdisc ID, and the
>>> minor number becomes the tin to queue packets in).
>>
>> Toke could you give an example how to do this?
>>
>> I am trying to put all traffic into tin 0:
>> #tc qdisc add dev enp1s0 root handle 8001 cake diffserv3 bandwidth 2mbit
>> #tc filter add dev enp1s0 parent 8001: protocol all \
>>               u32 match u32 0 0 \
>>               action skbedit priority 8001:1
>>
>> However as soon as the second command is executed all traffic drops,
>> and it only resumes once I remove the filter.
>>
>> What am I doing wrong?
>
> Hmm, nothing apart from using the classifiers in an unexpected (by me)
> way ;)
>
> Basically, what is happening is that the skbedit filter doesn't do
> classification. In which case Cake will cheerfully drop the packet.
>
> I just pushed a change to the upstream-4.18 branch which reworks the
> filter classification so it'll still hash packets if the filter doesn't
> make a decision, and also moves the tin selection to after the filter
> has run, to give priority selection a chance to work (even if the
> packets had not been dropped, you wouldn't have gotten the result you
> wanted, since the skb->priority field was checked before the filters we
> run...)
>
> Please see if that works better :)
>
> -Toke


More information about the Cake mailing list