diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c5eadec001c1..bf38b1fb63ab 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -866,11 +866,7 @@ static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, | |||
866 | if (clone_it) { | 866 | if (clone_it) { |
867 | const struct sk_buff *fclone = skb + 1; | 867 | const struct sk_buff *fclone = skb + 1; |
868 | 868 | ||
869 | /* If congestion control is doing timestamping, we must | 869 | skb_mstamp_get(&skb->skb_mstamp); |
870 | * take such a timestamp before we potentially clone/copy. | ||
871 | */ | ||
872 | if (icsk->icsk_ca_ops->flags & TCP_CONG_RTT_STAMP) | ||
873 | __net_timestamp(skb); | ||
874 | 870 | ||
875 | if (unlikely(skb->fclone == SKB_FCLONE_ORIG && | 871 | if (unlikely(skb->fclone == SKB_FCLONE_ORIG && |
876 | fclone->fclone == SKB_FCLONE_CLONE)) | 872 | fclone->fclone == SKB_FCLONE_CLONE)) |
@@ -1974,7 +1970,7 @@ bool tcp_schedule_loss_probe(struct sock *sk) | |||
1974 | struct inet_connection_sock *icsk = inet_csk(sk); | 1970 | struct inet_connection_sock *icsk = inet_csk(sk); |
1975 | struct tcp_sock *tp = tcp_sk(sk); | 1971 | struct tcp_sock *tp = tcp_sk(sk); |
1976 | u32 timeout, tlp_time_stamp, rto_time_stamp; | 1972 | u32 timeout, tlp_time_stamp, rto_time_stamp; |
1977 | u32 rtt = tp->srtt >> 3; | 1973 | u32 rtt = usecs_to_jiffies(tp->srtt_us >> 3); |
1978 | 1974 | ||
1979 | if (WARN_ON(icsk->icsk_pending == ICSK_TIME_EARLY_RETRANS)) | 1975 | if (WARN_ON(icsk->icsk_pending == ICSK_TIME_EARLY_RETRANS)) |
1980 | return false; | 1976 | return false; |
@@ -1996,7 +1992,7 @@ bool tcp_schedule_loss_probe(struct sock *sk) | |||
1996 | /* Schedule a loss probe in 2*RTT for SACK capable connections | 1992 | /* Schedule a loss probe in 2*RTT for SACK capable connections |
1997 | * in Open state, that are either limited by cwnd or application. | 1993 | * in Open state, that are either limited by cwnd or application. |
1998 | */ | 1994 | */ |
1999 | if (sysctl_tcp_early_retrans < 3 || !tp->srtt || !tp->packets_out || | 1995 | if (sysctl_tcp_early_retrans < 3 || !tp->srtt_us || !tp->packets_out || |
2000 | !tcp_is_sack(tp) || inet_csk(sk)->icsk_ca_state != TCP_CA_Open) | 1996 | !tcp_is_sack(tp) || inet_csk(sk)->icsk_ca_state != TCP_CA_Open) |
2001 | return false; | 1997 | return false; |
2002 | 1998 | ||
@@ -3050,8 +3046,9 @@ void tcp_send_delayed_ack(struct sock *sk) | |||
3050 | * Do not use inet_csk(sk)->icsk_rto here, use results of rtt measurements | 3046 | * Do not use inet_csk(sk)->icsk_rto here, use results of rtt measurements |
3051 | * directly. | 3047 | * directly. |
3052 | */ | 3048 | */ |
3053 | if (tp->srtt) { | 3049 | if (tp->srtt_us) { |
3054 | int rtt = max(tp->srtt >> 3, TCP_DELACK_MIN); | 3050 | int rtt = max_t(int, usecs_to_jiffies(tp->srtt_us >> 3), |
3051 | TCP_DELACK_MIN); | ||
3055 | 3052 | ||
3056 | if (rtt < max_ato) | 3053 | if (rtt < max_ato) |
3057 | max_ato = rtt; | 3054 | max_ato = rtt; |