bpf: add bpf_xdp_adjust_tail sample prog
authorNikita V. Shirokov <tehnerd@tehnerd.com>
Wed, 18 Apr 2018 04:42:23 +0000 (21:42 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 Apr 2018 21:34:17 +0000 (23:34 +0200)
commitc6ffd1ff785675c4a572c79f0e55ba5735edbaa0
tree89bf245d8d4d86f46b4bea11473d9441b1f53782
parent0367d0a29427d5916b98cf31dfc85a8293540614
bpf: add bpf_xdp_adjust_tail sample prog

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>
samples/bpf/Makefile
samples/bpf/xdp_adjust_tail_kern.c [new file with mode: 0644]
samples/bpf/xdp_adjust_tail_user.c [new file with mode: 0644]
tools/testing/selftests/bpf/bpf_helpers.h