diff options
author | Stephen Hemminger <stephen@networkplumber.org> | 2013-02-05 02:25:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-05 14:51:16 -0500 |
commit | ca2eb5679f8ddffff60156af42595df44a315ef0 (patch) | |
tree | e056a2cf5454039f071d47cc919bf73a9bf0c60f /net/ipv4/tcp_cong.c | |
parent | 547472b8e1da72ae226430c0c4273e36fc8ca768 (diff) |
tcp: remove Appropriate Byte Count support
TCP Appropriate Byte Count was added by me, but later disabled.
There is no point in maintaining it since it is a potential source
of bugs and Linux already implements other better window protection
heuristics.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_cong.c')
-rw-r--r-- | net/ipv4/tcp_cong.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c index cdf2e707bb10..019c2389a341 100644 --- a/net/ipv4/tcp_cong.c +++ b/net/ipv4/tcp_cong.c | |||
@@ -317,28 +317,11 @@ void tcp_slow_start(struct tcp_sock *tp) | |||
317 | snd_cwnd = 1U; | 317 | snd_cwnd = 1U; |
318 | } | 318 | } |
319 | 319 | ||
320 | /* RFC3465: ABC Slow start | ||
321 | * Increase only after a full MSS of bytes is acked | ||
322 | * | ||
323 | * TCP sender SHOULD increase cwnd by the number of | ||
324 | * previously unacknowledged bytes ACKed by each incoming | ||
325 | * acknowledgment, provided the increase is not more than L | ||
326 | */ | ||
327 | if (sysctl_tcp_abc && tp->bytes_acked < tp->mss_cache) | ||
328 | return; | ||
329 | |||
330 | if (sysctl_tcp_max_ssthresh > 0 && tp->snd_cwnd > sysctl_tcp_max_ssthresh) | 320 | if (sysctl_tcp_max_ssthresh > 0 && tp->snd_cwnd > sysctl_tcp_max_ssthresh) |
331 | cnt = sysctl_tcp_max_ssthresh >> 1; /* limited slow start */ | 321 | cnt = sysctl_tcp_max_ssthresh >> 1; /* limited slow start */ |
332 | else | 322 | else |
333 | cnt = snd_cwnd; /* exponential increase */ | 323 | cnt = snd_cwnd; /* exponential increase */ |
334 | 324 | ||
335 | /* RFC3465: ABC | ||
336 | * We MAY increase by 2 if discovered delayed ack | ||
337 | */ | ||
338 | if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) | ||
339 | cnt <<= 1; | ||
340 | tp->bytes_acked = 0; | ||
341 | |||
342 | tp->snd_cwnd_cnt += cnt; | 325 | tp->snd_cwnd_cnt += cnt; |
343 | while (tp->snd_cwnd_cnt >= snd_cwnd) { | 326 | while (tp->snd_cwnd_cnt >= snd_cwnd) { |
344 | tp->snd_cwnd_cnt -= snd_cwnd; | 327 | tp->snd_cwnd_cnt -= snd_cwnd; |
@@ -378,20 +361,9 @@ void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 in_flight) | |||
378 | /* In "safe" area, increase. */ | 361 | /* In "safe" area, increase. */ |
379 | if (tp->snd_cwnd <= tp->snd_ssthresh) | 362 | if (tp->snd_cwnd <= tp->snd_ssthresh) |
380 | tcp_slow_start(tp); | 363 | tcp_slow_start(tp); |
381 | |||
382 | /* In dangerous area, increase slowly. */ | 364 | /* In dangerous area, increase slowly. */ |
383 | else if (sysctl_tcp_abc) { | 365 | else |
384 | /* RFC3465: Appropriate Byte Count | ||
385 | * increase once for each full cwnd acked | ||
386 | */ | ||
387 | if (tp->bytes_acked >= tp->snd_cwnd*tp->mss_cache) { | ||
388 | tp->bytes_acked -= tp->snd_cwnd*tp->mss_cache; | ||
389 | if (tp->snd_cwnd < tp->snd_cwnd_clamp) | ||
390 | tp->snd_cwnd++; | ||
391 | } | ||
392 | } else { | ||
393 | tcp_cong_avoid_ai(tp, tp->snd_cwnd); | 366 | tcp_cong_avoid_ai(tp, tp->snd_cwnd); |
394 | } | ||
395 | } | 367 | } |
396 | EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid); | 368 | EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid); |
397 | 369 | ||