android_kernel_msm-6.1_noth.../tools/include/uapi/linux
Martin KaFai Lau 8904d8848b bpf: Add BPF_FIB_LOOKUP_SKIP_NEIGH for bpf_fib_lookup
[ Upstream commit 31de4105f00d64570139bc5494a201b0bd57349f ]

The bpf_fib_lookup() also looks up the neigh table.
This was done before bpf_redirect_neigh() was added.

In the use case that does not manage the neigh table
and requires bpf_fib_lookup() to lookup a fib to
decide if it needs to redirect or not, the bpf prog can
depend only on using bpf_redirect_neigh() to lookup the
neigh. It also keeps the neigh entries fresh and connected.

This patch adds a bpf_fib_lookup flag, SKIP_NEIGH, to avoid
the double neigh lookup when the bpf prog always call
bpf_redirect_neigh() to do the neigh lookup. The params->smac
output is skipped together when SKIP_NEIGH is set because
bpf_redirect_neigh() will figure out the smac also.

Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20230217205515.3583372-1-martin.lau@linux.dev
Stable-dep-of: 5baa0433a15e ("neighbour: fix data-races around n->output")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 22:00:42 +02:00
..
tc_act headers: Remove some left-over license text 2022-09-27 07:48:01 -07:00
bpf.h bpf: Add BPF_FIB_LOOKUP_SKIP_NEIGH for bpf_fib_lookup 2023-10-10 22:00:42 +02:00
bpf_common.h
bpf_perf_event.h
btf.h bpf: Add btf enum64 support 2022-06-07 10:20:42 -07:00
const.h
erspan.h
ethtool.h
fadvise.h
fcntl.h
filter.h
fs.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
fscrypt.h tools headers UAPI: Sync linux/fscrypt.h with the kernel sources 2022-08-19 15:30:33 -03:00
hw_breakpoint.h
if_link.h Bonding: add per-port priority for failover re-selection 2022-06-24 11:27:59 +01:00
if_tun.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
if_xdp.h
in.h tools headers UAPI: Sync the linux/in.h with the kernel sources 2023-06-05 09:26:22 +02:00
kcmp.h
kvm.h tools: include: sync include/api/linux/kvm.h 2022-10-22 07:54:19 -04:00
mman.h
mount.h
netlink.h
openat2.h
perf_event.h tools headers UAPI: Sync linux/perf_event.h with the kernel sources 2022-10-26 10:45:16 -03:00
pkt_cls.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
pkt_sched.h
prctl.h tools headers UAPI: Sync linux/prctl.h with the kernel sources 2022-06-19 11:42:25 -03:00
sched.h
seg6.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
seg6_local.h
stat.h tools headers uapi: Sync linux/stat.h with the kernel sources 2022-10-25 17:40:48 -03:00
stddef.h tools/headers: Pull in stddef.h to uapi to fix BPF selftests build in CI 2022-11-03 13:45:21 +01:00
tcp.h
tls.h
types.h
usbdevice_fs.h treewide: uapi: Replace zero-length arrays with flexible-array members 2022-06-28 21:26:05 +02:00
vhost.h tools include UAPI: Sync linux/vhost.h with the kernel sources 2022-08-19 15:30:34 -03:00