summaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-18 00:28:59 -0700
committerDave Barach <openvpp@barachs.net>2021-05-18 18:14:53 +0000
commitfb50bc31bfd54902231925749cacbbcd6dfccc96 (patch)
tree125bc081d141c3478ff8f3d6dad7a314726c1aeb /src/vnet/session
parenta48dffeed3d5182d1faa41f2ba64beb20bf10ea0 (diff)
tls: fix dtls with no workers
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Iecc33fda7f28c037289775ffe0525a50f89a2b8c
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.h9
-rw-r--r--src/vnet/session/transport.c6
2 files changed, 14 insertions, 1 deletions
diff --git a/src/vnet/session/session.h b/src/vnet/session/session.h
index f874ac2a263..b583c3ef0dd 100644
--- a/src/vnet/session/session.h
+++ b/src/vnet/session/session.h
@@ -189,6 +189,9 @@ typedef struct session_main_
* Trade memory for speed, for now */
u32 *session_type_to_next;
+ /** Thread for cl and ho that rely on cl allocs */
+ u32 transport_cl_thread;
+
transport_proto_t last_transport_proto_type;
/*
@@ -619,6 +622,12 @@ transport_add_tx_event (transport_connection_t * tc)
session_send_io_evt_to_thread (s->tx_fifo, SESSION_IO_EVT_TX);
}
+always_inline u32
+transport_cl_thread (void)
+{
+ return session_main.transport_cl_thread;
+}
+
/*
* Listen sessions
*/
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 2c88a4c4931..5975197609d 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -853,7 +853,11 @@ transport_init (void)
smm->local_endpoints_table_memory);
num_threads = 1 /* main thread */ + vtm->n_threads;
if (num_threads > 1)
- clib_spinlock_init (&local_endpoints_lock);
+ {
+ clib_spinlock_init (&local_endpoints_lock);
+ /* Main not polled if there are workers */
+ smm->transport_cl_thread = 1;
+ }
}
/*