kernel_optimize_test/include
Lorenz Bauer f79e7ea571 bpf: Use a table to drive helper arg type checks
The mapping between bpf_arg_type and bpf_reg_type is encoded in a big
hairy if statement that is hard to follow. The debug output also leaves
to be desired: if a reg_type doesn't match we only print one of the
options, instead printing all the valid ones.

Convert the if statement into a table which is then used to drive type
checking. If none of the reg_types match we print all options, e.g.:

    R2 type=rdonly_buf expected=fp, pkt, pkt_meta, map_value

Signed-off-by: Lorenz Bauer <lmb@cloudflare.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Link: https://lore.kernel.org/bpf/20200921121227.255763-12-lmb@cloudflare.com
2020-09-21 15:00:41 -07:00
..
acpi
asm-generic iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
clocksource
crypto
drm
dt-bindings
keys
kunit
kvm
linux bpf: Use a table to drive helper arg type checks 2020-09-21 15:00:41 -07:00
math-emu
media
memory
misc
net tcp: simplify tcp_set_congestion_control(): Always reinitialize 2020-09-10 20:53:01 -07:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace Improvements to ext4's block allocator performance for very large file 2020-08-21 11:03:38 -07:00
uapi bpf: Add BPF_PROG_BIND_MAP syscall 2020-09-15 18:28:27 -07:00
vdso
video
xen xen: branch for v5.9-rc1b 2020-08-14 13:34:37 -07:00