From: Alexei Starovoitov <ast@plumgrid.com>
To: Daniel Borkmann <daniel@iogearbox.net>, stephen@networkplumber.org
Cc: jhs@mojatatu.com, jiri@resnulli.us, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 -next v2 2/2] tc: add eBPF support to f_bpf
Date: Mon, 16 Mar 2015 14:23:34 -0700 [thread overview]
Message-ID: <550749D6.3070906@plumgrid.com> (raw)
In-Reply-To: <e6ccd2548197c60c0686dca78ae02fc604fde065.1426530729.git.daniel@iogearbox.net>
On 3/16/15 11:37 AM, Daniel Borkmann wrote:
> This work adds the tc frontend for kernel commit e2e9b6541dd4 ("cls_bpf:
> add initial eBPF support for programmable classifiers").
>
> A C-like classifier program (f.e. see e2e9b6541dd4) is being compiled via
> LLVM's eBPF backend into an ELF file, that is then being passed to tc. tc
> then loads, if any, eBPF maps and eBPF opcodes (with fixed-up eBPF map file
> descriptors) out of its dedicated sections, and via bpf(2) into the kernel
> and then the resulting fd via netlink down to cls_bpf. cls_bpf allows for
> annotations, currently, I've used the file name for that, so that the user
> can easily identify his filter when dumping configurations back.
>
> Example usage:
>
> clang -O2 -emit-llvm -c cls.c -o - | llc -march=bpf -filetype=obj -o cls.o
> tc filter add dev em1 parent 1: bpf run object-file cls.o classid x:y
>
> tc filter show dev em1 [...]
> filter parent 1: protocol all pref 49152 bpf handle 0x1 flowid x:y cls.o
>
> I placed the parser bits derived from Alexei's kernel sample, into tc_bpf.c
> as my next step is to also add the same support for BPF action, so we can
> have a fully fledged eBPF classifier and action in tc.
>
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
looks good to me
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
next prev parent reply other threads:[~2015-03-16 21:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-16 18:37 [PATCH iproute2 -next v2 0/2] f_bpf update Daniel Borkmann
2015-03-16 18:37 ` [PATCH iproute2 -next v2 1/2] misc: header rebase, add bpf.h Daniel Borkmann
2015-03-16 18:37 ` [PATCH iproute2 -next v2 2/2] tc: add eBPF support to f_bpf Daniel Borkmann
2015-03-16 21:23 ` Alexei Starovoitov [this message]
2015-03-24 22:27 ` Stephen Hemminger
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=550749D6.3070906@plumgrid.com \
--to=ast@plumgrid.com \
--cc=daniel@iogearbox.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.