From: scott.k.mitch1@gmail.com
To: dev@dpdk.org
Cc: mb@smartsharesystems.com, stephen@networkplumber.org,
Scott Mitchell <scott.k.mitch1@gmail.com>
Subject: [PATCH v2 0/2] eal: RTE_PTR_ADD/SUB char* for compiler optimizations
Date: Sun, 11 Jan 2026 10:17:56 -0500 [thread overview]
Message-ID: <20260111151758.89015-1-scott.k.mitch1@gmail.com> (raw)
From: Scott Mitchell <scott.k.mitch1@gmail.com>
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)
next reply other threads:[~2026-01-11 15:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-11 15:17 scott.k.mitch1 [this message]
2026-01-11 15:17 ` [PATCH v2 1/2] " scott.k.mitch1
2026-01-11 15:17 ` [PATCH v2 2/2] mailmap: add Scott Mitchell scott.k.mitch1
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260111151758.89015-1-scott.k.mitch1@gmail.com \
--to=scott.k.mitch1@gmail.com \
--cc=dev@dpdk.org \
--cc=mb@smartsharesystems.com \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).