numam-dpdk/lib/librte_eventdev
Phil Yang 030c216411 eventdev: relax SMP barriers with C11 atomics
The impl_opaque field is shared between the timer arm and cancel
operations. Meanwhile, the state flag acts as a guard variable to
make sure the update of impl_opaque is synchronized. The original
code uses rte_smp barriers to achieve that. This patch uses C11
atomics with an explicit one-way memory barrier instead of full
barriers rte_smp_w/rmb() to avoid the unnecessary barrier on aarch64.

Since compilers can generate the same instructions for volatile and
non-volatile variable in C11 __atomics built-ins, so remain the volatile
keyword in front of state enum to avoid the ABI break issue.

Cc: stable@dpdk.org

Signed-off-by: Phil Yang <phil.yang@arm.com>
Reviewed-by: Dharmik Thakkar <dharmik.thakkar@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
2020-07-08 18:16:41 +02:00
..
eventdev_trace_points.c trace: simplify trace point registration 2020-07-05 21:34:21 +02:00
Makefile eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
meson.build eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_event_crypto_adapter.c eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_event_crypto_adapter.h doc: fix spelling reported by aspell in comments 2019-05-03 00:38:14 +02:00
rte_event_eth_rx_adapter.c eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_event_eth_rx_adapter.h eventdev: change Rx adapter callback and stats structure 2019-07-03 06:55:39 +02:00
rte_event_eth_tx_adapter.c eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_event_eth_tx_adapter.h eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_event_ring.c eventdev: use custom element size rings 2020-01-19 19:32:50 +01:00
rte_event_ring.h eventdev: use custom element size rings 2020-01-19 19:32:50 +01:00
rte_event_timer_adapter_pmd.h eventdev: add timer adapter common code 2018-04-16 11:04:46 +02:00
rte_event_timer_adapter.c eventdev: relax SMP barriers with C11 atomics 2020-07-08 18:16:41 +02:00
rte_event_timer_adapter.h eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_eventdev_pmd_pci.h eventdev: fix probe and remove for secondary process 2020-05-02 12:31:57 +02:00
rte_eventdev_pmd_vdev.h lib: fix missing includes in exported headers 2018-01-17 00:31:05 +01:00
rte_eventdev_pmd.h doc: fix spelling reported by aspell in comments 2019-05-03 00:38:14 +02:00
rte_eventdev_trace_fp.h eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_eventdev_trace.h eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_eventdev_version.map eventdev: add tracepoints 2020-04-23 15:40:08 +02:00
rte_eventdev.c eventdev: fix probe and remove for secondary process 2020-05-02 12:31:57 +02:00
rte_eventdev.h eventdev: add tracepoints 2020-04-23 15:40:08 +02:00