linux-stable/include
Eelco Chaudron bf25146a55 bpf: add frags support to the bpf_xdp_adjust_tail() API
This change adds support for tail growing and shrinking for XDP frags.

When called on a non-linear packet with a grow request, it will work
on the last fragment of the packet. So the maximum grow size is the
last fragments tailroom, i.e. no new buffer will be allocated.
A XDP frags capable driver is expected to set frag_size in xdp_rxq_info
data structure to notify the XDP core the fragment size.
frag_size set to 0 is interpreted by the XDP core as tail growing is
not allowed.
Introduce __xdp_rxq_info_reg utility routine to initialize frag_size field.

When shrinking, it will work from the last fragment, all the way down to
the base buffer depending on the shrinking size. It's important to mention
that once you shrink down the fragment(s) are freed, so you can not grow
again to the original size.

Acked-by: Toke Hoiland-Jorgensen <toke@redhat.com>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Acked-by: Jakub Kicinski <kuba@kernel.org>
Co-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Link: https://lore.kernel.org/r/eabda3485dda4f2f158b477729337327e609461d.1642758637.git.lorenzo@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2022-01-21 14:14:02 -08:00
..
acpi Power management updates for 5.17-rc1 2022-01-10 20:34:00 -08:00
asm-generic Networking changes for 5.17. 2022-01-10 19:06:09 -08:00
clocksource
crypto random: early initialization of ChaCha constants 2022-01-07 00:25:25 +01:00
drm Merge tag 'drm-msm-next-2021-12-26' of ssh://gitlab.freedesktop.org/drm/msm into drm-next 2021-12-29 14:02:44 +10:00
dt-bindings SoC: Add support for StarFive JH7100 RISC-V SoC 2022-01-10 08:32:37 -08:00
keys
kunit
kvm
linux bpf: introduce BPF_F_XDP_HAS_FRAGS flag in prog_flags loading the ebpf program 2022-01-21 14:14:01 -08:00
math-emu
media media: dmxdev: drop unneeded <linux/kernel.h> inclusion from other headers 2021-12-14 16:19:04 +01:00
memory
misc
net bpf: add frags support to the bpf_xdp_adjust_tail() API 2022-01-21 14:14:02 -08:00
pcmcia
ras
rdma
scsi
soc Networking changes for 5.17. 2022-01-10 19:06:09 -08:00
sound ASoC: Fixes for v5.16 2021-11-25 14:35:24 +01:00
target
trace net: skb: use kfree_skb_reason() in __udp4_lib_rcv() 2022-01-09 16:30:35 -08:00
uapi bpf: introduce bpf_xdp_get_buff_len helper 2022-01-21 14:14:02 -08:00
vdso
video
xen xen/console: harden hvc_xen against event channel storms 2021-12-16 08:24:08 +01:00