X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Ftcp%2Ftcp_input.c;h=21e5f3cdabaeb1d9ba4256473368acf86633870e;hb=776f3d85ebd4edfb70b0f748890f1efd98d8474c;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..21e5f3cdaba 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); } @@ -1217,7 +1213,7 @@ tcp_do_fastretransmits (tcp_worker_ctx_t * wrk) _vec_len (wrk->postponed_fast_rxt) = 0; _vec_len (wrk->pending_fast_rxt) = 0; - max_burst_size = VLIB_FRAME_SIZE / vec_len (wrk->ongoing_fast_rxt); + max_burst_size = VLIB_FRAME_SIZE / vec_len (ongoing_fast_rxt); max_burst_size = clib_max (max_burst_size, 1); for (i = 0; i < vec_len (ongoing_fast_rxt); i++) @@ -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;