android_kernel_motorola_sm6375/include
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Toke Høiland-Jørgensen f36afae44f
UPSTREAM: xdp: Use bulking for non-map XDP_REDIRECT and consolidate code paths
Since the bulk queue used by XDP_REDIRECT now lives in struct net_device,
we can re-use the bulking for the non-map version of the bpf_redirect()
helper. This is a simple matter of having xdp_do_redirect_slow() queue the
frame on the bulk queue instead of sending it out with __bpf_tx_xdp().

Unfortunately we can't make the bpf_redirect() helper return an error if
the ifindex doesn't exit (as bpf_redirect_map() does), because we don't
have a reference to the network namespace of the ingress device at the time
the helper is called. So we have to leave it as-is and keep the device
lookup in xdp_do_redirect_slow().

Since this leaves less reason to have the non-map redirect code in a
separate function, so we get rid of the xdp_do_redirect_slow() function
entirely. This does lose us the tracepoint disambiguation, but fortunately
the xdp_redirect and xdp_redirect_map tracepoints use the same tracepoint
entry structures. This means both can contain a map index, so we can just
amend the tracepoint definitions so we always emit the xdp_redirect(_err)
tracepoints, but with the map ID only populated if a map is present. This
means we retire the xdp_redirect_map(_err) tracepoints entirely, but keep
the definitions around in case someone is still listening for them.

With this change, the performance of the xdp_redirect sample program goes
from 5Mpps to 8.4Mpps (a 68% increase).

Since the flush functions are no longer map-specific, rename the flush()
functions to drop _map from their names. One of the renamed functions is
the xdp_do_flush_map() callback used in all the xdp-enabled drivers. To
keep from having to update all drivers, use a #define to keep the old name
working, and only update the virtual drivers in this patch.

Change-Id: I770abdab19438ad8efbe0376bb442043acf92c19
Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/157918768505.1458396.17518057312953572912.stgit@toke.dk
2025-12-23 13:35:53 -08:00
..
acpi ACPICA: Avoid sequence overread in call to strncmp() 2025-06-27 11:02:52 +01:00
asm-generic UPSTREAM: mm/tlb: Provide default nmi_uaccess_okay() 2025-12-23 13:35:38 -08:00
clocksource
crypto UPSTREAM: crypto: poly1305 - fix poly1305_core_setkey() declaration 2025-09-24 12:16:39 +02:00
drm This is the 5.4.296 stable release 2025-07-18 10:57:54 +00:00
dt-bindings
keys
kvm
linux UPSTREAM: xdp: Use bulking for non-map XDP_REDIRECT and consolidate code paths 2025-12-23 13:35:53 -08:00
math-emu
media
misc
net UPSTREAM: sock: Make sk_protocol a 16-bit value 2025-12-23 13:35:52 -08:00
pcmcia
ras
rdma This is the 5.4.296 stable release 2025-07-18 10:57:54 +00:00
scsi This is the 5.4.301 stable release 2025-10-30 07:52:10 +00:00
soc
sound Merge tag 'ASB-2025-08-05_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina 2025-09-01 13:17:46 +03:00
target
trace UPSTREAM: xdp: Use bulking for non-map XDP_REDIRECT and consolidate code paths 2025-12-23 13:35:53 -08:00
uapi UPSTREAM: bpf: Add batch ops to all htab bpf map 2025-12-23 13:35:53 -08:00
vdso
video
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-05-02 07:39:09 +02:00
OWNERS