aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_cong.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_cong.c')
-rw-r--r--net/ipv4/tcp_cong.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 5ca7723d0798..c1b34f1edb32 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -313,28 +313,28 @@ void tcp_reno_cong_avoid(struct sock *sk, u32 ack, u32 rtt, u32 in_flight,
313 return; 313 return;
314 314
315 /* In "safe" area, increase. */ 315 /* In "safe" area, increase. */
316 if (tp->snd_cwnd <= tp->snd_ssthresh) 316 if (tp->snd_cwnd <= tp->snd_ssthresh)
317 tcp_slow_start(tp); 317 tcp_slow_start(tp);
318 318
319 /* In dangerous area, increase slowly. */ 319 /* In dangerous area, increase slowly. */
320 else if (sysctl_tcp_abc) { 320 else if (sysctl_tcp_abc) {
321 /* RFC3465: Appropriate Byte Count 321 /* RFC3465: Appropriate Byte Count
322 * increase once for each full cwnd acked 322 * increase once for each full cwnd acked
323 */ 323 */
324 if (tp->bytes_acked >= tp->snd_cwnd*tp->mss_cache) { 324 if (tp->bytes_acked >= tp->snd_cwnd*tp->mss_cache) {
325 tp->bytes_acked -= tp->snd_cwnd*tp->mss_cache; 325 tp->bytes_acked -= tp->snd_cwnd*tp->mss_cache;
326 if (tp->snd_cwnd < tp->snd_cwnd_clamp) 326 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
327 tp->snd_cwnd++; 327 tp->snd_cwnd++;
328 } 328 }
329 } else { 329 } else {
330 /* In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd */ 330 /* In theory this is tp->snd_cwnd += 1 / tp->snd_cwnd */
331 if (tp->snd_cwnd_cnt >= tp->snd_cwnd) { 331 if (tp->snd_cwnd_cnt >= tp->snd_cwnd) {
332 if (tp->snd_cwnd < tp->snd_cwnd_clamp) 332 if (tp->snd_cwnd < tp->snd_cwnd_clamp)
333 tp->snd_cwnd++; 333 tp->snd_cwnd++;
334 tp->snd_cwnd_cnt = 0; 334 tp->snd_cwnd_cnt = 0;
335 } else 335 } else
336 tp->snd_cwnd_cnt++; 336 tp->snd_cwnd_cnt++;
337 } 337 }
338} 338}
339EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid); 339EXPORT_SYMBOL_GPL(tcp_reno_cong_avoid);
340 340