tcp: add helper for AI algorithm
It seems that implementation in yeah was inconsistent to what other did as it would increase cwnd one ack earlier than the others do. Size benefits: bictcp_cong_avoid | -36 tcp_cong_avoid_ai | +52 bictcp_cong_avoid | -34 tcp_scalable_cong_avoid | -36 tcp_veno_cong_avoid | -12 tcp_yeah_cong_avoid | -38 = -104 bytes total Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
571a5dd8d0
commit
758ce5c8d1
@@ -294,16 +294,7 @@ static void bictcp_cong_avoid(struct sock *sk, u32 ack, u32 in_flight)
|
||||
tcp_slow_start(tp);
|
||||
} else {
|
||||
bictcp_update(ca, tp->snd_cwnd);
|
||||
|
||||
/* In dangerous area, increase slowly.
|
||||
* In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd
|
||||
*/
|
||||
if (tp->snd_cwnd_cnt >= ca->cnt) {
|
||||
if (tp->snd_cwnd < tp->snd_cwnd_clamp)
|
||||
tp->snd_cwnd++;
|
||||
tp->snd_cwnd_cnt = 0;
|
||||
} else
|
||||
tp->snd_cwnd_cnt++;
|
||||
tcp_cong_avoid_ai(tp, ca->cnt);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user