session: add option to preallocate fifo headers
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie47546ef36590b90ed481b14cf812afbecf7981c
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h
index fbd9afa..1710b7b 100644
--- a/src/vnet/session/segment_manager.h
+++ b/src/vnet/session/segment_manager.h
@@ -27,6 +27,7 @@
u32 tx_fifo_size; /**< transmit fifo size */
u32 evt_q_size; /**< event queue length */
u32 prealloc_fifos; /**< preallocated fifo pairs */
+ u32 prealloc_fifo_hdrs; /**< preallocated fifo hdrs */
uword segment_size; /**< first segment size */
uword add_segment_size; /**< additional segment size */
u8 add_segment:1; /**< can add new segments flag */
@@ -159,6 +160,14 @@
segment_manager_props_t *segment_manager_props_init (segment_manager_props_t *
sm);
+static inline void
+segment_manager_parse_segment_handle (u64 segment_handle, u32 * sm_index,
+ u32 * segment_index)
+{
+ *sm_index = segment_handle >> 32;
+ *segment_index = segment_handle & 0xFFFFFFFF;
+}
+
#endif /* SRC_VNET_SESSION_SEGMENT_MANAGER_H_ */
/*
* fd.io coding-style-patch-verification: ON