summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/segment_manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/segment_manager.h')
-rw-r--r--src/vnet/session/segment_manager.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h
index 0e5f62414e5..657a1fcc231 100644
--- a/src/vnet/session/segment_manager.h
+++ b/src/vnet/session/segment_manager.h
@@ -117,13 +117,23 @@ segment_manager_event_queue (segment_manager_t * sm)
return sm->event_queue;
}
+always_inline u64
+segment_manager_make_segment_handle (u32 segment_manager_index,
+ u32 segment_index)
+{
+ return (((u64) segment_manager_index << 32) | segment_index);
+}
+
+u64 segment_manager_segment_handle (segment_manager_t * sm,
+ svm_fifo_segment_private_t * segment);
+
segment_manager_t *segment_manager_new ();
int segment_manager_init (segment_manager_t * sm, u32 first_seg_size,
u32 prealloc_fifo_pairs);
-svm_fifo_segment_private_t *segment_manager_get_segment (segment_manager_t *
- sm,
+svm_fifo_segment_private_t *segment_manager_get_segment (segment_manager_t *,
u32 segment_index);
+svm_fifo_segment_private_t *segment_manager_get_segment_w_handle (u64);
svm_fifo_segment_private_t
* segment_manager_get_segment_w_lock (segment_manager_t * sm,
u32 segment_index);