[PATCH v4 27/45] crypto/octeontx: use rte stdatomic API

Tyler Retzlaff roretzla at linux.microsoft.com
Sat Apr 20 01:06:25 CEST 2024


Replace the use of gcc builtin __atomic_xxx intrinsics with
corresponding rte_atomic_xxx optional rte stdatomic API.

Signed-off-by: Tyler Retzlaff <roretzla at linux.microsoft.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 drivers/crypto/octeontx/otx_cryptodev_ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/octeontx/otx_cryptodev_ops.c b/drivers/crypto/octeontx/otx_cryptodev_ops.c
index 947e1be..bafd0c1 100644
--- a/drivers/crypto/octeontx/otx_cryptodev_ops.c
+++ b/drivers/crypto/octeontx/otx_cryptodev_ops.c
@@ -652,7 +652,7 @@
 	if (!rsp_info->sched_type)
 		ssows_head_wait(ws);
 
-	rte_atomic_thread_fence(__ATOMIC_RELEASE);
+	rte_atomic_thread_fence(rte_memory_order_release);
 	ssovf_store_pair(add_work, req, ws->grps[rsp_info->queue_id]);
 }
 
@@ -896,7 +896,7 @@
 	pcount = pending_queue_level(pqueue, DEFAULT_CMD_QLEN);
 
 	/* Ensure pcount isn't read before data lands */
-	rte_atomic_thread_fence(__ATOMIC_ACQUIRE);
+	rte_atomic_thread_fence(rte_memory_order_acquire);
 
 	count = (nb_ops > pcount) ? pcount : nb_ops;
 
-- 
1.8.3.1



More information about the dev mailing list