From: Thomas Graf <tgraf@suug.ch>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Tom Herbert <tom@herbertland.com>,
roopa <roopa@cumulusnetworks.com>,
netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation
Date: Thu, 3 Nov 2016 09:20:01 -0600 [thread overview]
Message-ID: <CACby=pmSSG5P+7=wDvqwkVp_yXw9o8_pREZCLfDov_XFbueFAQ@mail.gmail.com> (raw)
In-Reply-To: <c24f3ad9-764a-0ffa-51bf-2b42fb3ae585@stressinduktion.org>
On 3 November 2016 at 08:52, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> On 02.11.2016 23:54, Thomas Graf wrote:
>> Why would I want to accept the overhead if I simply avoid it? Just
>> parsing the header and doing the hash lookup will add cost, cost for
>> each packet.
>
> That is true, but in case you are outside of the namespace, you still
> have to calculate the cost of doing the FIB lookup for the BPF program
> each time, too.
>
> E.g. given the lookup cost in a hash for a netnwork namespace pointer
> vs. the cost of doing a FIB lookup to get a program that does a specific
> transformation sounds at least in the big O-notiation to be in a better
> place. ;)
>
> If you have to do both anyway, probably your patchset will perform
> better, I agree.
Most containers are unprivileged, the route inside the container's
namespace is owned by the host and we can attach the BPF program
directly to the default route inside the container and all packets
egressing from the container will pass through it. That fib lookup is
needed anyway so we can leverage the cost of that lookup. We can drop
hostile packets early without ever going on L2 level.
next prev parent reply other threads:[~2016-11-03 15:20 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-01 0:37 [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation Thomas Graf
2016-11-01 0:37 ` [PATCH net-next v2 1/5] route: Set orig_output when redirecting to lwt on locally generated traffic Thomas Graf
2016-11-01 0:37 ` [PATCH net-next v2 2/5] route: Set lwtstate for local traffic and cached input dsts Thomas Graf
2016-11-01 0:37 ` [PATCH net-next v2 3/5] bpf: BPF for lightweight tunnel encapsulation Thomas Graf
2016-11-01 1:10 ` kbuild test robot
2016-11-01 2:39 ` kbuild test robot
2016-11-01 20:11 ` David Ahern
2016-11-01 21:03 ` Thomas Graf
2016-11-02 13:39 ` Roopa Prabhu
2016-11-02 22:58 ` Thomas Graf
2016-11-01 0:37 ` [PATCH net-next v2 4/5] bpf: Add samples for LWT-BPF Thomas Graf
2016-11-01 0:37 ` [PATCH net-next v2 5/5] lwtunnel: Limit number of recursions on output to 5 Thomas Graf
2016-11-01 4:52 ` kbuild test robot
2016-11-01 8:09 ` Thomas Graf
2016-11-01 10:54 ` [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation Hannes Frederic Sowa
2016-11-01 18:51 ` Thomas Graf
2016-11-01 20:08 ` Hannes Frederic Sowa
2016-11-01 20:59 ` Thomas Graf
2016-11-01 22:12 ` Hannes Frederic Sowa
2016-11-01 23:07 ` Tom Herbert
2016-11-02 10:48 ` Hannes Frederic Sowa
2016-11-02 16:59 ` Tom Herbert
2016-11-03 14:16 ` Thomas Graf
2016-11-02 22:57 ` Thomas Graf
2016-11-02 23:27 ` Tom Herbert
2016-11-02 22:54 ` Thomas Graf
2016-11-03 14:52 ` Hannes Frederic Sowa
2016-11-03 15:20 ` Thomas Graf [this message]
2016-11-01 16:17 ` Tom Herbert
2016-11-01 18:20 ` Thomas Graf
2016-11-01 18:51 ` Tom Herbert
2016-11-01 19:11 ` Thomas Graf
2016-11-01 19:27 ` Tom Herbert
2016-11-01 19:59 ` Thomas Graf
2016-11-01 20:33 ` Tom Herbert
2016-11-01 21:05 ` Thomas Graf
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='CACby=pmSSG5P+7=wDvqwkVp_yXw9o8_pREZCLfDov_XFbueFAQ@mail.gmail.com' \
--to=tgraf@suug.ch \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=tom@herbertland.com \
/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;
as well as URLs for NNTP newsgroup(s).