[08/21] ipsec: use rte optional stdatomic API
Checks
Commit Message
Replace the use of gcc builtin __atomic_xxx intrinsics with
corresponding rte_atomic_xxx optional stdatomic API
Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
lib/ipsec/ipsec_sqn.h | 2 +-
lib/ipsec/sa.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -128,7 +128,7 @@
n = *num;
if (SQN_ATOMIC(sa))
- sqn = __atomic_fetch_add(&sa->sqn.outb, n, __ATOMIC_RELAXED) + n;
+ sqn = rte_atomic_fetch_add_explicit(&sa->sqn.outb, n, rte_memory_order_relaxed) + n;
else {
sqn = sa->sqn.outb + n;
sa->sqn.outb = sqn;
@@ -124,7 +124,7 @@ struct rte_ipsec_sa {
* place from other frequently accessed data.
*/
union {
- uint64_t outb;
+ RTE_ATOMIC(uint64_t) outb;
struct {
uint32_t rdidx; /* read index */
uint32_t wridx; /* write index */