From 0f8b91f5d8e4bc2f9a0166440abaf00b2bda29bb Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 5 Jan 2022 08:47:11 -0800 Subject: tcp: use bytes delivered to compute cwnd Should estimated cwnd better with loss Type: improvement Signed-off-by: Florin Coras Change-Id: Idd75d40dbab212ac0a5d533009c5540b1a58f4c4 --- src/vnet/tcp/tcp_newreno.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/vnet/tcp/tcp_newreno.c') diff --git a/src/vnet/tcp/tcp_newreno.c b/src/vnet/tcp/tcp_newreno.c index c5ffc2a4109..39035bac00c 100644 --- a/src/vnet/tcp/tcp_newreno.c +++ b/src/vnet/tcp/tcp_newreno.c @@ -49,12 +49,12 @@ newreno_rcv_ack (tcp_connection_t * tc, tcp_rate_sample_t * rs) { if (tcp_in_slowstart (tc)) { - tc->cwnd += clib_min (tc->snd_mss, tc->bytes_acked); + tc->cwnd += clib_min (tc->snd_mss, rs->delivered); } else { /* tc->cwnd += clib_max ((tc->snd_mss * tc->snd_mss) / tc->cwnd, 1); */ - tcp_cwnd_accumulate (tc, tc->cwnd, tc->bytes_acked); + tcp_cwnd_accumulate (tc, tc->cwnd, rs->delivered); } } -- cgit 1.2.3-korg