From: Pete Heist <pete@heistp.net>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Jonathan Morton <chromatix99@gmail.com>,
Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] issue with Cake and bpf filter
Date: Tue, 21 Aug 2018 23:06:11 +0200 [thread overview]
Message-ID: <B9D7E65C-20E5-49A9-A51E-1EAE7D1DE7D7@heistp.net> (raw)
In-Reply-To: <87d0uc9d2f.fsf@toke.dk>
[-- Attachment #1: Type: text/plain, Size: 2498 bytes --]
> On Aug 21, 2018, at 1:25 PM, Toke Høiland-Jørgensen <toke@toke.dk> wrote:
>
>>> The next simplest fix is to ignore the flow ID override unless we're
>>> in "flows" mode. We can then make valid assumptions about what should
>>> go into the host tables.
>>>
>>> The *right* fix, if we want to maximise functionality, would be to
>>> pass the result struct by reference into cake_hash(), where it can
>>> override the *host* IDs (not the flow ID). Users can then choose
>>> between using the override as a flow ID (by setting "hosts" mode
>>> instead of "flows"), or retaining the default host-isolation semantics
>>> with a revised definition of "host".
>>
>> Ah, making it possible to override both host and flow mode is a great
>> idea! I guess we could use the major/minor distinction in the class to
>> steer this. I'll see if I can't integrate this.
>
> So, I implemented this; in the latest commit on github it is again
> possible to override the flow hashing by setting the class ID with a TC
> filter; and the host hash can be overridden by setting the major number
> of the class ID. In my testing the hangs from before are gone, but if
> anyone else wants to test, please do!
>
> I'll write up a description of the filter overrides in the man page, and
> submit the change upstream as well...
Well that’s good timing for me as I’m wrapping up a small utility/eBPF to classify an arbitrary username to either MAC or IP. Here’s the work in progress, which is not done yet as flow fairness is still under construction, and I haven’t gotten my IPv6 support to pass the rather stubborn eBPF verifier: https://github.com/heistp/tc-users <https://github.com/heistp/tc-users>
With your new code Toke:
- I so far haven’t seen my VM either crash or suddenly fill its disk with logs, which is a bonus. :)
- With the new major/minor ID distinction, I’d probably use major for the user and minor for the flow hash?
Another thing I haven’t looked into yet is that when fq_codel is the qdisc, the eBPF action is only called "once in a while” (start of a new flow?) With cake it’s called for every single packet, which is what I expected to happen, but very different behavior.
Lastly, if anyone has time to review even just a little code for what is or is not good or idiomatic C, post an issue and I’d appreciate it. Yes, I yield to the ‘goto’ proponents when it comes to error handling and resource de-allocation. :)
Pete
[-- Attachment #2: Type: text/html, Size: 3539 bytes --]
next prev parent reply other threads:[~2018-08-21 21:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-12 8:17 Pete Heist
2018-08-12 10:23 ` Pete Heist
2018-08-12 13:41 ` Jonathan Morton
2018-08-12 19:42 ` Toke Høiland-Jørgensen
2018-08-12 21:34 ` Jonathan Morton
2018-08-13 0:21 ` Jonathan Morton
2018-08-13 5:44 ` Jonathan Morton
2018-08-13 11:01 ` Toke Høiland-Jørgensen
2018-08-21 11:25 ` Toke Høiland-Jørgensen
2018-08-21 21:06 ` Pete Heist [this message]
2018-08-21 21:17 ` Toke Høiland-Jørgensen
2018-08-21 21:46 ` Pete Heist
2018-08-22 9:49 ` Toke Høiland-Jørgensen
2018-08-22 9:41 ` Toke Høiland-Jørgensen
2018-08-22 6:17 ` Jonathan Morton
2018-08-22 9:30 ` Pete Heist
2018-08-22 9:37 ` Toke Høiland-Jørgensen
2018-08-22 9:51 ` Pete Heist
2018-08-22 10:00 ` Jonathan Morton
2018-08-22 10:13 ` Toke Høiland-Jørgensen
2018-08-22 10:32 ` Pete Heist
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B9D7E65C-20E5-49A9-A51E-1EAE7D1DE7D7@heistp.net \
--to=pete@heistp.net \
--cc=cake@lists.bufferbloat.net \
--cc=chromatix99@gmail.com \
--cc=toke@toke.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox