Commit 5c701549 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: move retrans_out, sacked_out, tlp_high_seq, last_oow_ack_time init to tcp_disconnect()

If we make sure all listeners have these fields cleared, then a clone
will also inherit zero values.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5d836764
...@@ -2605,6 +2605,10 @@ int tcp_disconnect(struct sock *sk, int flags) ...@@ -2605,6 +2605,10 @@ int tcp_disconnect(struct sock *sk, int flags)
tp->duplicate_sack[0].end_seq = 0; tp->duplicate_sack[0].end_seq = 0;
tp->dsack_dups = 0; tp->dsack_dups = 0;
tp->reord_seen = 0; tp->reord_seen = 0;
tp->retrans_out = 0;
tp->sacked_out = 0;
tp->tlp_high_seq = 0;
tp->last_oow_ack_time = 0;
/* Clean up fastopen related fields */ /* Clean up fastopen related fields */
tcp_free_fastopen_req(tp); tcp_free_fastopen_req(tp);
......
...@@ -482,12 +482,8 @@ struct sock *tcp_create_openreq_child(const struct sock *sk, ...@@ -482,12 +482,8 @@ struct sock *tcp_create_openreq_child(const struct sock *sk,
minmax_reset(&newtp->rtt_min, tcp_jiffies32, ~0U); minmax_reset(&newtp->rtt_min, tcp_jiffies32, ~0U);
newicsk->icsk_ack.lrcvtime = tcp_jiffies32; newicsk->icsk_ack.lrcvtime = tcp_jiffies32;
newtp->retrans_out = 0;
newtp->sacked_out = 0;
newtp->tlp_high_seq = 0;
newtp->lsndtime = tcp_jiffies32; newtp->lsndtime = tcp_jiffies32;
newsk->sk_txhash = treq->txhash; newsk->sk_txhash = treq->txhash;
newtp->last_oow_ack_time = 0;
newtp->total_retrans = req->num_retrans; newtp->total_retrans = req->num_retrans;
/* 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. */
......
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