X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp_input.c;h=e93e8bae273da680775f214bbd5985d3d88cb08a;hb=7a3a8664bbc9e295d6382949d2d0bcd1998a05f1;hp=adbfe7a50aca477b8792058fadb988b597a3d842;hpb=487507f40f4e443ff1e683641206db80875f3477;p=vpp.git diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index adbfe7a50ac..e93e8bae273 100755 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -332,12 +332,10 @@ tcp_rcv_rst (tcp_worker_ctx_t * wrk, tcp_connection_t * tc) break; case TCP_STATE_ESTABLISHED: tcp_connection_timers_reset (tc); - /* Set the cleanup timer, in case the session layer/app don't - * cleanly close the connection */ - tcp_timer_set (tc, TCP_TIMER_WAITCLOSE, tcp_cfg.closewait_time); tcp_cong_recovery_off (tc); tcp_program_reset_ntf (wrk, tc); tcp_connection_set_state (tc, TCP_STATE_CLOSED); + tcp_program_cleanup (wrk, tc); break; case TCP_STATE_CLOSE_WAIT: case TCP_STATE_FIN_WAIT_1: @@ -345,12 +343,12 @@ tcp_rcv_rst (tcp_worker_ctx_t * wrk, tcp_connection_t * tc) case TCP_STATE_CLOSING: case TCP_STATE_LAST_ACK: tcp_connection_timers_reset (tc); - tcp_timer_set (tc, TCP_TIMER_WAITCLOSE, tcp_cfg.closewait_time); tcp_cong_recovery_off (tc); tcp_program_reset_ntf (wrk, tc); /* Make sure we mark the session as closed. In some states we may * be still trying to send data */ tcp_connection_set_state (tc, TCP_STATE_CLOSED); + tcp_program_cleanup (wrk, tc); break; case TCP_STATE_CLOSED: case TCP_STATE_TIME_WAIT: @@ -3029,9 +3027,8 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node, if (tc0->flags & TCP_CONN_FINRCVD) { tcp_connection_set_state (tc0, TCP_STATE_CLOSED); - tcp_timer_set (tc0, TCP_TIMER_WAITCLOSE, - tcp_cfg.cleanup_time); session_transport_closed_notify (&tc0->connection); + tcp_program_cleanup (wrk, tc0); goto drop; } @@ -3112,7 +3109,7 @@ tcp46_rcv_process_inline (vlib_main_t * vm, vlib_node_runtime_t * node, * we can't ensure that we have no packets already enqueued * to output. Rely instead on the waitclose timer */ tcp_connection_timers_reset (tc0); - tcp_timer_set (tc0, TCP_TIMER_WAITCLOSE, tcp_cfg.cleanup_time); + tcp_program_cleanup (tcp_get_worker (tc0->c_thread_index), tc0); goto drop;