diff options
Diffstat (limited to 'src/svm')
-rw-r--r-- | src/svm/fifo_segment.c | 8 | ||||
-rw-r--r-- | src/svm/fifo_segment.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/svm/fifo_segment.c b/src/svm/fifo_segment.c index b680d27fe33..6ab07974ff7 100644 --- a/src/svm/fifo_segment.c +++ b/src/svm/fifo_segment.c @@ -903,6 +903,14 @@ fifo_segment_alloc_fifo_w_offset (fifo_segment_t *fs, uword offset) return f; } +svm_fifo_t * +fifo_segment_duplicate_fifo (fifo_segment_t *fs, svm_fifo_t *f) +{ + svm_fifo_t *nf = fs_fifo_alloc (fs, 0); + clib_memcpy (nf, f, sizeof (*f)); + return nf; +} + /** * Free fifo allocated in fifo segment */ diff --git a/src/svm/fifo_segment.h b/src/svm/fifo_segment.h index a4290bb1dc7..74f73d43334 100644 --- a/src/svm/fifo_segment.h +++ b/src/svm/fifo_segment.h @@ -132,6 +132,7 @@ svm_fifo_t *fifo_segment_alloc_fifo_w_slice (fifo_segment_t * fs, fifo_segment_ftype_t ftype); svm_fifo_t *fifo_segment_alloc_fifo_w_offset (fifo_segment_t *fs, uword offset); +svm_fifo_t *fifo_segment_duplicate_fifo (fifo_segment_t *fs, svm_fifo_t *f); /** * Free fifo allocated in fifo segment |