|
@@ -2896,7 +2896,10 @@ static void tcp_update_rtt_min(struct sock *sk, u32 rtt_us)
|
|
|
{
|
|
|
const u32 now = tcp_time_stamp, wlen = sysctl_tcp_min_rtt_wlen * HZ;
|
|
|
struct rtt_meas *m = tcp_sk(sk)->rtt_min;
|
|
|
- struct rtt_meas rttm = { .rtt = (rtt_us ? : 1), .ts = now };
|
|
|
+ struct rtt_meas rttm = {
|
|
|
+ .rtt = likely(rtt_us) ? rtt_us : jiffies_to_usecs(1),
|
|
|
+ .ts = now,
|
|
|
+ };
|
|
|
u32 elapsed;
|
|
|
|
|
|
/* Check if the new measurement updates the 1st, 2nd, or 3rd choices */
|