diff options
author | Eric Dumazet <edumazet@google.com> | 2019-01-17 14:23:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-18 01:19:05 -0500 |
commit | 3a9a57f637943404920a8945323dc733845e697c (patch) | |
tree | d53eb3d9c83181f90662054ae5029b96a465f81a /net/ipv4/tcp.c | |
parent | b9e2e689aab293c3da0ceac0921449a07b692f1f (diff) |
tcp: move snd_cwnd & snd_cwnd_cnt init to tcp_disconnect()
Passive connections can inherit proper value by cloning,
if we make sure all listeners have the proper values there.
tcp_disconnect() was setting snd_cwnd to 2, which seems
quite obsolete since IW10 adoption.
Also remove an obsolete comment.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 731b1c6e88a9..3f99ad92eaed 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2578,10 +2578,10 @@ int tcp_disconnect(struct sock *sk, int flags) | |||
2578 | if (tp->write_seq == 0) | 2578 | if (tp->write_seq == 0) |
2579 | tp->write_seq = 1; | 2579 | tp->write_seq = 1; |
2580 | icsk->icsk_backoff = 0; | 2580 | icsk->icsk_backoff = 0; |
2581 | tp->snd_cwnd = 2; | ||
2582 | icsk->icsk_probes_out = 0; | 2581 | icsk->icsk_probes_out = 0; |
2583 | icsk->icsk_rto = TCP_TIMEOUT_INIT; | 2582 | icsk->icsk_rto = TCP_TIMEOUT_INIT; |
2584 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; | 2583 | tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; |
2584 | tp->snd_cwnd = TCP_INIT_CWND; | ||
2585 | tp->snd_cwnd_cnt = 0; | 2585 | tp->snd_cwnd_cnt = 0; |
2586 | tp->window_clamp = 0; | 2586 | tp->window_clamp = 0; |
2587 | tp->delivered_ce = 0; | 2587 | tp->delivered_ce = 0; |