mirror_iproute2/examples/bpf
Daniel Borkmann 4dd3f50af4 tc, bpf: add support for map pre/allocation
Follow-up to kernel commit 6c9059817432 ("bpf: pre-allocate hash map
elements"). Add flags support, so that we can pass in BPF_F_NO_PREALLOC
flag for disallowing preallocation. Update examples accordingly and also
remove the BPF_* map helper macros from them as they were not very useful.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2016-04-11 21:54:47 +00:00
..
bpf_agent.c tc: fix bpf compilation with old glibc 2015-07-27 14:35:42 -07:00
bpf_cyclic.c tc, bpf: add support for map pre/allocation 2016-04-11 21:54:47 +00:00
bpf_graft.c tc, bpf: add support for map pre/allocation 2016-04-11 21:54:47 +00:00
bpf_prog.c tc, bpf: add support for map pre/allocation 2016-04-11 21:54:47 +00:00
bpf_shared.c tc, bpf: add support for map pre/allocation 2016-04-11 21:54:47 +00:00
bpf_shared.h examples, bpf: further improve examples 2015-12-10 08:56:45 -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 tc, bpf: add support for map pre/allocation 2016-04-11 21:54:47 +00:00
README {f,m}_bpf: add more example code 2015-11-29 11:55:16 -08:00

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