* Waits till datapath finished using given callback. */
| 99 | * Waits till datapath finished using given callback. |
| 100 | */ |
| 101 | static void |
| 102 | bpf_eth_cbi_wait(const struct bpf_eth_cbi *cbi) |
| 103 | { |
| 104 | uint32_t puse; |
| 105 | |
| 106 | /* make sure all previous loads and stores are completed */ |
| 107 | rte_smp_mb(); |
| 108 | |
| 109 | puse = cbi->use; |
| 110 | |
| 111 | /* in use, busy wait till current RX/TX iteration is finished */ |
| 112 | if ((puse & BPF_ETH_CBI_INUSE) != 0) { |
| 113 | RTE_WAIT_UNTIL_MASKED((__rte_atomic uint32_t *)(uintptr_t)&cbi->use, |
| 114 | UINT32_MAX, !=, puse, rte_memory_order_relaxed); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | static void |
| 119 | bpf_eth_cbi_cleanup(struct bpf_eth_cbi *bc) |
no test coverage detected