diff options
author | David S. Miller <davem@davemloft.net> | 2014-09-05 17:49:39 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-05 17:49:39 -0700 |
commit | 3aff50170a37d032c86d10c1815e875e8af0aa1a (patch) | |
tree | ebaba03f755dfbe9d942fbe610ce3aecd1b0fc33 /net/ipv4/tcp_timer.c | |
parent | 2ba38943ba190eb6a494262003e23187d1b40fb4 (diff) | |
parent | 7faee5c0d514162853a343d93e4a0b6bb8bfec21 (diff) |
Merge branch 'tcp'
Eric Dumazet says:
====================
tcp: deduplicate TCP_SKB_CB(skb)->when
TCP_SKB_CB(skb)->when has different meaning in output and input paths.
In output path, it contains a timestamp.
In input path, it contains an ISN, chosen by tcp_timewait_state_process()
Its usage in output path is obsolete after usec timestamping.
Lets simplify and clean this.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_timer.c')
-rw-r--r-- | net/ipv4/tcp_timer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c index df90cd1ce37..a339e7ba05a 100644 --- a/net/ipv4/tcp_timer.c +++ b/net/ipv4/tcp_timer.c @@ -135,10 +135,9 @@ static bool retransmits_timed_out(struct sock *sk, if (!inet_csk(sk)->icsk_retransmits) return false; - if (unlikely(!tcp_sk(sk)->retrans_stamp)) - start_ts = TCP_SKB_CB(tcp_write_queue_head(sk))->when; - else - start_ts = tcp_sk(sk)->retrans_stamp; + start_ts = tcp_sk(sk)->retrans_stamp; + if (unlikely(!start_ts)) + start_ts = tcp_skb_timestamp(tcp_write_queue_head(sk)); if (likely(timeout == 0)) { linear_backoff_thresh = ilog2(TCP_RTO_MAX/rto_base); |