From: Scott Mitchell <[email protected]>

This series optimizes RTE_PTR_ADD and RTE_PTR_SUB by using char* pointer
arithmetic instead of uintptr_t casts when operating on pointer types.
This enables better compiler optimization, particularly for Clang which
can now recognize simple pointer patterns and apply vectorization, loop
unrolling, and improved assembly.

The implementation uses C11 _Generic to dispatch based on input type,
maintaining full API compatibility while enabling ~40-8x performance
improvements in checksum operations.

The second patch adds a .mailmap entry for consistent git attribution.

Note on checkpatch warnings: The patches generate checkpatch warnings due to
C11 _Generic syntax not being fully recognized by checkpatch.pl (designed for
kernel C). The warnings are false positives - the code is valid C11 and
follows the same pattern as existing DPDK code (e.g., __rte_constant macro,
rte_bitops.h). The COMPLEX_MACRO warning is explicitly acknowledged by
checkpatch itself as expected for statement expression macros.

Changes in v2:
- Fixed copyright in test file to Apple Inc. (was Intel Corporation)
- Added checkpatch warning explanation to cover letter

Scott Mitchell (2):
  eal: RTE_PTR_ADD/SUB char* for compiler optimizations
  mailmap: add Scott Mitchell

 .mailmap                     |   1 +
 app/test/meson.build         |   1 +
 app/test/test_ptr_add_sub.c  | 190 +++++++++++++++++++++++++++++++++++
 lib/eal/include/rte_common.h |  76 ++++++++++++++
 4 files changed, 268 insertions(+)
 create mode 100644 app/test/test_ptr_add_sub.c

-- 
2.39.5 (Apple Git-154)

Reply via email to