[PATCH v16 0/2] net: optimize __rte_raw_cksum
Morten Brørup
mb at smartsharesystems.com
Sat Jan 24 09:23:47 CET 2026
> From: Scott <scott_mitchell at apple.com>
>
> This series optimizes __rte_raw_cksum by replacing memcpy with direct
> pointer access, enabling compiler vectorization on both GCC and Clang.
>
> Patch 1 adds __rte_may_alias to unaligned typedefs to prevent a GCC
> strict-aliasing bug where struct initialization is incorrectly elided.
>
> Patch 2 uses the improved unaligned_uint16_t type in __rte_raw_cksum
> to enable compiler optimizations while maintaining correctness across
> all architectures (including strict-alignment platforms).
>
> Performance results show significant improvements (40% for small
> buffers,
> up to 8x for larger buffers) on Intel Xeon with Clang 18.1.
It's usually allowed to carry forward ACKs from previous versions.
With major changes between versions, the author should consider if previous ACKs can remain or not.
Carrying forward from v15 of the series,
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
More information about the dev
mailing list