From: Pablo Neira Ayuso <pablo@netfilter.org>
To: David Miller <davem@davemloft.net>
Cc: phil@nwl.cc, laforge@gnumonks.org, fw@strlen.de,
daniel@iogearbox.net, netdev@vger.kernel.org,
netfilter-devel@vger.kernel.org, alexei.starovoitov@gmail.com
Subject: Re: [PATCH RFC 0/4] net: add bpfilter
Date: Tue, 20 Feb 2018 11:44:31 +0100 [thread overview]
Message-ID: <20180220104431.xsrfvdaqbw6uxmwt@salvia> (raw)
In-Reply-To: <20180219.122226.896334578399862770.davem@davemloft.net>
Hi David!
On Mon, Feb 19, 2018 at 12:22:26PM -0500, David Miller wrote:
[...]
> Netfilter's chronic performance differential is why a lot of mindshare
> was lost to userspace networking technologies.
Claiming that Netfilter is the reason for the massive adoption of
userspace networking isn't a fair statement at all.
Let's talk about performance if this is what you want:
* Our benchmarks here are delivering ~x9.5 performance boost for IPv4
load balancing from netfilter ingress.
* ~x2 faster than iptables prerouting when dropping packets at very
early stage in the network datapath - dos attack scenario - again from
the ingress hook.
* The new flowtable infrastructure that will show up in 4.16 provides
a faster forwarding path, measuring ~x2 faster forwarding here, _by
simply adding one single rule to your FORWARD chain_. And that's
just the initial implementation that got merged upstream, we have
room to fly even faster.
And that's just the beginning, we have more ongoing work, incrementally
based on top of what we have, to provide even faster datapath paths with
very simple configurations.
Note that those numbers above are very similar numbers to what we have
seen in bpf. Well, to be honest, we're just slightly behind bpf, since
benchmarks I have seen on loading balancing IPv4 is x10 from XDP,
dropping packets also slightly more than x2, which is actually happening
way earlier than ingress, naturally dropping earlier gives us better
numbers.
But it's not all about performance... let's have a look at the "iron
triangle"...
We keep usability in our radar, that's paramount for us. Netfilter is
probably so much widely more adopted than tc because of this. The kind
of problems that big Silicon datacenters have to face are simply
different to the millions of devices running Linux outthere, there are
plenty of smart devops outthere that sacrify the little performance loss
at the cost of keeping it easy to configure and maintain things.
If we want to talk about problems...
Every project has its own subset of problems. In that sense, anyone that
has spent time playing with the bpf infrastructure is very much aware of
all of its usability problems:
* You have to disable optimizations in llvm, otherwise the verifier
gets confused too smart compiler optimizations and rejects the code.
* Very hard to debug the reason why the verifier is rejecting apparently
valid code. That results in people playing strange "moving code around
up and down".
* Lack of sufficient abstraction: bpf is not only exposing its own
software bugs through its interface, but it will also bite the dust
with CPU bugs due to lack of glue code to hide details behind the
syscall interface curtain. That will need a kernel upgrade after all to
fix, so all benefits of adding new programs. We've even seem claims on
performance being more important than security in this mailing list.
Don't get me wrong, no software is safe from security issues, but if you
don't abstract your resources in the right way, you have more chance to
have experimence more problems.
Just to mention a few of them.
So, please, let's focus each of us in our own work. Let me remind your
wise words - I think just one year ago in another of these episodes of
the bpf vs. netfilter: "We're all working to achieve the same goals",
even if we're working on competing projects inside Linux.
Thanks!
next prev parent reply other threads:[~2018-02-20 10:44 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 13:40 [PATCH RFC 0/4] net: add bpfilter Daniel Borkmann
2018-02-16 13:40 ` [PATCH RFC 1/4] modules: allow insmod load regular elf binaries Daniel Borkmann
2018-02-16 13:40 ` [PATCH RFC 2/4] bpf: introduce bpfilter commands Daniel Borkmann
2018-02-16 13:40 ` [PATCH RFC 3/4] net: initial bpfilter skeleton Daniel Borkmann
2018-02-16 13:40 ` [PATCH RFC 4/4] bpf: rough bpfilter codegen example hack Daniel Borkmann
2018-02-16 14:57 ` [PATCH RFC 0/4] net: add bpfilter Florian Westphal
2018-02-16 16:14 ` Florian Westphal
2018-02-16 20:44 ` Daniel Borkmann
2018-02-17 12:33 ` Harald Welte
2018-02-17 19:18 ` Florian Westphal
2018-02-16 22:33 ` David Miller
2018-02-17 12:21 ` Harald Welte
2018-02-17 20:10 ` Florian Westphal
2018-02-17 22:38 ` Florian Westphal
2018-02-16 16:53 ` Daniel Borkmann
2018-02-16 22:32 ` David Miller
2018-02-17 12:11 ` Harald Welte
2018-02-18 0:35 ` Florian Westphal
2018-02-19 12:03 ` Daniel Borkmann
2018-02-19 12:52 ` Harald Welte
2018-02-19 14:44 ` David Miller
2018-02-19 14:53 ` Florian Westphal
2018-02-19 15:07 ` David Miller
2018-02-19 15:20 ` Florian Westphal
2018-02-19 15:28 ` David Miller
2018-02-19 15:23 ` Harald Welte
2018-02-19 15:32 ` David Miller
2018-02-19 15:37 ` Jan Engelhardt
2018-02-19 15:43 ` David Miller
2018-02-19 15:36 ` David Miller
2018-02-19 17:20 ` Harald Welte
2018-02-19 17:29 ` David Miller
2018-02-19 18:37 ` Harald Welte
2018-02-19 18:47 ` David Miller
2018-02-19 17:40 ` Arturo Borrero Gonzalez
2018-02-19 18:06 ` Arturo Borrero Gonzalez
2018-02-19 18:43 ` David Miller
2018-02-19 15:00 ` David Miller
2018-02-19 14:59 ` Florian Westphal
2018-02-19 15:13 ` David Miller
2018-02-19 15:15 ` Florian Westphal
2018-02-19 15:27 ` David Miller
2018-02-19 15:38 ` Harald Welte
2018-02-19 15:44 ` David Miller
2018-02-19 17:14 ` Phil Sutter
2018-02-19 17:22 ` David Miller
2018-02-19 18:05 ` Phil Sutter
2018-02-19 18:41 ` David Miller
2018-02-19 20:41 ` Phil Sutter
2018-02-19 21:13 ` Florian Westphal
2018-02-20 10:44 ` Pablo Neira Ayuso [this message]
2018-02-20 14:07 ` Daniel Borkmann
2018-02-20 14:55 ` David Miller
2018-02-21 1:52 ` Alexei Starovoitov
2018-02-21 12:01 ` Pablo Neira Ayuso
2018-02-21 12:13 ` Florian Westphal
2018-02-22 2:20 ` nft/bpf interpreters and spectre2. Was: " Alexei Starovoitov
2018-02-22 11:39 ` Pablo Neira Ayuso
2018-02-22 17:06 ` Alexei Starovoitov
2018-02-22 18:47 ` Jann Horn
2018-02-19 17:41 ` Arturo Borrero Gonzalez
2018-02-19 21:30 ` Jozsef Kadlecsik
2018-02-19 15:27 ` Harald Welte
2018-02-19 15:31 ` David Miller
2018-02-19 17:09 ` Phil Sutter
2018-02-19 17:15 ` David Miller
2018-02-20 13:05 ` Phil Sutter
2018-02-20 9:35 ` Michal Kubecek
2018-02-20 18:10 ` Phil Sutter
2018-02-19 17:32 ` Harald Welte
2018-02-19 17:41 ` Arturo Borrero Gonzalez
2018-02-19 21:42 ` Willem de Bruijn
2018-02-18 23:35 ` Florian Westphal
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180220104431.xsrfvdaqbw6uxmwt@salvia \
--to=pablo@netfilter.org \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=fw@strlen.de \
--cc=laforge@gnumonks.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=phil@nwl.cc \
/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