diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 1c2a73406261..3b2c8e90a475 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2896,7 +2896,10 @@ static void tcp_update_rtt_min(struct sock *sk, u32 rtt_us) | |||
2896 | { | 2896 | { |
2897 | const u32 now = tcp_time_stamp, wlen = sysctl_tcp_min_rtt_wlen * HZ; | 2897 | const u32 now = tcp_time_stamp, wlen = sysctl_tcp_min_rtt_wlen * HZ; |
2898 | struct rtt_meas *m = tcp_sk(sk)->rtt_min; | 2898 | struct rtt_meas *m = tcp_sk(sk)->rtt_min; |
2899 | struct rtt_meas rttm = { .rtt = (rtt_us ? : 1), .ts = now }; | 2899 | struct rtt_meas rttm = { |
2900 | .rtt = likely(rtt_us) ? rtt_us : jiffies_to_usecs(1), | ||
2901 | .ts = now, | ||
2902 | }; | ||
2900 | u32 elapsed; | 2903 | u32 elapsed; |
2901 | 2904 | ||
2902 | /* Check if the new measurement updates the 1st, 2nd, or 3rd choices */ | 2905 | /* Check if the new measurement updates the 1st, 2nd, or 3rd choices */ |