aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2021-05-14 09:22:20 -0700
committerDamjan Marion <dmarion@me.com>2021-05-14 18:06:22 +0000
commit7dcc339ad4a4a7f7e1f039a8b2950c35665bd5c3 (patch)
tree807525cf20b7ce2282c07b16a68ef9205083ef4c /src/vnet/tcp/tcp.c
parent2034f35308d199f7b0cc1ddceaa2e6ed1576bc18 (diff)
tcp: remove ho lock
Half-open sessions are allocated by main thread and cleaned up on main with timers. Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: I37f000920a45908b62b5501ae9d54a88a9e4c609
Diffstat (limited to 'src/vnet/tcp/tcp.c')
-rw-r--r--src/vnet/tcp/tcp.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/vnet/tcp/tcp.c b/src/vnet/tcp/tcp.c
index 16bf9451709..acb3868f419 100644
--- a/src/vnet/tcp/tcp.c
+++ b/src/vnet/tcp/tcp.c
@@ -189,11 +189,9 @@ static void
tcp_half_open_connection_free (tcp_connection_t * tc)
{
tcp_main_t *tm = vnet_get_tcp_main ();
- clib_spinlock_lock_if_init (&tm->half_open_lock);
if (CLIB_DEBUG)
clib_memset (tc, 0xFA, sizeof (*tc));
pool_put (tm->half_open_connections, tc);
- clib_spinlock_unlock_if_init (&tm->half_open_lock);
}
/**
@@ -818,7 +816,6 @@ tcp_session_open (transport_endpoint_cfg_t * rmt)
/*
* Create connection and send SYN
*/
- clib_spinlock_lock_if_init (&tm->half_open_lock);
tc = tcp_half_open_connection_new ();
ip_copy (&tc->c_rmt_ip, &rmt->ip, rmt->is_ip4);
ip_copy (&tc->c_lcl_ip, &lcl_addr, rmt->is_ip4);
@@ -836,7 +833,6 @@ tcp_session_open (transport_endpoint_cfg_t * rmt)
tc->state = TCP_STATE_SYN_SENT;
tcp_init_snd_vars (tc);
tcp_send_syn (tc);
- clib_spinlock_unlock_if_init (&tm->half_open_lock);
return tc->c_c_index;
}
@@ -1526,11 +1522,6 @@ tcp_main_enable (vlib_main_t * vm)
pool_init_fixed (tm->half_open_connections,
tcp_cfg.preallocated_half_open_connections);
- if (num_threads > 1)
- {
- clib_spinlock_init (&tm->half_open_lock);
- }
-
tcp_initialize_iss_seed (tm);
tm->bytes_per_buffer = vlib_buffer_get_default_data_size (vm);