X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp_input.c;h=fb2f1ddc9ef8bf6dea3779f9d52f171afcf50e8c;hb=c44a558164a466a74a4c10d4e7d7dd1b9a4b01dd;hp=af13c5f8215844ada2552b197cd0a161275862a6;hpb=be72ae6149a432899698a887b1820cf5c9d9456f;p=vpp.git diff --git a/src/vnet/tcp/tcp_input.c b/src/vnet/tcp/tcp_input.c index af13c5f8215..fb2f1ddc9ef 100644 --- a/src/vnet/tcp/tcp_input.c +++ b/src/vnet/tcp/tcp_input.c @@ -1085,10 +1085,6 @@ tcp_cc_fastrecovery_exit (tcp_connection_t * tc) tcp_fastrecovery_1_smss_off (tc); tcp_fastrecovery_first_off (tc); - /* Update pacer because our cwnd changed. Also makes sure - * that we recompute the max burst size */ - tcp_update_pacer (tc); - TCP_EVT_DBG (TCP_EVT_CC_EVT, tc, 3); } @@ -1290,7 +1286,8 @@ tcp_cc_handle_event (tcp_connection_t * tc, u32 is_dack) } else if (tcp_should_fastrecover (tc)) { - u32 byte_rate; + u32 pacer_wnd; + ASSERT (!tcp_in_fastrecovery (tc)); /* Heuristic to catch potential late dupacks @@ -1319,8 +1316,9 @@ tcp_cc_handle_event (tcp_connection_t * tc, u32 is_dack) tc->cwnd = tc->ssthresh + 3 * tc->snd_mss; } - byte_rate = (0.3 * tc->cwnd) / ((f64) TCP_TICK * tc->srtt); - transport_connection_tx_pacer_init (&tc->connection, byte_rate, 0); + pacer_wnd = clib_max (0.1 * tc->cwnd, 2 * tc->snd_mss); + tcp_connection_tx_pacer_reset (tc, pacer_wnd, + 0 /* start bucket */ ); tcp_program_fastretransmit (tcp_get_worker (tc->c_thread_index), tc); return;