netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	alexei.starovoitov@gmail.com, daniel@iogearbox.net,
	tom@herbertland.com, roopa@cumulusnetworks.com
Subject: Re: [PATCH v3 net-next 0/4] bpf: BPF for lightweight tunnel encapsulation
Date: Tue, 29 Nov 2016 15:58:02 +0100	[thread overview]
Message-ID: <20161129145802.GA16856@pox.localdomain> (raw)
In-Reply-To: <50764658-4bf7-966b-bc61-d6840d7c03f2@stressinduktion.org>

Hi Hannes,

On 11/29/16 at 03:15pm, Hannes Frederic Sowa wrote:
> Did you look at the cgroup based hooks which were added recently in
> ip_finish_output for cgroup ebpf support and in general the cgroup bpf
> subsystem. Does some of this solve the problem for you already? Would be
> interesting to hear your opinion on that.

What I'm looking for is the ability to collect statistics and generate
samples for a subset of the traffic, e.g. all intra data center
traffic, all packets hitting the default route in a network namespace,
all packets which use a dst tying a certain endpoint to particular TCP
metrics. For the examples above, LWT provides a very intuitive and
natural way to do so while amortizing the cost of the route lookup
which is required anyway.

The cgroup hook provides similar semantics but if the application
context is of interest. Obviously, tasks in a cgroup may be sharing
routes so I can't use it as a replacement. However, using the two in
combination will become highly useful as it allows to gather statistics
individually for both application context and routing context and then
aggregate them to see how applications are using different network
segments.

Aside from the different context matching, the cgroup hook will not
allow to modify the packet as the lwtunnel_xmit() post
ip_finish_output does.

      reply	other threads:[~2016-11-29 14:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-29 13:21 [PATCH v3 net-next 0/4] bpf: BPF for lightweight tunnel encapsulation Thomas Graf
2016-11-29 13:21 ` [PATCH net-next v3 1/4] route: Set orig_output when redirecting to lwt on locally generated traffic Thomas Graf
2016-11-29 13:21 ` [PATCH net-next v3 2/4] route: Set lwtstate for local traffic and cached input dsts Thomas Graf
2016-11-29 13:21 ` [PATCH net-next v3 3/4] bpf: BPF for lightweight tunnel infrastructure Thomas Graf
2016-11-30  0:15   ` Alexei Starovoitov
2016-11-30  2:52     ` John Fastabend
2016-11-30  5:37       ` Alexei Starovoitov
2016-11-30 16:57         ` John Fastabend
2016-11-30  6:48     ` Thomas Graf
2016-11-30  7:01       ` Alexei Starovoitov
2016-11-30  8:57         ` Thomas Graf
2016-11-29 13:21 ` [PATCH net-next v3 4/4] bpf: Add tests and samples for LWT-BPF Thomas Graf
2016-11-30  0:17   ` Alexei Starovoitov
2016-11-30  6:52     ` Thomas Graf
2016-11-29 14:15 ` [PATCH v3 net-next 0/4] bpf: BPF for lightweight tunnel encapsulation Hannes Frederic Sowa
2016-11-29 14:58   ` Thomas Graf [this message]

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=20161129145802.GA16856@pox.localdomain \
    --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).