summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-20 23:13:43 -0800
committerDamjan Marion <dmarion@me.com>2019-02-21 12:26:51 +0000
commit0964985cdd99cf769582e0d9393de68a95b121b9 (patch)
tree5a7f320c28f40676d7d23802fd48589230187a34
parenteb414435a188ea9b36ada69b8ccc12fafbb04eca (diff)
svm: fix mem ordering for enqueue nocopy
Change-Id: Ibc852f88747125a895415570349975d3b379a6f4 Signed-off-by: Florin Coras <fcoras@cisco.com>
-rw-r--r--src/svm/svm_fifo.h2
1 files changed, 1 insertions, 1 deletions
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 *