iproute2/examples/bpf
Daniel Borkmann 0b7e3fc8f1 {f,m}_bpf: add more example code
I've added three examples to examples/bpf/ that demonstrate how one can
implement eBPF tail calls in tc with f.e. multiple levels of nesting.
That should act as a good starting point, but also as test cases for the
ELF loader and kernel. A real test suite for {f,m,e}_bpf is still to be
developed in future work.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
2015-11-29 11:55:16 -08:00
..
README {f,m}_bpf: add more example code 2015-11-29 11:55:16 -08:00
bpf_agent.c tc: fix bpf compilation with old glibc 2015-07-27 14:35:42 -07:00
bpf_cyclic.c {f,m}_bpf: add more example code 2015-11-29 11:55:16 -08:00
bpf_funcs.h {f,m}_bpf: add more example code 2015-11-29 11:55:16 -08:00
bpf_graft.c {f,m}_bpf: add more example code 2015-11-29 11:55:16 -08:00
bpf_prog.c examples: bpf: fix ld offs to have same prog loaded on ingress/egress 2015-04-27 16:42:32 -07:00
bpf_shared.c {f,m}_bpf: allow for sharing maps 2015-11-23 16:10:44 -08:00
bpf_shared.h {f,m}_bpf: allow for sharing maps 2015-11-23 16:10:44 -08:00
bpf_sys.h tc, bpf: finalize eBPF support for cls and act front-end 2015-04-10 13:31:19 -07:00
bpf_tailcall.c {f,m}_bpf: add more example code 2015-11-29 11:55:16 -08:00

README

eBPF toy code examples (running in kernel) to familiarize yourself
with syntax and features:

 - bpf_prog.c		-> Classifier examples with using maps
 - bpf_shared.c		-> Ingress/egress map sharing example
 - bpf_tailcall.c	-> Using tail call chains
 - bpf_cyclic.c		-> Simple cycle as tail calls
 - bpf_graft.c		-> Demo on altering runtime behaviour

User space code example:

 - bpf_agent.c		-> Counterpart to bpf_prog.c for user
                           space to transfer/read out map data