summaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdp_adjust_tail_user.c
Commit message (Collapse)AuthorAgeFilesLines
* samples: bpf: convert some XDP samples from bpf_load to libbpfJakub Kicinski2018-05-111-14/+22
| | | | | | | | | | | | | | | Now that we can use full powers of libbpf in BPF samples, we should perhaps make the simplest XDP programs not depend on bpf_load helpers. This way newcomers will be exposed to the recommended library from the start. Use of bpf_prog_load_xattr() will also make it trivial to later on request offload of the programs by simply adding ifindex to the xattr. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
* bpf: add bpf_xdp_adjust_tail sample progNikita V. Shirokov2018-04-181-0/+142
adding bpf's sample program which is using bpf_xdp_adjust_tail helper by generating ICMPv4 "packet to big" message if ingress packet's size is bigger then 600 bytes Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
OpenPOWER on IntegriCloud