diff options
author | Nikita V. Shirokov <tehnerd@tehnerd.com> | 2018-04-17 21:42:23 -0700 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2018-04-18 23:34:17 +0200 |
commit | c6ffd1ff785675c4a572c79f0e55ba5735edbaa0 (patch) | |
tree | 89bf245d8d4d86f46b4bea11473d9441b1f53782 /tools | |
parent | 0367d0a29427d5916b98cf31dfc85a8293540614 (diff) | |
download | linux-stable-c6ffd1ff785675c4a572c79f0e55ba5735edbaa0.tar.gz linux-stable-c6ffd1ff785675c4a572c79f0e55ba5735edbaa0.tar.bz2 linux-stable-c6ffd1ff785675c4a572c79f0e55ba5735edbaa0.zip |
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/bpf/bpf_helpers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/bpf_helpers.h b/tools/testing/selftests/bpf/bpf_helpers.h index 50c607014b22..9271576bdc8f 100644 --- a/tools/testing/selftests/bpf/bpf_helpers.h +++ b/tools/testing/selftests/bpf/bpf_helpers.h @@ -132,6 +132,8 @@ static int (*bpf_l3_csum_replace)(void *ctx, int off, int from, int to, int flag (void *) BPF_FUNC_l3_csum_replace; static int (*bpf_l4_csum_replace)(void *ctx, int off, int from, int to, int flags) = (void *) BPF_FUNC_l4_csum_replace; +static int (*bpf_csum_diff)(void *from, int from_size, void *to, int to_size, int seed) = + (void *) BPF_FUNC_csum_diff; static int (*bpf_skb_under_cgroup)(void *ctx, void *map, int index) = (void *) BPF_FUNC_skb_under_cgroup; static int (*bpf_skb_change_head)(void *, int len, int flags) = |