Skip to content

ring: replace use of rte_atomic

Stephen Hemminger dpdk-dev 4 versions – Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyApplied
  2. v2 posting 2/23 patches 2 repliesSuperseded
  3. v2 posting 1/21 patch 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v15 patches7 repliesSuperseded

Changes in v3 from the cover letter

- rebase and squash patches
- keep original code for x86 single thread case

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2ring: split single thread vs multi-thread caseslib/ring/rte_ring_c11_pvt.h lib/ring/rte_ring_elem_pvt.h lib/ring/rte_ring_generic_pvt.h +1 more+171 -460 replies
2/2ring: replace rte_atomic32 with __sync builtinlib/ring/meson.build lib/ring/rte_ring_c11_pvt.h lib/ring/rte_ring_elem_pvt.h +3 more+99 -1240 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchKonstantin Ananyev
1/2A-b T-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] ring: replace use of rte_atomic

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
Signature · 1 line
2.53.0