linux/include
Daniel Borkmann 3998d18426 netkit: Fix pkt_type override upon netkit pass verdict
When running Cilium connectivity test suite with netkit in L2 mode, we
found that compared to tcx a few tests were failing which pushed traffic
into an L7 proxy sitting in host namespace. The problem in particular is
around the invocation of eth_type_trans() in netkit.

In case of tcx, this is run before the tcx ingress is triggered inside
host namespace and thus if the BPF program uses the bpf_skb_change_type()
helper the newly set type is retained. However, in case of netkit, the
late eth_type_trans() invocation overrides the earlier decision from the
BPF program which eventually leads to the test failure.

Instead of eth_type_trans(), split out the relevant parts, meaning, reset
of mac header and call to eth_skb_pkt_type() before the BPF program is run
in order to have the same behavior as with tcx, and refactor a small helper
called eth_skb_pull_mac() which is run in case it's passed up the stack
where the mac header must be pulled. With this all connectivity tests pass.

Fixes: 35dfaad718 ("netkit, bpf: Add bpf programmable net device")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20240524163619.26001-2-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-05-25 10:48:57 -07:00
..
acpi hwmon updates for v6.10 2024-05-14 14:51:51 -07:00
asm-generic x86/build changes for v6.10: 2024-05-13 18:05:08 -07:00
clocksource
crypto This update includes the following changes: 2024-05-13 14:53:05 -07:00
drm Merge tag 'drm-misc-next-2024-04-25' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next 2024-04-26 13:29:04 +10:00
dt-bindings platform-drivers-x86 for v6.10-1 2024-05-16 09:14:50 -07:00
keys Hi, 2024-05-13 10:40:15 -07:00
kunit kunit: Print last test location on fault 2024-05-06 14:22:02 -06:00
kvm Merge branch kvm-arm64/misc-6.10 into kvmarm-master/next 2024-05-08 16:41:50 +01:00
linux netkit: Fix pkt_type override upon netkit pass verdict 2024-05-25 10:48:57 -07:00
math-emu
media media: cec.h: Fix kerneldoc 2024-05-04 10:19:59 +02:00
memory
misc
net Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
pcmcia
ras
rdma
rv
scsi SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
soc Hi, 2024-05-13 10:38:13 -07:00
sound ASoC: Updates for v6.10 2024-05-13 11:39:49 +02:00
target
trace platform-drivers-x86 for v6.10-1 2024-05-16 09:14:50 -07:00
uapi tracing ring buffer updates for v6.10: 2024-05-17 18:40:37 -07:00
ufs
vdso
video
xen