summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/builtin_client.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-07-24 17:40:28 -0700
committerDave Barach <openvpp@barachs.net>2017-07-30 15:04:26 +0000
commit68810624f84467503482b82662c980e8f0e36deb (patch)
treee2365cc66a5b6d28700e6b167e0e7038fdafbda0 /src/vnet/tcp/builtin_client.h
parent03a6213fb5022d37ea92f974a1814db1c70bcbdf (diff)
Make tcp active open data structures thread safe
- Cleanup half-open connections and timers on the right thread - Ensure half-open connection and transport endpoint pools are thread safe - Enqueue TX events to the correct vpp thread in the builtin client - Use transport proto in transport connections instead of session type Change-Id: Id13239a206afbff6f34a38afa510fe014e4b2049 Signed-off-by: Florin Coras <fcoras@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vnet/tcp/builtin_client.h')
-rw-r--r--src/vnet/tcp/builtin_client.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vnet/tcp/builtin_client.h b/src/vnet/tcp/builtin_client.h
index 38af231dec3..06d239efe14 100644
--- a/src/vnet/tcp/builtin_client.h
+++ b/src/vnet/tcp/builtin_client.h
@@ -48,8 +48,7 @@ typedef struct
* Application setup parameters
*/
unix_shared_memory_queue_t *vl_input_queue; /**< vpe input queue */
- unix_shared_memory_queue_t *our_event_queue; /**< Our event queue */
- unix_shared_memory_queue_t *vpp_event_queue; /**< $$$ single thread */
+ unix_shared_memory_queue_t **vpp_event_queue;
u32 cli_node_index; /**< cli process node index */
u32 my_client_index; /**< loopback API client handle */
@@ -70,9 +69,9 @@ typedef struct
/*
* Test state variables
*/
- session_t *sessions; /**< Sessions pool */
- u8 *rx_buf; /**< intermediate rx buffer */
- uword *session_index_by_vpp_handles; /**< Hash table for disconnecting */
+ session_t *sessions; /**< Session pool, shared */
+ clib_spinlock_t sessions_lock;
+ u8 **rx_buf; /**< intermediate rx buffers */
u8 *connect_test_data; /**< Pre-computed test data */
u32 **connection_index_by_thread;
u32 **connections_this_batch_by_thread; /**< active connection batch */