RE: [PATCH v16 0/2] net: optimize __rte_raw_cksum

Morten Brørup
2026-01-24T08:23:52Z

> From: Scott <scott_mitchell@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@networkplumber.org>
Acked-by: Morten Brørup <mb@smartsharesystems.com>