From: Joyce Kong Date: Mon, 21 Dec 2020 07:38:48 +0000 (+0800) Subject: rcu: use EAL memory barrier API X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4aae2397add77afefb7d91181e3ea0b1e7287949;p=dpdk.git rcu: use EAL memory barrier API Use rte_atomic_thread_fence wrapper which has been provided for __atomic_thread_fence builtins to support optimized code for __ATOMIC_SEQ_CST memory order on x86 platforms. Signed-off-by: Joyce Kong Reviewed-by: Honnappa Nagarahalli --- diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h index fa2b881bd0..18811c1cc1 100644 --- a/lib/librte_rcu/rte_rcu_qsbr.h +++ b/lib/librte_rcu/rte_rcu_qsbr.h @@ -329,12 +329,7 @@ rte_rcu_qsbr_thread_online(struct rte_rcu_qsbr *v, unsigned int thread_id) * writer might not see that the reader is online, even though * the reader is referencing the shared data structure. */ -#ifdef RTE_ARCH_X86_64 - /* rte_smp_mb() for x86 is lighter */ - rte_smp_mb(); -#else - __atomic_thread_fence(__ATOMIC_SEQ_CST); -#endif + rte_atomic_thread_fence(__ATOMIC_SEQ_CST); } /**