aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_cubic.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-01-05 08:47:11 -0800
committerFlorin Coras <florin.coras@gmail.com>2022-01-06 20:18:53 +0000
commit0f8b91f5d8e4bc2f9a0166440abaf00b2bda29bb (patch)
treeff5c4e458895bdd96a7ee20f285e9035df203e44 /src/vnet/tcp/tcp_cubic.c
parent273968cf2d0343b2f4e3217f25c0752f20cf03c5 (diff)
tcp: use bytes delivered to compute cwnd
Should estimated cwnd better with loss Type: improvement Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Idd75d40dbab212ac0a5d533009c5540b1a58f4c4
Diffstat (limited to 'src/vnet/tcp/tcp_cubic.c')
-rw-r--r--src/vnet/tcp/tcp_cubic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/tcp/tcp_cubic.c b/src/vnet/tcp/tcp_cubic.c
index cc2ffeae9f0..3160e528e6d 100644
--- a/src/vnet/tcp/tcp_cubic.c
+++ b/src/vnet/tcp/tcp_cubic.c
@@ -158,7 +158,7 @@ cubic_rcv_ack (tcp_connection_t * tc, tcp_rate_sample_t * rs)
if (tcp_in_slowstart (tc))
{
- tc->cwnd += tc->bytes_acked;
+ tc->cwnd += rs->delivered;
return;
}
@@ -169,7 +169,7 @@ cubic_rcv_ack (tcp_connection_t * tc, tcp_rate_sample_t * rs)
w_aimd = (u64) W_est (cd, t, rtt_sec) * tc->snd_mss;
if (w_cubic < w_aimd)
{
- cubic_cwnd_accumulate (tc, tc->cwnd, tc->bytes_acked);
+ cubic_cwnd_accumulate (tc, tc->cwnd, rs->delivered);
}
else
{
@@ -195,7 +195,7 @@ cubic_rcv_ack (tcp_connection_t * tc, tcp_rate_sample_t * rs)
/* Practically we can't increment so just inflate threshold */
thresh = 50 * tc->cwnd;
}
- cubic_cwnd_accumulate (tc, thresh, tc->bytes_acked);
+ cubic_cwnd_accumulate (tc, thresh, rs->delivered);
}
}