bpf: adding tests for bpf_xdp_adjust_tail
authorNikita V. Shirokov <tehnerd@tehnerd.com>
Wed, 18 Apr 2018 04:42:22 +0000 (21:42 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 Apr 2018 21:34:17 +0000 (23:34 +0200)
commit0367d0a29427d5916b98cf31dfc85a8293540614
tree1fb815b56707d8a4affc19d5741fb699bbce5aa7
parent587b80cce95b8aab89e5e35033953c005dc47f01
bpf: adding tests for bpf_xdp_adjust_tail

adding selftests for bpf_xdp_adjust_tail helper. in this synthetic test
we are testing that 1) if data_end < data helper will return EINVAL
2) for normal use case packet's length would be reduced.

Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/include/uapi/linux/bpf.h
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/bpf_helpers.h
tools/testing/selftests/bpf/test_adjust_tail.c [new file with mode: 0644]
tools/testing/selftests/bpf/test_progs.c