From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Maxime Bizon <mbizon@freebox.fr>
Cc: Dave Taht <dave.taht@gmail.com>, Cake List <cake@lists.bufferbloat.net>
Subject: Re: [Cake] Advantages to tightly tuning latency
Date: Thu, 23 Apr 2020 20:35:15 +0200 [thread overview]
Message-ID: <871roe6of0.fsf@toke.dk> (raw)
In-Reply-To: <20200423173111.GL28541@sakura>
Maxime Bizon <mbizon@freebox.fr> writes:
> On Thursday 23 Apr 2020 à 18:42:11 (+0200), Toke Høiland-Jørgensen wrote:
>
>> Didn't make it in until 5.5, unfortunately... :(
>>
>> I can try to produce a patch that you can manually apply on top of 5.4
>> if you're interested?
>
> I could do it, but the thing I'm more worried about is the lack of
> test coverage from everyone else.
Yeah, I guess you'd be on the hook for backporting any follow-ups
yourself if you do that; maybe better to wait for the next longterm
kernel release, then...
>> Anyhow, my larger point was that we really do want to enable such use
>> cases for XDP; but we are lacking the details of what exactly is missing
>> before we can get to something that's useful / deployable. So any
>> details you could share about what feature set you are supporting in
>> your own 'fast path' implementation would be really helpful. As would
>> details about the hardware platform you are using. You can send them
>> off-list if you don't want to make it public, of course :)
>
> there is no hardware specific feature used, it's all software
I meant more details of your SOC platform. You already said it's
ARM-based, so I guess the most important missing piece is which (Linux)
driver does the Ethernet device(s) use?
> imagine this "simple" setup, pretty much what anyone's home router is
> doing:
>
> <br0> with <eth0> + <wlan0> inside, private IPv4 address
> <wan0.vlan> with IPv6, vlan interface over <wan0>
> <map0> with IPv4, MAP-E tunnel over <wan0.vlan>
>
> then:
> - IPv6 routing between <br0> and <wan0.vlan>
> - IPv4 routing + NAT between <br0> and <map0>
>
> iptables would be filled with usual rules, per interface ALLOW rules
> in FORWARD chain, DNAT rules in PREROUTING to access LAN from WAN...
>
> and then you want this to be fast :)
>
> What we do is build a "flow" table on top of conntrack, so with a
> single lookup we find the flow, the destination interface, and what
> modifications to apply to the packet (L3 address to change, encap to
> add/remove, etc etc)
>
> Then we do this lookup more or less early in RX path, on our oldest
> platform we even had to do this from the ethernet driver, and do TX
> from there too, skipping qdisc layer and allowing cache maintenance
> hacks (partial invalidation and wback)
This sounds pretty much what you'd do with an XDP program: Packet comes
in -> XDP program runs, parses the headers, does a flow lookup, modifies
the packet and redirects it out the egress interface. All in one go,
kernel never even builds an skb for the packet.
You can build most of that with XDP today, but you'd need to implement
all the lookups yourself using BPF maps; having a hook into the kernel
conntrack / flow tables would help with that. I guess I should look into
what happened with that hook.
Oh, and we also need to solve queueing in XDP; it's all line rate ATM,
which is obviously not ideal for a CPE :)
> nftable with flowtables seems to be have developped something that
> could replace our flow cache, but I'm not sure if it can handle our
> tunneling scheme yet. It even has a notion of offloaded flow for
> hardware that can support it.
Well, the nice thing about XDP is that you can just implement any custom
encapsulation that is not supported by the kernel yourself :)
> If you add an XDP offload to it, with an option to do the
> lookup/modification/tx at the layer you want, depending on the
> performance you need, whether you want qdisc.. that you'd give you
> pretty much the same thing we use today, but with a cleaner design.
Yup, I think so. What does your current solution do with packets that
are destined for the WiFi interface, BTW? Just punt them to the regular
kernel path?
>> Depends on the TCP stack (I think).
>
> I guess Linux deals with OFO better, but unfortunately that's not the
> main OS used by our subscribers...
Yeah, you really should do something about that ;)
>> Steam is perhaps a bad example as that is doing something very much like
>> bittorrent AFAIK; but point taken, people do occasionally run
>> single-stream downloads and want them to be fast. I'm just annoyed that
>> this becomes the *one* benchmark people run, to the exclusion of
>> everything else that has a much larger impact on the overall user
>> experience :/
>
> that one is easy
>
> convince ookla to add some kind of "latency under load" metric, and
> have them report it as a big red flag when too high, and even better
> add scary messages like "this connection is not suitable for online
> gaming".
>
> subscribers will bug telco, then telco will bug SOCs vendors
Heh. Easy in theory, yeah. I do believe people on this list have tried
to convince them; no luck thus far :/
-Toke
next prev parent reply other threads:[~2020-04-23 18:35 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-21 18:22 Justin Kilpatrick
2020-04-21 18:40 ` Jonathan Morton
2020-04-21 18:44 ` Dave Taht
2020-04-21 22:25 ` Thibaut
2020-04-21 22:33 ` Jonathan Morton
2020-04-21 22:44 ` Dave Taht
2020-04-21 22:50 ` Dave Taht
2020-04-21 23:07 ` Jonathan Morton
2020-04-21 23:27 ` Dave Taht
2020-04-22 8:28 ` Thibaut
2020-04-22 9:03 ` Luca Muscariello
2020-04-22 14:48 ` Dave Taht
2020-04-22 15:28 ` Luca Muscariello
2020-04-22 17:42 ` David P. Reed
2020-04-23 9:29 ` Maxime Bizon
2020-04-23 11:57 ` Toke Høiland-Jørgensen
2020-04-23 12:29 ` Luca Muscariello
2020-04-23 12:33 ` Maxime Bizon
2020-04-23 16:42 ` Toke Høiland-Jørgensen
2020-04-23 17:31 ` Maxime Bizon
2020-04-23 18:30 ` Sebastian Moeller
2020-04-23 21:53 ` Maxime Bizon
2020-04-23 18:35 ` Toke Høiland-Jørgensen [this message]
2020-04-23 21:59 ` Maxime Bizon
2020-04-23 23:05 ` Toke Høiland-Jørgensen
2020-04-23 23:11 ` Dave Taht
2020-04-23 16:28 ` Dave Taht
2020-04-21 23:06 ` Justin Kilpatrick
2020-04-21 23:19 ` Dave Taht
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=871roe6of0.fsf@toke.dk \
--to=toke@redhat.com \
--cc=cake@lists.bufferbloat.net \
--cc=dave.taht@gmail.com \
--cc=mbizon@freebox.fr \
/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