]> git.baikalelectronics.ru Git - kernel.git/commit
act_bpf: add initial eBPF support for actions
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 20 Mar 2015 14:11:12 +0000 (15:11 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Mar 2015 23:10:44 +0000 (19:10 -0400)
commit828295422afac43fc6de380179bf0cc02a51198d
tree0fb121bb44e532307c10a3b7e4154f60381ebbbc
parent7cb5dc3928cf35ff7f180fd083cb2d24e0b8e352
act_bpf: add initial eBPF support for actions

This work extends the "classic" BPF programmable tc action by extending
its scope also to native eBPF code!

Together with commit 22198f209c33 ("cls_bpf: add initial eBPF support
for programmable classifiers") this adds the facility to implement fully
flexible classifier and actions for tc that can be implemented in a C
subset in user space, "safely" loaded into the kernel, and being run in
native speed when JITed.

Also, since eBPF maps can be shared between eBPF programs, it offers the
possibility that cls_bpf and act_bpf can share data 1) between themselves
and 2) between user space applications. That means that, f.e. customized
runtime statistics can be collected in user space, but also more importantly
classifier and action behaviour could be altered based on map input from
the user space application.

For the remaining details on the workflow and integration, see the cls_bpf
commit 22198f209c33. Preliminary iproute2 part can be found under [1].

  [1] http://git.breakpoint.cc/cgit/dborkman/iproute2.git/log/?h=ebpf-act

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tc_act/tc_bpf.h
include/uapi/linux/tc_act/tc_bpf.h
net/sched/act_bpf.c