summaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/svm_fifo.c1
-rw-r--r--src/svm/svm_fifo.h2
-rw-r--r--src/svm/svm_fifo_segment.c4
3 files changed, 5 insertions, 2 deletions
diff --git a/src/svm/svm_fifo.c b/src/svm/svm_fifo.c
index 4397ef8413e..e7a1188d591 100644
--- a/src/svm/svm_fifo.c
+++ b/src/svm/svm_fifo.c
@@ -218,6 +218,7 @@ svm_fifo_create (u32 data_size_in_bytes)
f->nitems = data_size_in_bytes;
f->ooos_list_head = OOO_SEGMENT_INVALID_INDEX;
f->ct_session_index = SVM_FIFO_INVALID_SESSION_INDEX;
+ f->segment_index = SVM_FIFO_INVALID_INDEX;
f->refcnt = 1;
return (f);
}
diff --git a/src/svm/svm_fifo.h b/src/svm/svm_fifo.h
index 791b513a4a6..9bba85fddf4 100644
--- a/src/svm/svm_fifo.h
+++ b/src/svm/svm_fifo.h
@@ -39,6 +39,7 @@ format_function_t format_ooo_list;
#define SVM_FIFO_TRACE (0)
#define OOO_SEGMENT_INVALID_INDEX ((u32)~0)
#define SVM_FIFO_INVALID_SESSION_INDEX ((u32)~0)
+#define SVM_FIFO_INVALID_INDEX ((u32)~0)
typedef struct
{
@@ -61,6 +62,7 @@ typedef struct _svm_fifo
u8 master_thread_index;
u8 client_thread_index;
u32 segment_manager;
+ u32 segment_index;
u32 ct_session_index; /**< Local session index for vpp */
CLIB_CACHE_LINE_ALIGN_MARK (end_shared);
u32 head;
diff --git a/src/svm/svm_fifo_segment.c b/src/svm/svm_fifo_segment.c
index a42225c8345..6cb402f1a6b 100644
--- a/src/svm/svm_fifo_segment.c
+++ b/src/svm/svm_fifo_segment.c
@@ -337,7 +337,7 @@ svm_fifo_segment_delete (svm_fifo_segment_private_t * s)
* Allocate fifo in svm segment
*/
svm_fifo_t *
-svm_fifo_segment_alloc_fifo (svm_fifo_segment_private_t * s,
+svm_fifo_segment_alloc_fifo (svm_fifo_segment_private_t * fs,
u32 data_size_in_bytes,
svm_fifo_segment_freelist_t list_index)
{
@@ -361,7 +361,7 @@ svm_fifo_segment_alloc_fifo (svm_fifo_segment_private_t * s,
freelist_index = max_log2 (data_size_in_bytes)
- max_log2 (FIFO_SEGMENT_MIN_FIFO_SIZE);
- sh = s->ssvm.sh;
+ sh = fs->ssvm.sh;
ssvm_lock_non_recursive (sh, 1);
fsh = (svm_fifo_segment_header_t *) sh->opaque[0];