aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-11-17 15:56:38 -0800
committerDave Barach <openvpp@barachs.net>2020-11-19 21:36:32 +0000
commit91b364010cc81260f81af19bae6fd5ec22ee3b90 (patch)
tree9130f76c8dc88741c3e3d90696da3e0cd8e9412e /src/svm/svm_fifo.c
parentd9ed0b67866fa6b8a5f449fdb8da8d6aacb5f225 (diff)
svm: init chunk rb tree indices in fifo
Type: improvement Let fifo segment mainly deal with fifo and chunk allocations not initialization. Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I1f1eb5a1423ba52cb950ae771641fd7eeff4e76c
Diffstat (limited to 'src/svm/svm_fifo.c')
-rw-r--r--src/svm/svm_fifo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index d49cbe2bf7d..d357eb6b8a9 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -389,11 +389,13 @@ svm_fifo_init (svm_fifo_t * f, u32 size)
*/
f->start_chunk->start_byte = 0;
prev = f->start_chunk;
+ prev->enq_rb_index = prev->deq_rb_index = RBTREE_TNIL_INDEX;
c = prev->next;
while (c)
{
c->start_byte = prev->start_byte + prev->length;
+ c->enq_rb_index = c->deq_rb_index = RBTREE_TNIL_INDEX;
prev = c;
c = c->next;
}