bpf: make generic xdp compatible w/ bpf_xdp_adjust_tail
authorNikita V. Shirokov <tehnerd@tehnerd.com>
Wed, 18 Apr 2018 04:42:14 +0000 (21:42 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 18 Apr 2018 21:34:16 +0000 (23:34 +0200)
commit198d83bb3becf2e9c6c4fa744f35296c20da795a
treed980a614c40680b5e1fb2500fa7b821a9e428129
parentb32cc5b9a346319c171e3ad905e0cddda032b5eb
bpf: make generic xdp compatible w/ bpf_xdp_adjust_tail

w/ bpf_xdp_adjust_tail helper xdp's data_end pointer could be changed as
well (only "decrease" of pointer's location is going to be supported).
changing of this pointer will change packet's size.
for generic XDP we need to reflect this packet's length change by
adjusting skb's tail pointer

Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Nikita V. Shirokov <tehnerd@tehnerd.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
net/core/dev.c