Go to file
Toke Høiland-Jørgensen 8d387a483d bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop
[upstream commit ba452c9e996d8a4c347b32805f91abb70de5de7e]

Based on the discussion in [0], update the bpf_redirect_neigh() helper to
accept an optional parameter specifying the nexthop information. This makes
it possible to combine bpf_fib_lookup() and bpf_redirect_neigh() without
incurring a duplicate FIB lookup - since the FIB lookup helper will return
the nexthop information even if no neighbour is present, this can simply
be passed on to bpf_redirect_neigh() if bpf_fib_lookup() returns
BPF_FIB_LKUP_RET_NO_NEIGH. Thus fix & extend it before helper API is frozen.

  [0] https://lore.kernel.org/bpf/393e17fc-d187-3a8d-2f0d-a627c7c63fca@iogearbox.net/

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/bpf/160322915615.32199.1187570224032024535.stgit@toke.dk
2022-07-21 11:32:48 +08:00
Documentation docs/bpf: Add BPF ring buffer design notes 2022-07-21 11:32:42 +08:00
LICENSES Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
arch bpf: Fix trampoline generation for fmod_ret programs 2022-07-21 11:32:34 +08:00
block rq-qos: fix missed wake-ups in rq_qos_throttle try two 2022-04-12 16:58:30 +08:00
certs certs: Fix blacklist flag type confusion 2021-04-12 12:52:25 +08:00
crypto crypto: rng - fix crypto_rng_reset() refcounting when !CRYPTO_STATS 2021-05-20 16:07:34 +08:00
drivers bpf: Implement CAP_BPF 2022-07-21 11:32:38 +08:00
fs bpf: Refactor to provide aux info to bpf_iter_init_seq_priv_t 2022-07-21 11:32:40 +08:00
include bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop 2022-07-21 11:32:48 +08:00
init bpf: Introduce BPF_PROG_TYPE_LSM 2022-07-21 11:32:34 +08:00
ipc ipc/util.c: sysvipc_find_ipc() incorrectly updates position index 2021-03-16 16:27:51 +08:00
kernel bpf: Add get{peer, sock}name attach types for sock_addr 2022-07-21 11:32:47 +08:00
lib bug: Remove redundant condition check in report_bug 2021-05-20 16:07:55 +08:00
mm uaccess: Add strict non-pagefault kernel-space read function 2022-07-21 11:32:31 +08:00
net bpf: Fix bpf_redirect_neigh helper api to support supplying nexthop 2022-07-21 11:32:48 +08:00
package configs: enable CONFIG_BPF_KPROBE_OVERRIDE=y 2022-04-06 16:56:42 +08:00
samples kfifo: fix ternary sign extension bugs 2021-05-20 16:08:01 +08:00
scripts bpf: fix selftest case compile error for bpf_timer 2022-07-21 11:32:46 +08:00
security bpf: Implement bpf_local_storage for inodes 2022-07-21 11:32:41 +08:00
sound ALSA: usb: midi: don't return -ENOMEM when usb_urb_ep_type_check fails 2021-05-20 16:07:59 +08:00
tools bpf, selftests: Add redirect_neigh selftest 2022-07-21 11:32:48 +08:00
usr Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
virt KVM: Stop looking for coalesced MMIO zones if the bus is destroyed 2021-05-20 16:07:44 +08:00
.clang-format Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.cocciconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.get_maintainer.ignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitattributes Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
.gitignore Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
COPYING Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
CREDITS Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kbuild Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
Kconfig Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
MAINTAINERS bpf: Introduce BPF_PROG_TYPE_LSM 2022-07-21 11:32:34 +08:00
Makefile bpf: Resolve BTF IDs in vmlinux image 2022-07-21 11:32:40 +08:00
README Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
README.md Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
backport_remove_lists.txt Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
tools_key.pub Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00

README.md

Tencent Linux Kernel 4.0