Adapt bpf for EAL optional atomics API changes

Signed-off-by: Tyler Retzlaff <roret...@linux.microsoft.com>
---
 lib/bpf/bpf_pkt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/bpf/bpf_pkt.c b/lib/bpf/bpf_pkt.c
index ffd2db7..b300447 100644
--- a/lib/bpf/bpf_pkt.c
+++ b/lib/bpf/bpf_pkt.c
@@ -25,7 +25,7 @@
 
 struct bpf_eth_cbi {
        /* used by both data & control path */
-       uint32_t use;    /*usage counter */
+       uint32_t __rte_atomic use;    /*usage counter */
        const struct rte_eth_rxtx_callback *cb;  /* callback handle */
        struct rte_bpf *bpf;
        struct rte_bpf_jit jit;
@@ -110,8 +110,8 @@ struct bpf_eth_cbh {
 
        /* in use, busy wait till current RX/TX iteration is finished */
        if ((puse & BPF_ETH_CBI_INUSE) != 0) {
-               RTE_WAIT_UNTIL_MASKED((uint32_t *)(uintptr_t)&cbi->use,
-                       UINT32_MAX, !=, puse, __ATOMIC_RELAXED);
+               RTE_WAIT_UNTIL_MASKED((uint32_t __rte_atomic 
*)(uintptr_t)&cbi->use,
+                       UINT32_MAX, !=, puse, rte_memory_order_relaxed);
        }
 }
 
-- 
1.8.3.1

Reply via email to