summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_input.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-11-01 16:30:54 -0700
committerMarco Varlese <marco.varlese@suse.de>2018-11-02 08:06:46 +0000
commitc44a558164a466a74a4c10d4e7d7dd1b9a4b01dd (patch)
tree3f71b876678de40d0bd6f0a15f463dbe51d61719 /src/vnet/tcp/tcp_input.c
parentbe72ae6149a432899698a887b1820cf5c9d9456f (diff)
session: measure dispatch period only if under load
Also reset pacer on tcp retransmit timeout Change-Id: I5a9edee4c00d1d169248d79587a9b10437c2bd87 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/tcp/tcp_input.c')
-rw-r--r--src/vnet/tcp/tcp_input.c12
1 files changed, 5 insertions, 7 deletions
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;