static void
bpf_eth_cbi_wait(const struct bpf_eth_cbi *cbi)
{
- uint32_t nuse, puse;
+ uint32_t puse;
/* make sure all previous loads and stores are completed */
rte_smp_mb();
/* in use, busy wait till current RX/TX iteration is finished */
if ((puse & BPF_ETH_CBI_INUSE) != 0) {
- do {
- rte_pause();
- rte_compiler_barrier();
- nuse = cbi->use;
- } while (nuse == puse);
+ RTE_WAIT_UNTIL_MASKED((uint32_t *)(uintptr_t)&cbi->use,
+ UINT32_MAX, !=, puse, __ATOMIC_RELAXED);
}
}
}
/*
- * BPF packet processing routinies.
+ * BPF packet processing routines.
*/
static inline uint32_t