summaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_newreno.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/tcp/tcp_newreno.c')
-rw-r--r--src/vnet/tcp/tcp_newreno.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/vnet/tcp/tcp_newreno.c b/src/vnet/tcp/tcp_newreno.c
index a9ec58c262f..420e47a8ca4 100644
--- a/src/vnet/tcp/tcp_newreno.c
+++ b/src/vnet/tcp/tcp_newreno.c
@@ -37,15 +37,7 @@ newreno_rcv_ack (tcp_connection_t * tc)
else
{
/* tc->cwnd += clib_max ((tc->snd_mss * tc->snd_mss) / tc->cwnd, 1); */
- tc->cwnd_acc_bytes += tc->bytes_acked;
- if (tc->cwnd_acc_bytes >= tc->cwnd)
- {
- u32 inc = tc->cwnd_acc_bytes / tc->cwnd;
- tc->cwnd_acc_bytes -= inc * tc->cwnd;
- tc->cwnd += inc * tc->snd_mss;
- }
- tc->cwnd = clib_min (tc->cwnd,
- transport_tx_fifo_size (&tc->connection));
+ tcp_cwnd_accumulate (tc, tc->cwnd, tc->bytes_acked);
}
}