aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/segment_manager.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-01-14 23:33:46 -0800
committerDave Barach <openvpp@barachs.net>2019-01-17 20:31:54 +0000
commit58a93e8ef288b0bae75ec7186ba96bdcaf85d0d4 (patch)
tree2345aa718a507bd8bfc1857d705e9614e408be18 /src/vnet/session/segment_manager.c
parent72b04288d9a670829050a6ca5d931ae5b55b33ed (diff)
tls: preallocate app sessions on connect/accept
Avoid allocating session and possibly reallocating thread session pool on builtin session rx. Change-Id: I70e7c604678b44ce8d22603489e247a2c5faa439 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/segment_manager.c')
-rw-r--r--src/vnet/session/segment_manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/vnet/session/segment_manager.c b/src/vnet/session/segment_manager.c
index e48e951722d..a0d9a0959a5 100644
--- a/src/vnet/session/segment_manager.c
+++ b/src/vnet/session/segment_manager.c
@@ -599,6 +599,9 @@ segment_manager_dealloc_fifos (u32 segment_index, svm_fifo_t * rx_fifo,
svm_fifo_segment_private_t *fifo_segment;
segment_manager_t *sm;
+ if (!rx_fifo || !tx_fifo)
+ return;
+
/* It's possible to have no segment manager if the session was removed
* as result of a detach. */
if (!(sm = segment_manager_get_if_valid (rx_fifo->segment_manager)))