Go to file
Toke Høiland-Jørgensen b902278a4a bpf: Always return target ifindex in bpf_fib_lookup
commit d1c362e1dd upstream.

The bpf_fib_lookup() helper performs a neighbour lookup for the destination
IP and returns BPF_FIB_LKUP_NO_NEIGH if this fails, with the expectation
that the BPF program will pass the packet up the stack in this case.
However, with the addition of bpf_redirect_neigh() that can be used instead
to perform the neighbour lookup, at the cost of a bit of duplicated work.

For that we still need the target ifindex, and since bpf_fib_lookup()
already has that at the time it performs the neighbour lookup, there is
really no reason why it can't just return it in any case. So let's just
always return the ifindex if the FIB lookup itself succeeds.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: David Ahern <dsahern@gmail.com>
Link: https://lore.kernel.org/bpf/20201009184234.134214-1-toke@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
2024-09-23 13:03:46 +08:00
Documentation intel_idle: Introduce 'states_off' module parameter 2024-06-11 20:51:22 +08:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
arch config,arm64: open some infiniband config 2024-09-19 19:54:38 +08:00
block block: fix the incorrect spin_lock_irq to spin_lock 2024-06-11 20:44:39 +08:00
certs ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
crypto ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
dist dist: release 5.4.119-20.0009.33 2024-09-19 20:00:47 +08:00
drivers sssnic: add one dependency in Kconfig 2024-06-27 10:57:00 +08:00
fs fsnotify: invalidate dcache before IN_DELETE event 2024-06-11 20:52:41 +08:00
include fsnotify: invalidate dcache before IN_DELETE event 2024-06-11 20:52:41 +08:00
init irqlatency: add irq latency monitor support 2024-06-11 20:40:51 +08:00
ipc shm: extend forced shm destroy to support objects from several IPC nses 2024-06-11 20:44:39 +08:00
kernel x86, arm64: Add ARCH_WANT_RESERVE_CRASH_KERNEL config 2024-06-11 20:51:00 +08:00
lib libfdt: include fdt_addresses.c 2024-06-11 20:51:02 +08:00
mm mm: make wait_on_page_writeback() wait for multiple pending writebacks 2024-06-11 20:51:18 +08:00
net bpf: Always return target ifindex in bpf_fib_lookup 2024-09-23 13:03:46 +08:00
package config: sync config to origin 5.4.119-20.0009.32 2024-06-11 21:01:05 +08:00
samples ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
scripts ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
security security: Fix hook iteration for secid_to_secctx 2024-06-11 20:50:15 +08:00
sound ALSA: pcm: Fix races among concurrent hw_params and hw_free calls 2024-06-11 20:41:27 +08:00
tools ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
usr tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
virt KVM: Do not leak memory for duplicate debugfs directories 2024-06-11 20:51:18 +08:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
.gitignore ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
Kbuild kbuild: do not descend to ./Kbuild when cleaning 2019-08-21 21:03:58 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS Phytium JPEG Encoder driver 2024-06-11 20:41:01 +08:00
Makefile ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00
README.md tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
backport_remove_lists.txt tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
tools_key.pub tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00

README.md

Tencent Linux Kernel 4.0