summaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-08 12:57:48 -0700
committerDave Wallace <dwallacelf@gmail.com>2019-08-09 13:53:03 +0000
commit58e95bc2cdff71fb72e8b2e150cfb8e0d8e64103 (patch)
tree9ec5ccc9633af6f867f4a27104d54ea262862bcd /src/svm
parent0f0ff02a93c7bc77c2d4a04a483e0d1056c1c0dc (diff)
svm: fix fifo max writeable chunk computation
Type:fix Change-Id: I60fdd7651a3d3fac505e7aec7a41f9d096022895 Signed-off-by: Florin Coras <fcoras@cisco.com> (cherry picked from commit fcd26a039409e2697a6797e74b0c45544503e853)
Diffstat (limited to 'src/svm')
-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 d5dfc9c4aa3..64ed53bf827 100644
--- a/src/svm/svm_fifo.h
+++ b/src/svm/svm_fifo.h
@@ -650,7 +650,7 @@ svm_fifo_max_write_chunk (svm_fifo_t * f)
{
u32 head, tail;
f_load_head_tail_prod (f, &head, &tail);
- return tail > head ? f->size - tail : f_free_count (f, head, tail);
+ return tail >= head ? f->size - tail : f_free_count (f, head, tail);
}
static inline u8 *