summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-08 12:57:48 -0700
committerDave Barach <openvpp@barachs.net>2019-08-08 22:03:06 +0000
commitfcd26a039409e2697a6797e74b0c45544503e853 (patch)
tree38c568a384887c5f4da7a7d9a2ea7675bc2ae6a8 /src
parent75c48c1fff9831b4e8bc6c9f8b2bf4f6720b61fe (diff)
svm: fix fifo max writeable chunk computation
Type:fix Change-Id: I60fdd7651a3d3fac505e7aec7a41f9d096022895 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-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 *