summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp.h
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-02-22 02:27:21 +0000
committerDave Barach <openvpp@barachs.net>2020-02-25 14:48:46 +0000
commit7a3a8664bbc9e295d6382949d2d0bcd1998a05f1 (patch)
treeb16832f9db11bf71fcd64be628df689062f7431f /src/vnet/tcp/tcp.h
parent47d8f5dcd655f0e01774822fca17dd38e7f557dd (diff)
tcp: handle cleanups without timers
Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ida896e9fbe83b4c76578b089bb3fd2bef5e07fd2
Diffstat (limited to 'src/vnet/tcp/tcp.h')
-rw-r--r--src/vnet/tcp/tcp.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h
index bef7edbd411..6094ac5110a 100644
--- a/src/vnet/tcp/tcp.h
+++ b/src/vnet/tcp/tcp.h
@@ -522,6 +522,12 @@ typedef struct tcp_wrk_stats_
#undef _
} tcp_wrk_stats_t;
+typedef struct tcp_free_req_
+{
+ clib_time_type_t free_time;
+ u32 connection_index;
+} tcp_cleanup_req_t;
+
typedef struct tcp_worker_ctx_
{
CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
@@ -561,6 +567,9 @@ typedef struct tcp_worker_ctx_
/* Fifo of pending timer expirations */
u32 *pending_timers;
+ /* fifo of pending free requests */
+ tcp_cleanup_req_t *pending_cleanups;
+
/** worker timer wheel */
tw_timer_wheel_16t_2w_512sl_t timer_wheel;
@@ -634,8 +643,8 @@ typedef struct tcp_configuration_
/** Timer ticks to wait in closing for fin ack */
u16 closing_time;
- /** Timer ticks to wait before cleaning up the connection */
- u16 cleanup_time;
+ /** Time to wait (sec) before cleaning up the connection */
+ f32 cleanup_time;
/** Number of preallocated connections */
u32 preallocated_connections;
@@ -1090,6 +1099,7 @@ void tcp_connection_init_vars (tcp_connection_t * tc);
void tcp_connection_tx_pacer_update (tcp_connection_t * tc);
void tcp_connection_tx_pacer_reset (tcp_connection_t * tc, u32 window,
u32 start_bucket);
+void tcp_program_cleanup (tcp_worker_ctx_t * wrk, tcp_connection_t * tc);
always_inline void
tcp_cc_rcv_ack (tcp_connection_t * tc, tcp_rate_sample_t * rs)