diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:27:41 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:27:41 -0500 |
| commit | d347da0deffa1d8f88f0d270eab040e4707c9916 (patch) | |
| tree | e0911f2ef4d36a7b44f7a5379feabebbd37dcfc4 /net/ipv4/tcp_cong.c | |
| parent | c6c88bbde4d8b2ffe9886b7130b2e23781d424e5 (diff) | |
| parent | 74cb8798222bb7d1aecb0acb91e6eeedf5feb948 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/ipv4/tcp_cong.c')
| -rw-r--r-- | net/ipv4/tcp_cong.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index c7cc62c8dc12..e688c687d62d 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
| @@ -174,6 +174,34 @@ int tcp_set_congestion_control(struct sock *sk, const char *name) | |||
| 174 | return err; | 174 | return err; |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | |||
| 178 | /* | ||
| 179 | * Linear increase during slow start | ||
| 180 | */ | ||
| 181 | void tcp_slow_start(struct tcp_sock *tp) | ||
| 182 | { | ||
| 183 | if (sysctl_tcp_abc) { | ||
| 184 | /* RFC3465: Slow Start | ||
| 185 | * TCP sender SHOULD increase cwnd by the number of | ||
| 186 | * previously unacknowledged bytes ACKed by each incoming | ||
| 187 | * acknowledgment, provided the increase is not more than L | ||
| 188 | */ | ||
| 189 | if (tp->bytes_acked < tp->mss_cache) | ||
| 190 | return; | ||
| 191 | |||
| 192 | /* We MAY increase by 2 if discovered delayed ack */ | ||
| 193 | if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) { | ||
| 194 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) | ||
| 195 | tp->snd_cwnd++; | ||
| 196 | } | ||
| 197 | } | ||
| 198 | tp->bytes_acked = 0; | ||
| 199 | |||
| 200 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) | ||
| 201 | tp->snd_cwnd++; | ||
| 202 | } | ||
| 203 | EXPORT_SYMBOL_GPL(tcp_slow_start); | ||
| 204 | |||
| 177 | /* | 205 | /* |
| 178 | * TCP Reno congestion control | 206 | * TCP Reno congestion control |
| 179 | * This is special case used for fallback as well. | 207 | * This is special case used for fallback as well. |
