Linux 7.1 To Retire UDP-Lite - Allows For Better Performance With Cleansed Code
#Regulation

Linux 7.1 To Retire UDP-Lite - Allows For Better Performance With Cleansed Code

Hardware Reporter
4 min read

The Linux kernel is removing UDP-Lite support after years of disuse, yielding a 3-10% performance boost for UDP workloads.

The upcoming Linux 7.1 kernel cycle is set to retire UDP-Lite support. The UDP-Lite protocol allowed for partial checksums where potentially damaged/corrupted packets are still delivered to the application. Since the Linux 2.6.20 days there has been UDP-Lite support but the kernel is now set to retire it given breakage that has persisted for years and cleaning up the networking code can yield a performance advantage for non-UDP-Lite users.

Kuniyuki Iwashima of Amazon/AWS took to retiring the UDP-Lite code. He explained of the issues that went unchecked for years and the performance benefit to removing UDP-Lite from the kernel:

"In 2023, syzbot found a null-ptr-deref bug triggered when UDP-Lite attempted to charge an skb after the total memory usage for UDP-Lite and UDP exceeded a system-wide threshold, net.ipv4.udp_mem. Since this threshold is shared with UDP, the bug would have been easy to trigger if any real-world applications were using UDP-Lite; however, only syzbot ever stumbled upon it. The bug had persisted since 2016, suggesting that UDP-Lite had remained unused for 7 years at that point. The bug was fixed in commit ad42a35bdfc6 ("udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated()."), and we added another commit be28c14ac8bb ("udplite: Print deprecation notice.") to announce the deprecation plan. Since then, no one has complained, so it is time to officially retire UDP-Lite. This series first removes IPv6 and IPv4 UDP-Lite sockets, then gradually cleans up the remaining dead/unnecessary code within the UDP stack. By removing a bunch of conditionals for UDP-Lite from the fast path, udp_rr with 20,000 flows sees a 10% increase in pps (13.3 Mpps -> 14.7 Mpps) on an AMD EPYC 7B12 (Zen 2) 64-Core Processor platform. [ With FDO, the baseline is much higher and the delta was ~3%, 20.1 Mpps -> 20.7 Mpps ]"

So per that messaging, the UDP-Lite code really hasn't been used in years and doing away with it can net some measurable (+3~10% packets per second) for other UDP workloads. It was back in 2023 that a deprecation notice was put in place for UDP-Lite calling for its removal in 2025. With no complaints and now into 2026 (and past the Linux 6.18 LTS of 2025), it's time for removal. This merge now in net-next is retiring UDP-Lite with the plan to merge it for Linux 7.1.

LINUX NETWORKING

Performance Impact Analysis

The performance gains from removing UDP-Lite are significant and measurable. On an AMD EPYC 7B12 (Zen 2) 64-Core Processor platform, UDP round-robin performance with 20,000 flows increased from 13.3 Mpps to 14.7 Mpps - a 10% improvement. For systems with Feedback-Directed Optimization (FDO), the baseline performance is higher, but the delta remains substantial at approximately 3% (20.1 Mpps to 20.7 Mpps).

These improvements come from eliminating conditional checks for UDP-Lite in the fast path of the networking stack. Every conditional branch removed from hot paths in the kernel can contribute to better instruction cache utilization and reduced branch misprediction penalties.

Historical Context

UDP-Lite (Lightweight User Datagram Protocol) was introduced in Linux 2.6.20 as a protocol that allowed applications to specify which parts of the UDP payload should be protected by the checksum. This was useful for applications that could tolerate some level of corruption in certain parts of the packet while still requiring integrity checking for critical sections.

However, the protocol never gained widespread adoption. The 2023 null pointer dereference bug, which had existed since 2016, highlighted how little UDP-Lite was actually being used - only syzbot (the Linux kernel's continuous fuzzing system) had encountered it.

Technical Cleanup Benefits

Beyond the direct performance improvements, removing UDP-Lite cleans up several areas of the networking stack:

  • Elimination of IPv6 and IPv4 UDP-Lite socket handling
  • Removal of memory management code specific to UDP-Lite
  • Simplification of UDP stack conditionals and branching logic
  • Reduction in code complexity and attack surface

The cleanup effort represents a broader trend in kernel development where rarely-used features are removed to improve maintainability, security, and performance for the vast majority of users.

Timeline and Implementation

The deprecation process began in 2023 with warning messages being added to kernel logs. The 2025 removal target passed without any complaints from users or developers, confirming the assessment that UDP-Lite was truly unused in production environments.

The retirement is currently in net-next (the networking subsystem's development branch) and is targeted for inclusion in Linux 7.1, which will be released after the Linux 6.18 LTS kernel.

This change affects systems running Linux 7.1 and later - older kernels will continue to support UDP-Lite for their entire lifecycle.

Comments

Loading comments...