UDP/IPv6 Optimization Patches Pending For ~5% Improvement In CPU Bound Test

Among the many new features in Linux 5.17 are several notable network optimizations . Optimizing network performance is a never-ending game and already for a future kernel are a new set of UDP/IPv6 optimizations being worked on.

Developer Pavel Begunkov recently posted a set of Linux kernel networking patches focused on UDP/IPv6 optimizations but some of the patches also benefit TCP. In CPU-bound testing at least, these patches have shown to provide measurable benefit. Pavel explained with the set of 14 patches:
A mainly UDP/IPv6 optimisation patch set. Zerocopy io_uring benchmark over dummy netdev (CPU bound) gives 2068992 -> 2166481 tx/s, which is ~4.7% or over 5% of net layer overhead. Should give similar results for small packet non-zerocopy.

- 1/14 and 9/14 remove a get/put dst pair each, so saving 4 atomics per corkless UDP send.
- Patches 3-8 optimise iflow handling, in particular removes one 88B memset and one 88B copy.
- 10-14 are random improvements, which are not UDP-specific but also beneficial to TCP and others.

See this patch series for more details on this pending work. It's great seeing the recent lineup of Linux network optimizations.