X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp.h;h=bd0fa9a72047a817aa1435dc21b3742b48fe41e1;hb=54ddf435338ce035c1a92199acd5a3b217db177b;hp=a62e01d70e1b105dccb82bbd59686325daef854f;hpb=8124cb784050275372e05a97b1e62f9f1ba5a091;p=vpp.git diff --git a/src/vnet/tcp/tcp.h b/src/vnet/tcp/tcp.h index a62e01d70e1..bd0fa9a7204 100644 --- a/src/vnet/tcp/tcp.h +++ b/src/vnet/tcp/tcp.h @@ -102,7 +102,8 @@ extern timer_expiration_handler tcp_timer_retransmit_syn_handler; #define TCP_2MSL_TIME 300 /* 30s */ #define TCP_CLOSEWAIT_TIME 20 /* 2s */ #define TCP_TIMEWAIT_TIME 100 /* 10s */ -#define TCP_CLEANUP_TIME 10 /* 1s Time to wait before cleanup */ +#define TCP_FINWAIT1_TIME 600 /* 60s */ +#define TCP_CLEANUP_TIME 1 /* 0.1s */ #define TCP_TIMER_PERSIST_MIN 2 /* 0.2s */ #define TCP_RTO_MAX 60 * THZ /* Min max RTO (60s) as per RFC6298 */ @@ -124,7 +125,7 @@ extern timer_expiration_handler tcp_timer_retransmit_syn_handler; _(FRXT_PENDING, "Fast-retransmit pending") \ _(FRXT_FIRST, "Fast-retransmit first again") \ _(DEQ_PENDING, "Pending dequeue acked") \ - _(PSH_PENDING, "Pending psh packet") \ + _(PSH_PENDING, "PSH pending") \ typedef enum _tcp_connection_flag_bits { @@ -561,6 +562,13 @@ tcp_get_connection_from_transport (transport_connection_t * tconn) return (tcp_connection_t *) tconn; } +always_inline void +tcp_connection_set_state (tcp_connection_t * tc, tcp_state_t state) +{ + tc->state = state; + TCP_EVT_DBG (TCP_EVT_STATE_CHANGE, tc); +} + void tcp_connection_close (tcp_connection_t * tc); void tcp_connection_cleanup (tcp_connection_t * tc); void tcp_connection_del (tcp_connection_t * tc);