]> git.proxmox.com Git - mirror_iproute2.git/commit
tc, bpf: finalize eBPF support for cls and act front-end
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 1 Apr 2015 15:57:44 +0000 (17:57 +0200)
committerStephen Hemminger <shemming@brocade.com>
Fri, 10 Apr 2015 20:31:19 +0000 (13:31 -0700)
commit6256f8c9e45f01187b297a576e148534a393c990
tree503648c148d7778a9eb2a6afa86431cf8054d06d
parentf0eb8da59a01557bd782a28c30fd1b458147403a
tc, bpf: finalize eBPF support for cls and act front-end

This work finalizes both eBPF front-ends for the classifier and action
part in tc, it allows for custom ELF section selection, a simplified tc
command frontend (while keeping compat), reusing of common maps between
classifier and actions residing in the same object file, and exporting
of all map fds to an eBPF agent for handing off further control in user
space.

It also adds an extensive example of how eBPF can be used, and a minimal
self-contained example agent that dumps map data. The example is well
documented and hopefully provides a good starting point into programming
cls_bpf and act_bpf.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
13 files changed:
README.iproute2+tc
examples/bpf/bpf_agent.c [new file with mode: 0644]
examples/bpf/bpf_funcs.h [new file with mode: 0644]
examples/bpf/bpf_prog.c [new file with mode: 0644]
examples/bpf/bpf_shared.h [new file with mode: 0644]
examples/bpf/bpf_sys.h [new file with mode: 0644]
include/bpf_elf.h [new file with mode: 0644]
include/bpf_scm.h [new file with mode: 0644]
include/utils.h
tc/f_bpf.c
tc/m_bpf.c
tc/tc_bpf.c
tc/tc_bpf.h