From 0964985cdd99cf769582e0d9393de68a95b121b9 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 20 Feb 2019 23:13:43 -0800 Subject: svm: fix mem ordering for enqueue nocopy Change-Id: Ibc852f88747125a895415570349975d3b379a6f4 Signed-off-by: Florin Coras --- src/svm/svm_fifo.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h index 07614b4dac9..d7146ae1fb0 100644 --- a/src/svm/svm_fifo.h +++ b/src/svm/svm_fifo.h @@ -235,7 +235,7 @@ svm_fifo_enqueue_nocopy (svm_fifo_t * f, u32 bytes) { ASSERT (bytes <= svm_fifo_max_enqueue (f)); f->tail = (f->tail + bytes) % f->nitems; - f->cursize += bytes; + clib_atomic_fetch_add_rel (&f->cursize, bytes); } always_inline u8 * -- cgit 1.2.3-korg