[dpdk-dev] [PATCH v9 0/3] support c11 memory model barrier in librte_ring

Jia He hejianet at gmail.com
Mon Jan 22 05:41:25 CET 2018


There are 2 model barrier options in librte_ring suggested by Jerin:
1. use rte_smp_rmb
2. use load_acquire/store_release

CONFIG_RTE_RING_USE_C11_MEM_MODEL is provided for supporting C11 memory
model barrier in librte_ring. By default it is "y" on arm64, "n" on any
other architectures so far.

Already fuctionally tested on the machines as follows:
- on X86
- on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=y
- on arm64 with CONFIG_RTE_RING_USE_C11_MEM_MODEL=n

---
Changelog:
V9: remove the SPDX tag and refine commit logs
V8: Change the license to SPDX tag. Change USE_C11_MEM_MODEL to "n" on
    any architectures by default
V7: fix check-git-log warnings which is suggested by Jerin
V6: minor change in subject and log
V5: split it into 2 patchset due to the milestone concerns, this is the 2st
    one. Also fix checkpatch.pl warnings
V4: split into small patches
V3: arch specific implementation for enqueue/dequeue barrier
V2: let users choose whether using load_acquire/store_release
V1: rte_smp_rmb() between 2 loads

Jia He (3):
  eal/arm64: remove the braces {} for dmb() and dsb()
  ring: introduce new header file to include common functions
  ring: introduce new header file to support C11 memory model

 config/common_armv8a_linuxapp                      |   2 +
 config/common_base                                 |   5 +
 .../common/include/arch/arm/rte_atomic_64.h        |   4 +-
 lib/librte_eventdev/rte_event_ring.h               |   6 +-
 lib/librte_ring/Makefile                           |   4 +-
 lib/librte_ring/rte_ring.h                         | 173 ++--------------
 lib/librte_ring/rte_ring_c11_mem.h                 | 218 ++++++++++++++++++++
 lib/librte_ring/rte_ring_generic.h                 | 228 +++++++++++++++++++++
 8 files changed, 476 insertions(+), 164 deletions(-)
 create mode 100644 lib/librte_ring/rte_ring_c11_mem.h
 create mode 100644 lib/librte_ring/rte_ring_generic.h

-- 
2.7.4



More information about the dev mailing list