From: Florin Coras Date: Thu, 8 Aug 2019 19:57:48 +0000 (-0700) Subject: svm: fix fifo max writeable chunk computation X-Git-Tag: v20.05-rc0~1027 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F57%2F21157%2F2;p=vpp.git svm: fix fifo max writeable chunk computation Type:fix Change-Id: I60fdd7651a3d3fac505e7aec7a41f9d096022895 Signed-off-by: Florin Coras --- 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 *