diff options
author | Florin Coras <fcoras@cisco.com> | 2019-08-28 17:12:32 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-08-29 00:39:12 +0000 |
commit | 73cad33b56ffc08943e9c0d73ecb14466558baae (patch) | |
tree | 567278ca842bac0d2bc6edddb3626c0a62533e91 /src/svm | |
parent | f1f5a8a1a50efd6ac369cfe28774a344d120b71c (diff) |
svm: fix fifo hdr freelist allocation
Type: fix
Change-Id: Ia362ad821db1fd506e973e1844cc3ec74703cc17
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm')
-rw-r--r-- | src/svm/fifo_segment.c | 4 | ||||
-rw-r--r-- | src/svm/svm_fifo.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c index eeb274636c1..dab97a55209 100644 --- a/src/svm/fifo_segment.c +++ b/src/svm/fifo_segment.c @@ -233,6 +233,10 @@ fs_try_alloc_fifo_freelist_multi_chunk (fifo_segment_t * fs, u32 data_bytes) return 0; memset (f, 0, sizeof (*f)); } + else + { + fsh->free_fifos = f->next; + } fl_index = fs_freelist_for_size (data_bytes) - 1; vec_validate_init_empty (fsh->free_chunks, fl_index, 0); diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c index b6f0df7d88d..6bd6f9157bc 100644 --- a/src/svm/svm_fifo.c +++ b/src/svm/svm_fifo.c @@ -400,7 +400,7 @@ svm_fifo_init (svm_fifo_t * f, u32 size) f->ooos_list_head = OOO_SEGMENT_INVALID_INDEX; f->segment_index = SVM_FIFO_INVALID_INDEX; f->refcnt = 1; - f->flags = 0; + f->head = f->tail = f->flags = 0; f->head_chunk = f->tail_chunk = f->ooo_enq = f->ooo_deq = f->start_chunk; } |