diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-02-27 23:44:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-02 06:00:15 -0500 |
commit | 758ce5c8d11d6fc57fe5f1dbc237aa8ff6386eac (patch) | |
tree | 45b3dff5ca179712d50cdeae45846db8ffd51caa /net/ipv4/tcp_yeah.c | |
parent | 571a5dd8d01f2a7e279c502fa220a69262d73694 (diff) |
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>
Diffstat (limited to 'net/ipv4/tcp_yeah.c')
-rw-r--r-- | net/ipv4/tcp_yeah.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c index 9ec843a9bbb2..66b6821b984e 100644 --- a/net/ipv4/tcp_yeah.c +++ b/net/ipv4/tcp_yeah.c | |||
@@ -94,14 +94,7 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
94 | 94 | ||
95 | } else { | 95 | } else { |
96 | /* Reno */ | 96 | /* Reno */ |
97 | 97 | tcp_cong_avoid_ai(tp, tp->snd_cwnd); | |
98 | if (tp->snd_cwnd_cnt < tp->snd_cwnd) | ||
99 | tp->snd_cwnd_cnt++; | ||
100 | |||
101 | if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { | ||
102 | tp->snd_cwnd++; | ||
103 | tp->snd_cwnd_cnt = 0; | ||
104 | } | ||
105 | } | 98 | } |
106 | 99 | ||
107 | /* The key players are v_vegas.beg_snd_una and v_beg_snd_nxt. | 100 | /* The key players are v_vegas.beg_snd_una and v_beg_snd_nxt. |