From 2e31cc35ca5db7f16c8052578d79f1ec84c0acb5 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 25 Sep 2018 14:00:34 -0700 Subject: 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 --- src/vnet/tcp/tcp_newreno.c | 10 +--------- 1 file changed, 1 insertion(+), 9 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 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); } } -- cgit 1.2.3-korg