diff options
author | Florin Coras <fcoras@cisco.com> | 2022-03-18 08:33:08 -0700 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2022-12-02 22:59:13 +0000 |
commit | 309f7aac170767028a2e6e7e9424ec3d13304aff (patch) | |
tree | 84b4e26408e994f196c4e0029709c806be5bfef6 /src/vnet/tcp/tcp.c | |
parent | 06bbab0c45c805544c981b8765ea3d85760d66a8 (diff) |
session: move connects to first worker
Type: improvement
Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: I035e3fdbb52eca010ad7b2c20ca2930cb1645978
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r-- | src/vnet/tcp/tcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c index bdf1751ff14..c0445b9048b 100644 --- a/src/vnet/tcp/tcp.c +++ b/src/vnet/tcp/tcp.c @@ -188,8 +188,7 @@ tcp_session_get_listener (u32 listener_index) static tcp_connection_t * tcp_half_open_connection_alloc (void) { - ASSERT (vlib_get_thread_index () == 0); - return tcp_connection_alloc (0); + return tcp_connection_alloc (transport_cl_thread ()); } /** @@ -199,7 +198,8 @@ tcp_half_open_connection_alloc (void) static void tcp_half_open_connection_free (tcp_connection_t * tc) { - ASSERT (vlib_get_thread_index () == 0); + ASSERT (vlib_get_thread_index () == tc->c_thread_index || + vlib_thread_is_main_w_barrier ()); return tcp_connection_free (tc); } |