summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/svm/fifo_segment.c4
-rw-r--r--src/svm/svm_fifo.c2
2 files changed, 2 insertions, 4 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c
index 473cdf31b64..9cbd7205853 100644
--- a/src/svm/fifo_segment.c
+++ b/src/svm/fifo_segment.c
@@ -512,8 +512,6 @@ fsh_try_alloc_chunk_batch (fifo_segment_header_t * fsh,
{
c->start_byte = 0;
c->length = rounded_data_size;
- c->enq_rb_index = RBTREE_TNIL_INDEX;
- c->deq_rb_index = RBTREE_TNIL_INDEX;
c->next = head;
head = c;
cmem += sizeof (*c) + rounded_data_size;
@@ -708,8 +706,6 @@ fsh_slice_collect_chunks (fifo_segment_header_t * fsh,
CLIB_MEM_UNPOISON (c, sizeof (*c));
next = c->next;
fl_index = fs_freelist_for_size (c->length);
- c->enq_rb_index = RBTREE_TNIL_INDEX;
- c->deq_rb_index = RBTREE_TNIL_INDEX;
fss_chunk_free_list_push (fss, fl_index, c);
n_collect += fs_freelist_index_to_size (fl_index);
c = next;
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;
}