summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/segment_manager.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-11-29 12:40:10 -0800
committerOle Trøan <otroan@employees.org>2018-11-30 07:21:02 +0000
commitfa76a76bf3388f09d55d0c83e7aea507c44f9619 (patch)
treeee9f51236f6e4acf5627f11f27aff73de9d1fe15 /src/vnet/session/segment_manager.h
parent4744ddbfe0012861895dbd33487569e46b81554b (diff)
session: segment handle in accept/connect notifications
Change-Id: I03884b6cde9d4c38ae13d1994fd8d37d44016ef0 Signed-off-by: Florin Coras <fcoras@cisco.com>
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);