TencentOS-kernel/include
Björn Töpel 084e0ffc9f bpf: Introduce BPF dispatcher
[upstream commit 75ccbef6369e94ecac696a152a998a978d41376b]

The BPF dispatcher is a multi-way branch code generator, mainly
targeted for XDP programs. When an XDP program is executed via the
bpf_prog_run_xdp(), it is invoked via an indirect call. The indirect
call has a substantial performance impact, when retpolines are
enabled. The dispatcher transform indirect calls to direct calls, and
therefore avoids the retpoline. The dispatcher is generated using the
BPF JIT, and relies on text poking provided by bpf_arch_text_poke().

The dispatcher hijacks a trampoline function it via the __fentry__ nop
of the trampoline. One dispatcher instance currently supports up to 64
dispatch points. A user creates a dispatcher with its corresponding
trampoline with the DEFINE_BPF_DISPATCHER macro.

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191213175112.30208-3-bjorn.topel@gmail.com
2022-08-30 11:33:19 +08:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-04-12 12:53:31 +08:00
asm-generic locking/qspinlock: Rename mcs lock/unlock macros and make them more generic 2022-03-02 10:48:05 +08:00
clocksource
crypto crypto: api - check for ERR pointers in crypto_destroy_tfm() 2021-05-20 16:07:23 +08:00
drm iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header 2021-03-16 16:41:21 +08:00
dt-bindings
keys KEYS: Don't write out to userspace while holding key semaphore 2021-03-16 16:26:42 +08:00
kvm
linux bpf: Introduce BPF dispatcher 2022-08-30 11:33:19 +08:00
math-emu
media media: rc: compile rc-cec.c into rc-core 2021-04-12 12:53:01 +08:00
misc
net bpf: tcp: Support tcp_congestion_ops in bpf 2022-08-30 11:33:19 +08:00
pcmcia
ras
rdma RDMA/umem: Fix signature of stub ib_umem_find_best_pgsz() 2021-03-16 16:38:49 +08:00
scsi kabi: reserve space for kabi 2021-06-23 07:24:18 +00:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2021-03-16 16:35:56 +08:00
sound ALSA: hda: intel-nhlt: verify config type 2021-04-12 12:52:52 +08:00
target scsi: target: core: Add cmd length set before cmd complete 2021-04-12 12:53:04 +08:00
trace writeback: Drop I_DIRTY_TIME_EXPIRE 2021-04-12 12:51:42 +08:00
uapi bpf: Introduce function-by-function verification 2022-08-30 11:33:19 +08:00
vdso
video
xen Xen/gntdev: correct error checking in gntdev_map_grant_pages() 2021-04-12 12:52:07 +08:00