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 5ee6fe0d152d..e6e65f79ade8 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2907,7 +2907,10 @@ static void tcp_update_rtt_min(struct sock *sk, u32 rtt_us) | |||
2907 | { | 2907 | { |
2908 | const u32 now = tcp_time_stamp, wlen = sysctl_tcp_min_rtt_wlen * HZ; | 2908 | const u32 now = tcp_time_stamp, wlen = sysctl_tcp_min_rtt_wlen * HZ; |
2909 | struct rtt_meas *m = tcp_sk(sk)->rtt_min; | 2909 | struct rtt_meas *m = tcp_sk(sk)->rtt_min; |
2910 | struct rtt_meas rttm = { .rtt = (rtt_us ? : 1), .ts = now }; | 2910 | struct rtt_meas rttm = { |
2911 | .rtt = likely(rtt_us) ? rtt_us : jiffies_to_usecs(1), | ||
2912 | .ts = now, | ||
2913 | }; | ||
2911 | u32 elapsed; | 2914 | u32 elapsed; |
2912 | 2915 | ||
2913 | /* Check if the new measurement updates the 1st, 2nd, or 3rd choices */ | 2916 | /* Check if the new measurement updates the 1st, 2nd, or 3rd choices */ |