diff options
author | Florin Coras <fcoras@cisco.com> | 2020-04-28 01:54:22 +0000 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2020-05-04 18:28:16 +0000 |
commit | 9845c20d77ce8e9e66c9a7693c6841cc971bd423 (patch) | |
tree | 04a313f6cd1d25fe47f70bc3981b7162d3c36724 /src/vnet/session/segment_manager.h | |
parent | 933c4ca5a0529b6ed22e0dcc52caa6c797f60563 (diff) |
session: add option to preallocate fifo headers
Type: feature
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Ie47546ef36590b90ed481b14cf812afbecf7981c
Diffstat (limited to 'src/vnet/session/segment_manager.h')
-rw-r--r-- | src/vnet/session/segment_manager.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vnet/session/segment_manager.h b/src/vnet/session/segment_manager.h index fbd9afa9858..1710b7b7697 100644 --- a/src/vnet/session/segment_manager.h +++ b/src/vnet/session/segment_manager.h @@ -27,6 +27,7 @@ typedef struct _segment_manager_props 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 @@ void segment_manager_main_init (segment_manager_main_init_args_t * a); 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 |