summaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo_segment.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-04-18 18:58:10 -0700
committerDave Barach <openvpp@barachs.net>2019-04-19 15:15:39 +0000
commit2309e7a481f64e9dee21c43da4e48974cfee1156 (patch)
tree801a827d3c455f92da9f682090ebce9970f03c85 /src/svm/svm_fifo_segment.c
parent3b62e29c3adc8e4114cb10dc794f4b3f814015b0 (diff)
svm: support addition of chunks to fifos
Change-Id: Ia56cad89b85b7a99ab4bfb85318a45a71381fb53 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/svm/svm_fifo_segment.c')
-rw-r--r--src/svm/svm_fifo_segment.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/svm/svm_fifo_segment.c b/src/svm/svm_fifo_segment.c
index 90bf593f74c..f5fe60a280d 100644
--- a/src/svm/svm_fifo_segment.c
+++ b/src/svm/svm_fifo_segment.c
@@ -23,11 +23,10 @@ fifo_init_for_segment (svm_fifo_segment_header_t * fsh, u8 * fifo_space,
f = (svm_fifo_t *) fifo_space;
f->freelist_index = freelist_index;
- f->default_chunk.next = &f->default_chunk;
f->default_chunk.start_byte = 0;
f->default_chunk.length = size;
- f->head_chunk = &f->default_chunk;
- f->tail_chunk = &f->default_chunk;
+ f->default_chunk.next = f->start_chunk = &f->default_chunk;
+ f->end_chunk = f->head_chunk = f->tail_chunk = f->start_chunk;
f->next = fsh->free_fifos[freelist_index];
fsh->free_fifos[freelist_index] = f;
}