From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v3 0/2] ring: replace use of rte_atomic
Date: Wed, 10 Jun 2026 11:43:06 -0700 [thread overview]
Message-ID: <20260610184701.657769-1-stephen@networkplumber.org> (raw)
In-Reply-To: <20260602171552.686349-1-stephen@networkplumber.org>
This is part of the broader rte_atomic32 deprecation work, sent
separately because it is the most complex part and benefits from
independent review.
Convert lib/ring off rte_atomic32 and onto the C11 memory model,
except for the ring head compare-and-swap where special case
is needed. On x86 with GCC using C11 atomics produces measurably
worse code.
After this series only __rte_ring_headtail_move_head has separate
C11 and GCC-builtin implementations; everything else uses the same
code on all architectures. The default RTE_USE_C11_MEM_MODEL
selection per architecture is unchanged.
v3:
- rebase and squash patches
- keep original code for x86 single thread case
Stephen Hemminger (2):
ring: split single thread vs multi-thread cases
ring: replace rte_atomic32 with __sync builtin
lib/ring/meson.build | 2 +-
lib/ring/rte_ring_c11_pvt.h | 107 +++++++++++++--------
lib/ring/rte_ring_elem_pvt.h | 53 ++++++++---
lib/ring/rte_ring_gcc_pvt.h | 155 +++++++++++++++++++++++++++++++
lib/ring/rte_ring_generic_pvt.h | 119 ------------------------
lib/ring/rte_ring_hts_elem_pvt.h | 8 +-
lib/ring/soring.c | 34 ++++---
7 files changed, 289 insertions(+), 189 deletions(-)
create mode 100644 lib/ring/rte_ring_gcc_pvt.h
delete mode 100644 lib/ring/rte_ring_generic_pvt.h
--
2.53.0
next prev parent reply other threads:[~2026-06-10 18:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 17:07 [PATCH 0/5] ring: convert to C11 atomics where practical Stephen Hemminger
2026-06-02 17:07 ` [PATCH 1/5] ring: split single thread vs multi-thread cases Stephen Hemminger
2026-06-04 15:09 ` Konstantin Ananyev
2026-06-02 17:07 ` [PATCH 2/5] ring: use GCC builtin as alternative to rte_atomic32 Stephen Hemminger
2026-06-04 15:11 ` Konstantin Ananyev
2026-06-04 15:20 ` Stephen Hemminger
2026-06-04 15:43 ` Konstantin Ananyev
2026-06-02 17:07 ` [PATCH 3/5] ring: use C11 for update_tail Stephen Hemminger
2026-06-04 15:39 ` Konstantin Ananyev
2026-06-02 17:07 ` [PATCH 4/5] ring: drop unused arg to update_tail Stephen Hemminger
2026-06-04 15:40 ` Konstantin Ananyev
2026-06-02 17:07 ` [PATCH 5/5] ring: use C11 for single thread move head Stephen Hemminger
2026-06-04 15:41 ` Konstantin Ananyev
2026-06-04 16:32 ` [PATCH v2] ring: convert to C11 atomics where practical Stephen Hemminger
2026-06-04 16:32 ` [PATCH v2 1/3] ring: split single thread vs multi-thread cases Stephen Hemminger
2026-06-04 16:32 ` [PATCH v2 2/3] ring: use GCC builtin as alternative to rte_atomic32 Stephen Hemminger
2026-06-06 14:02 ` Konstantin Ananyev
2026-06-10 15:41 ` Thomas Monjalon
2026-06-04 16:32 ` [PATCH v2 3/3] ring: cleanup the C11 code Stephen Hemminger
2026-06-10 18:43 ` Stephen Hemminger [this message]
2026-06-10 18:43 ` [PATCH v3 1/2] ring: split single thread vs multi-thread cases Stephen Hemminger
2026-06-10 18:43 ` [PATCH v3 2/2] ring: replace rte_atomic32 with __sync builtin Stephen Hemminger
2026-06-10 21:38 ` [PATCH v3 0/2] ring: replace use of rte_atomic Thomas Monjalon
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=20260610184701.657769-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.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