linux/tools
Jesper Dangaard Brouer e1850ea9bd bpf: bpf_fib_lookup return MTU value as output when looked up
The BPF-helpers for FIB lookup (bpf_xdp_fib_lookup and bpf_skb_fib_lookup)
can perform MTU check and return BPF_FIB_LKUP_RET_FRAG_NEEDED. The BPF-prog
don't know the MTU value that caused this rejection.

If the BPF-prog wants to implement PMTU (Path MTU Discovery) (rfc1191) it
need to know this MTU value for the ICMP packet.

Patch change lookup and result struct bpf_fib_lookup, to contain this MTU
value as output via a union with 'tot_len' as this is the value used for
the MTU lookup.

V5:
 - Fixed uninit value spotted by Dan Carpenter.
 - Name struct output member mtu_result

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/161287789952.790810.13134700381067698781.stgit@firesoul
2021-02-13 01:15:22 +01:00
..
accounting
arch tools headers UAPI: Synch KVM's svm.h header with the kernel 2020-12-24 09:24:20 -03:00
bootconfig tools/bootconfig: Add tracing_on support to helper scripts 2021-01-14 10:32:20 -05:00
bpf tools/resolve_btfids: Add /libbpf to .gitignore 2021-02-12 13:08:26 -08:00
build tools: Factor Clang, LLC and LLVM utils definitions 2021-01-29 01:25:34 +01:00
cgroup
debugging
edid
firewire
firmware
gpio
hv
iio
include bpf: bpf_fib_lookup return MTU value as output when looked up 2021-02-13 01:15:22 +01:00
io_uring
kvm/kvm_stat
laptop
leds
lib libbpf: Ignore non function pointer member in struct_ops 2021-02-12 11:49:36 -08:00
memory-model
objtool Fix a segfault that occurs when built with Clang. 2020-12-27 09:08:23 -08:00
pci
pcmcia
perf tools: Factor Clang, LLC and LLVM utils definitions 2021-01-29 01:25:34 +01:00
power Kbuild updates for v5.11 2020-12-22 14:02:39 -08:00
scripts tools: Factor Clang, LLC and LLVM utils definitions 2021-01-29 01:25:34 +01:00
spi
testing selftests/bpf: Add test for bpf_iter_task_vma 2021-02-12 12:56:54 -08:00
thermal/tmon
time
usb
virtio tools/virtio: add barrier for aarch64 2020-12-18 16:14:30 -05:00
vm
wmi
Makefile