X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.h;h=4db6040ae6405047635910082e914c0b2924ecc3;hb=6080e0d15e152e38811b01306eef6719a682c007;hp=bef7edbd4114ddfe7b62ed15a161474f54935a0d;hpb=a9d8cb494fb40a1fc4378cc8ced27b48b0ed62a6;p=vpp.git diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index bef7edbd411..4db6040ae64 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; @@ -1027,6 +1036,12 @@ tcp_available_cc_snd_space (const tcp_connection_t * tc) return available_wnd - flight_size; } +static inline u8 +tcp_is_descheduled (tcp_connection_t * tc) +{ + return (transport_connection_is_descheduled (&tc->connection) ? 1 : 0); +} + always_inline u8 tcp_is_lost_fin (tcp_connection_t * tc) { @@ -1037,6 +1052,7 @@ tcp_is_lost_fin (tcp_connection_t * tc) u32 tcp_snd_space (tcp_connection_t * tc); int tcp_fastrecovery_prr_snd_space (tcp_connection_t * tc); +void tcp_reschedule (tcp_connection_t * tc); fib_node_index_t tcp_lookup_rmt_in_fib (tcp_connection_t * tc); @@ -1090,6 +1106,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)