Taming the BPF LRU: Eliminating TCP Resets in Cilium
Lightningat CiliumCon North America 2025 · on Monday, 2025-11-10· at 12:20· Building B | Level 3 | B309·
summary
At scale Cilium’s BPF SNAT plus an approximate LRU eviction policy is dropping active NAT entries and injecting wrong source ports, causing TCP RSTs; diagnosis uses tcpdump and PWU to trace packets to the tailcall helper and the reverse-NAT code path. The merged fix in Pull Request #37747 proactively restores original NAT entry from the reverse entry, reducing failures from single-digit percentages (reported up to 10%) to nearly zero in tests.
AI-written summary · about
chapters (9)
- 0:00BPF LRU and TCP resets
- 1:06TCP resets in production
- 2:34Unexpected port changes with tcpdump
- 3:37BPF tracepoints for issue pinpoint
- 5:48BPF LRU eviction logic
- 7:14Reverse entry recovery fix
- 8:15Fix effectiveness with tests
- 9:20Dynamic map sizing
- 10:01Acknowledgments
related talks
22mTales from an eBPF Program’s Murder Mystery
19mTackling DC Congestion and Bursts
38mUnderstanding and Troubleshooting the eBPF Datapath in Cilium
31mNetworking Failure Stories: How to Maintain, Break, and Fix Cluster Connectivity
14mA large-scale deployment of DCTCP
44mCilium - Container Security and Networking Using BPF and XDP
31mUnleashing the Tides of Kubernetes Networking by Removing kube-proxy
07mLightning Talk: Taming Noisy Network Neigbours with Cilium and eBPF
