alistair23-linux/include/uapi
Toke Høiland-Jørgensen 43e74c0267 bpf_xdp_redirect_map: Perform map lookup in eBPF helper
The bpf_redirect_map() helper used by XDP programs doesn't return any
indication of whether it can successfully redirect to the map index it was
given. Instead, BPF programs have to track this themselves, leading to
programs using duplicate maps to track which entries are populated in the
devmap.

This patch fixes this by moving the map lookup into the bpf_redirect_map()
helper, which makes it possible to return failure to the eBPF program. The
lower bits of the flags argument is used as the return code, which means
that existing users who pass a '0' flag argument will get XDP_ABORTED.

With this, a BPF program can check the return code from the helper call and
react by, for instance, substituting a different redirect. This works for
any type of map used for redirect.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2019-06-29 01:31:09 +02:00
..
asm-generic bpf: net: Add SO_DETACH_REUSEPORT_BPF 2019-06-15 01:21:19 +02:00
drm drm: introduce a capability flag for syncobj timeline support 2019-05-02 12:36:47 +10:00
linux bpf_xdp_redirect_map: Perform map lookup in eBPF helper 2019-06-29 01:31:09 +02:00
misc uapi/habanalabs: add opcode for enable/disable device debug mode 2019-05-24 22:46:15 +03:00
mtd
rdma RDMA/core: Change system parameters callback from dumpit to doit 2019-05-13 22:16:48 -03:00
scsi scsi: fc: add FPIN ELS definition 2019-04-08 21:29:16 -04:00
sound ASoC: Fixes for v5.2 2019-06-13 17:33:34 +02:00
video
xen