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

Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com>
---
 drivers/net/idpf/idpf_ethdev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/idpf/idpf_ethdev.c b/drivers/net/idpf/idpf_ethdev.c
index 86151c9..1df4d6b 100644
--- a/drivers/net/idpf/idpf_ethdev.c
+++ b/drivers/net/idpf/idpf_ethdev.c
@@ -259,8 +259,8 @@ struct rte_idpf_xstats_name_off {
 
        for (i = 0; i < dev->data->nb_rx_queues; i++) {
                rxq = dev->data->rx_queues[i];
-               mbuf_alloc_failed += 
__atomic_load_n(&rxq->rx_stats.mbuf_alloc_failed,
-                                                    __ATOMIC_RELAXED);
+               mbuf_alloc_failed += 
rte_atomic_load_explicit(&rxq->rx_stats.mbuf_alloc_failed,
+                                                    rte_memory_order_relaxed);
        }
 
        return mbuf_alloc_failed;
@@ -308,7 +308,8 @@ struct rte_idpf_xstats_name_off {
 
        for (i = 0; i < dev->data->nb_rx_queues; i++) {
                rxq = dev->data->rx_queues[i];
-               __atomic_store_n(&rxq->rx_stats.mbuf_alloc_failed, 0, 
__ATOMIC_RELAXED);
+               rte_atomic_store_explicit(&rxq->rx_stats.mbuf_alloc_failed, 0,
+                   rte_memory_order_relaxed);
        }
 }
 
-- 
1.8.3.1

Reply via email to