aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_metrics.c
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2019-04-29 18:46:20 -0400
committerDavid S. Miller <davem@davemloft.net>2019-05-01 11:47:54 -0400
commit98fa6271cfcb1de873b3fe0caf48d9daa1bcc0ac (patch)
tree0d8c0ce941e0e6441fb61631d1680b29b0c9eaf7 /net/ipv4/tcp_metrics.c
parent6b94b1c88b660a786fdb1c22d8a0d3529fe40f8c (diff)
tcp: refactor setting the initial congestion window
Relocate the congestion window initialization from tcp_init_metrics() to tcp_init_transfer() to improve code readability. Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_metrics.c')
-rw-r--r--net/ipv4/tcp_metrics.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/net/ipv4/tcp_metrics.c b/net/ipv4/tcp_metrics.c
index d4d687330e2b..c4848e7a0aad 100644
--- a/net/ipv4/tcp_metrics.c
+++ b/net/ipv4/tcp_metrics.c
@@ -512,16 +512,6 @@ reset:
512 512
513 inet_csk(sk)->icsk_rto = TCP_TIMEOUT_FALLBACK; 513 inet_csk(sk)->icsk_rto = TCP_TIMEOUT_FALLBACK;
514 } 514 }
515 /* Cut cwnd down to 1 per RFC5681 if SYN or SYN-ACK has been
516 * retransmitted. In light of RFC6298 more aggressive 1sec
517 * initRTO, we only reset cwnd when more than 1 SYN/SYN-ACK
518 * retransmission has occurred.
519 */
520 if (tp->total_retrans > 1 && tp->undo_marker)
521 tp->snd_cwnd = 1;
522 else
523 tp->snd_cwnd = tcp_init_cwnd(tp, dst);
524 tp->snd_cwnd_stamp = tcp_jiffies32;
525} 515}
526 516
527bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst) 517bool tcp_peer_is_proven(struct request_sock *req, struct dst_entry *dst)