eal: update public API to use stdatomic atomics
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest4 patches 0 repliesNew
- v34 patches 0 repliesSuperseded
- v24 patches 2 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 4 patches | 0 replies | Superseded |
Changes in v4 from the cover letter
* fix previous cut & paste mistake including rte_pause.h when rte_atomic.h was intended in loongarch, ppc, riscv rte_pause.h (sorry was tired)
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | build: require minimum c11 compilerdrivers/ lib/ meson.build | +2 | 0 replies | |
| 2/4 | devtools: forbid use of GCC atomic builtinsdevtools/ | +8 | 0 replies | |
| 3/4 | eal: adapt rte pause APIs to use C11 atomicsapp/ app/ app/ +26 more | +291 | 0 replies | |
| 4/4 | eal: adapt rte spinlock and rwlock APIs to use C11 atomicslib/ lib/ lib/ | +36 | 0 replies |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Morten Brørup |
|---|---|
| 1/4 | |
| 2/4 | A-b |
| 3/4 | A-b |
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/4] eal: update public API to use stdatomic atomics
Update EAL public API to use standard C11 atomics. In accordance with technical board discussion February 2023.
http://mails.dpdk.org/archives/dev/2023-February/263516.html
This initial series makes no attempt to adapt every use of builtin atomics from GCC it intends only to adapt the public API of the EAL presented as a compatibility surface to applications.
Further series will be submitted to adapt the rest of DPDK to use standard atomics that are 'internal' and not do not straddle the EAL API.
The choice has been made to break these two changes apart to allow more precise analysis of any potential performance impact this change or subsequent changes may introduce.
Additionally, it is not possible to break the commits up per driver/lib as both the provider and consumer of the APIs need to be changed in the same commit to maintain non-broken build and function.
Finally, the first patch in this series is a duplication of Bruce Richardson series https://patchwork.dpdk.org/project/dpdk/list/?series=29048 and is only being provided to enable the CI run on this series. It is expected that Bruce's series when committed will allow the build: require minimum c11 compiler here to be dropped from this series.
v4:
* fix previous cut & paste mistake including rte_pause.h when rte_atomic.h was intended in loongarch, ppc, riscv rte_pause.h (sorry was tired)
v3:
* restore incorrectly dropped architecture specific #include "rte_pause.h" for loongarch, ppc, riscv
* convert parameters to stdatomic in RTE_WAIT_UNTIL_MASKED macro usage (missed previously)
* lib/ring missed some conversion to stdatomic on struct rte_ring _Atomic fields (picked up by clang which is more strict than gcc)
* drivers/mlx5 use stdatomic operations on struct rte_ring _Atomic fields (picked up by clang which is more strict than gcc)
v2:
* remove volatile qualification from variables, structure fields and parameters that have been qualified _Atomic
* restore removal of #include <rte_atomic.h> in rte_ring_core.h the ring library still uses other rte_atomic APIs and types that are not replaced by the standard or compiler intrinsics
* add missing adaption to stdatomic in ring/rte_ring_c11_pvt.h
Tyler Retzlaff (4):
build: require minimum c11 compiler
devtools: forbid use of GCC atomic builtins
eal: adapt rte pause APIs to use C11 atomics
eal: adapt rte spinlock and rwlock APIs to use C11 atomics
app/test-bbdev/test_bbdev_perf.c | 123 ++++++++++++++++++++----------- app/test/test_func_reentrancy.c | 8 +- app/test/test_mcslock.c | 12 +-- app/test/test_mempool_perf.c | 8 +- app/test/test_pflock.c | 12 +-- app/test/test_pmd_perf.c | 10 +-- app/test/test_ring_perf.c | 8 +- app/test/test_rwlock.c | 8 +- app/test/test_spinlock.c | 8 +- app/test/test_stack_perf.c | 12 +-- app/test/test_ticketlock.c | 8 +- app/test/test_timer.c | 16 ++-- devtools/checkpatches.sh | 8 ++ drivers/event/opdl/opdl_ring.c | 47 ++++++------ drivers/net/failsafe/meson.build | 1 - drivers/net/mlx5/mlx5_hws_cnt.h | 4 +- drivers/net/thunderx/nicvf_rxtx.c | 5 +- drivers/net/thunderx/nicvf_struct.h | 2 +- lib/bpf/bpf_pkt.c | 6 +- lib/distributor/distributor_private.h | 2 +- lib/distributor/rte_distributor_single.c | 44 +++++------ lib/eal/arm/include/rte_pause_64.h | 28 +++---- lib/eal/common/eal_common_errno.c | 1 + lib/eal/common/eal_memcfg.h | 2 +- lib/eal/include/generic/rte_pause.h | 51 ++++++------- lib/eal/include/generic/rte_rwlock.h | 46 ++++++------ lib/eal/include/generic/rte_spinlock.h | 21 +++--- lib/eal/include/rte_mcslock.h | 14 ++-- lib/eal/include/rte_pflock.h | 22 +++--- lib/eal/include/rte_ticketlock.h | 8 +- lib/eal/x86/include/rte_spinlock.h | 2 +- lib/ring/rte_ring_c11_pvt.h | 42 ++++++----- lib/ring/rte_ring_core.h | 4 +- lib/ring/rte_ring_generic_pvt.h | 19 +++-- lib/ring/rte_ring_peek_elem_pvt.h | 2 +- meson.build | 1 + 36 files changed, 337 insertions(+), 278 deletions(-)
Signature · 1 line
1.8.3.1