aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-06-20 09:58:37 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-06-24 23:35:28 +0000
commitb4c677526b7ad43f6960526e9103c1679adae1eb (patch)
tree5ae10f00e022cddcb134918117ebbe14aae40baa /src/svm/svm_fifo.c
parent9d97d014119988a26131dee1d148d3265539f9cc (diff)
session: full lock on session_send_evt_to_thread
Type: fix This was causing issues in QUIC when an app client & the protocol app compete for the worker msg_queue. Might not be ideal performance- wise. Change-Id: I629892253d5b5d968f31ad1d56f18463e143d6b4 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/svm/svm_fifo.c')
-rw-r--r--src/svm/svm_fifo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index 6b4ea68ca17..87e019ab1f1 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -909,11 +909,11 @@ svm_fifo_dequeue_drop (svm_fifo_t * f, u32 len)
if (PREDICT_FALSE (cursize == 0))
return SVM_FIFO_EEMPTY;
- svm_fifo_trace_add (f, tail, total_drop_bytes, 3);
-
/* number of bytes we're going to drop */
total_drop_bytes = clib_min (cursize, len);
+ svm_fifo_trace_add (f, tail, total_drop_bytes, 3);
+
/* move head */
head = (head + total_drop_bytes) % f->size;