aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/tcp/tcp_newreno.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-09-25 14:00:34 -0700
committerDamjan Marion <dmarion@me.com>2018-11-09 11:24:22 +0000
commit2e31cc35ca5db7f16c8052578d79f1ec84c0acb5 (patch)
tree673f9bc946628d9d554c126f92d75eab4d67d0cb /src/vnet/tcp/tcp_newreno.c
parent97670eb3c643eefbecfbe2d61a8f06cde9516778 (diff)
tcp: basic cubic implementation
Because the code is not optimized, newreno is still the default congestion control algorithm. Change-Id: I7061cc80c5a75fa8e8265901fae4ea2888e35173 Signed-off-by: Florin Coras <fcoras@cisco.com>
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);
}
}