aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/segment_manager.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-10-23 16:31:40 -0700
committerFlorin Coras <florin.coras@gmail.com>2020-10-27 00:09:36 +0000
commit2d0e3de146c239f584004444491c2b25fd1a7bd7 (patch)
tree0ffb98719c8d676a6f0b5044b522c9c850e47724 /src/vnet/session/segment_manager.c
parent70ae0a9682709ede68de467c9932472ea3c0e100 (diff)
session: per worker state for ct sessions
Type: feature Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Id6f7b2b969eb50eb7611e4e9ca77b7ef0e0519a1
Diffstat (limited to 'src/vnet/session/segment_manager.c')
-rw-r--r--src/vnet/session/segment_manager.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index e00a7616448..1d648f9e410 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -231,7 +231,7 @@ segment_manager_get_segment_if_valid (segment_manager_t * sm,
* Removes segment after acquiring writer lock
*/
static inline void
-segment_manager_lock_and_del_segment (segment_manager_t * sm, u32 fs_index)
+sm_lock_and_del_segment_inline (segment_manager_t * sm, u32 fs_index)
{
fifo_segment_t *fs;
u8 is_prealloc;
@@ -252,6 +252,12 @@ done:
clib_rwlock_writer_unlock (&sm->segments_rwlock);
}
+void
+segment_manager_lock_and_del_segment (segment_manager_t * sm, u32 fs_index)
+{
+ sm_lock_and_del_segment_inline (sm, fs_index);
+}
+
/**
* Reads a segment from the segment manager's pool without lock
*/
@@ -774,7 +780,7 @@ segment_manager_dealloc_fifos (svm_fifo_t * rx_fifo, svm_fifo_t * tx_fifo)
/* Remove segment if it holds no fifos or first but not protected */
if (segment_index != 0 || !sm->first_is_protected)
- segment_manager_lock_and_del_segment (sm, segment_index);
+ sm_lock_and_del_segment_inline (sm, segment_index);
/* Remove segment manager if no sessions and detached from app */
if (segment_manager_app_detached (sm)