You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This helper is a slow path utility intended for replies with control messages. And because it is targeted for slow path, the helper itself can afford to be slow: it implicitly linearizes, unclones and drops offloads from the skb.
The skb gso_type is correctly reset to 0x0, but then the skb is >> MTU. The (big) packet is later on dropped due to the MTU check (ofc, because the pkt is NOT anymore a GSOed pkt), in __dev_forward_skb2() which ends up calling __is_skb_forwardable(), here is the check
I think this is a bug, and bpf_skb_change_tail() should break the beefy packet into the segments before being sent (and should be done after all TC BPF hooks, I guess). This is probably worth having a discussion in cilium #ebpf slack channel.
Summary
There is a severe performance degradation when TCP is funneled over UDP on flows within the same host.
I was able to repro here: msune/ebpf_gso:main, using this synthetic scenario.
Env:
Linux XXX 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64 GNU/Linux
Debian clang version 14.0.6
Root cause analysis
The repro pushes a UDP header in
ns1
and pops it onns2
.pwru
clearly shows that theskb
is marked asSKB_GSO_TCPV4
(0x1
) (*). When UDP header is pushed:When the kernel attempts to UFO the packet:
Full pwru trace
It drops it) as it can't find
SKB_GSO_UDP
/GSO_UDP_L4
in here https://github.com/torvalds/linux/blob/de2f378f2b771b39594c04695feee86476743a69/net/ipv4/udp_offload.c#L429.(*) There seems to be a bug in the kernel; disabling all GSO/TSO offloads keeps marking egress SKBs as
TCP_GSO
The text was updated successfully, but these errors were encountered: