aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/svm_fifo.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-05-30 09:30:07 -0400
committerFlorin Coras <florin.coras@gmail.com>2017-06-01 16:02:55 +0000
commit10d8cc6bf92851fcaec4a6b4c6d3554dc1eb2386 (patch)
treec146b324f974aa13499a1d784a96ef96438c9d15 /src/svm/svm_fifo.h
parent26261594a0b821770aa0a646cba8399aa6320c2e (diff)
Improve fifo allocator performance
- add option to preallocate fifos in a segment - track active fifos with doubly linked list instead of vector - update udp redirect test code to read fifo pointers from API call instead of digging them up from fifo segment header - input-node based active-open session generator Change-Id: I804b81e99d95f8690d17e12660c6645995e28a9a Signed-off-by: Dave Barach <dave@barachs.net> Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dbarach@cisco.com>
Diffstat (limited to 'src/svm/svm_fifo.h')
-rw-r--r--src/svm/svm_fifo.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h
index 69369163..9cb93ff4 100644
--- a/src/svm/svm_fifo.h
+++ b/src/svm/svm_fifo.h
@@ -38,7 +38,7 @@ format_function_t format_ooo_list;
#define OOO_SEGMENT_INVALID_INDEX ((u32)~0)
-typedef struct
+typedef struct _svm_fifo
{
volatile u32 cursize; /**< current fifo size */
u32 nitems;
@@ -62,7 +62,8 @@ typedef struct
ooo_segment_t *ooo_segments; /**< Pool of ooo segments */
u32 ooos_list_head; /**< Head of out-of-order linked-list */
u32 ooos_newest; /**< Last segment to have been updated */
-
+ struct _svm_fifo *next; /**< next in freelist/active chain */
+ struct _svm_fifo *prev; /**< prev in active chain */
CLIB_CACHE_LINE_ALIGN_MARK (data);
} svm_fifo_t;