diff options
author | Florin Coras <fcoras@cisco.com> | 2021-06-16 14:46:57 -0700 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2021-06-16 23:23:50 +0000 |
commit | 8eb8d50ecfd7507aae340cb05a0fb07a790e4303 (patch) | |
tree | 5799f08d5472c6093fc54a33288a4ae4f1567d6f /src/svm | |
parent | cba215dad3101c6b03483c5c40f806903de8460d (diff) |
vcl: fix fifo sharing
Type: fix
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Iec1fe8315a057214901250d5fb06d1c1e33dda46
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 |