Commit 3a9a57f6 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9e2e689
...@@ -2578,10 +2578,10 @@ int tcp_disconnect(struct sock *sk, int flags) ...@@ -2578,10 +2578,10 @@ int tcp_disconnect(struct sock *sk, int flags)
if (tp->write_seq == 0) if (tp->write_seq == 0)
tp->write_seq = 1; tp->write_seq = 1;
icsk->icsk_backoff = 0; icsk->icsk_backoff = 0;
tp->snd_cwnd = 2;
icsk->icsk_probes_out = 0; icsk->icsk_probes_out = 0;
icsk->icsk_rto = TCP_TIMEOUT_INIT; icsk->icsk_rto = TCP_TIMEOUT_INIT;
tp->snd_ssthresh = TCP_INFINITE_SSTHRESH; tp->snd_ssthresh = TCP_INFINITE_SSTHRESH;
tp->snd_cwnd = TCP_INIT_CWND;
tp->snd_cwnd_cnt = 0; tp->snd_cwnd_cnt = 0;
tp->window_clamp = 0; tp->window_clamp = 0;
tp->delivered_ce = 0; tp->delivered_ce = 0;
......
...@@ -490,14 +490,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -490,14 +490,6 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
newtp->last_oow_ack_time = 0; newtp->last_oow_ack_time = 0;
newtp->total_retrans = req->num_retrans; newtp->total_retrans = req->num_retrans;
/* So many TCP implementations out there (incorrectly) count the
* initial SYN frame in their delayed-ACK and congestion control
* algorithms that we must have the following bandaid to talk
* efficiently to them. -DaveM
*/
newtp->snd_cwnd = TCP_INIT_CWND;
newtp->snd_cwnd_cnt = 0;
/* There's a bubble in the pipe until at least the first ACK. */ /* There's a bubble in the pipe until at least the first ACK. */
newtp->app_limited = ~0U; newtp->app_limited = ~0U;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment