|
@@ -730,12 +730,12 @@ static void bbr_update_min_rtt(struct sock *sk, const struct rate_sample *rs)
|
|
bool filter_expired;
|
|
bool filter_expired;
|
|
|
|
|
|
/* Track min RTT seen in the min_rtt_win_sec filter window: */
|
|
/* Track min RTT seen in the min_rtt_win_sec filter window: */
|
|
- filter_expired = after(tcp_time_stamp,
|
|
|
|
|
|
+ filter_expired = after(tcp_jiffies32,
|
|
bbr->min_rtt_stamp + bbr_min_rtt_win_sec * HZ);
|
|
bbr->min_rtt_stamp + bbr_min_rtt_win_sec * HZ);
|
|
if (rs->rtt_us >= 0 &&
|
|
if (rs->rtt_us >= 0 &&
|
|
(rs->rtt_us <= bbr->min_rtt_us || filter_expired)) {
|
|
(rs->rtt_us <= bbr->min_rtt_us || filter_expired)) {
|
|
bbr->min_rtt_us = rs->rtt_us;
|
|
bbr->min_rtt_us = rs->rtt_us;
|
|
- bbr->min_rtt_stamp = tcp_time_stamp;
|
|
|
|
|
|
+ bbr->min_rtt_stamp = tcp_jiffies32;
|
|
}
|
|
}
|
|
|
|
|
|
if (bbr_probe_rtt_mode_ms > 0 && filter_expired &&
|
|
if (bbr_probe_rtt_mode_ms > 0 && filter_expired &&
|
|
@@ -754,7 +754,7 @@ static void bbr_update_min_rtt(struct sock *sk, const struct rate_sample *rs)
|
|
/* Maintain min packets in flight for max(200 ms, 1 round). */
|
|
/* Maintain min packets in flight for max(200 ms, 1 round). */
|
|
if (!bbr->probe_rtt_done_stamp &&
|
|
if (!bbr->probe_rtt_done_stamp &&
|
|
tcp_packets_in_flight(tp) <= bbr_cwnd_min_target) {
|
|
tcp_packets_in_flight(tp) <= bbr_cwnd_min_target) {
|
|
- bbr->probe_rtt_done_stamp = tcp_time_stamp +
|
|
|
|
|
|
+ bbr->probe_rtt_done_stamp = tcp_jiffies32 +
|
|
msecs_to_jiffies(bbr_probe_rtt_mode_ms);
|
|
msecs_to_jiffies(bbr_probe_rtt_mode_ms);
|
|
bbr->probe_rtt_round_done = 0;
|
|
bbr->probe_rtt_round_done = 0;
|
|
bbr->next_rtt_delivered = tp->delivered;
|
|
bbr->next_rtt_delivered = tp->delivered;
|
|
@@ -762,8 +762,8 @@ static void bbr_update_min_rtt(struct sock *sk, const struct rate_sample *rs)
|
|
if (bbr->round_start)
|
|
if (bbr->round_start)
|
|
bbr->probe_rtt_round_done = 1;
|
|
bbr->probe_rtt_round_done = 1;
|
|
if (bbr->probe_rtt_round_done &&
|
|
if (bbr->probe_rtt_round_done &&
|
|
- after(tcp_time_stamp, bbr->probe_rtt_done_stamp)) {
|
|
|
|
- bbr->min_rtt_stamp = tcp_time_stamp;
|
|
|
|
|
|
+ after(tcp_jiffies32, bbr->probe_rtt_done_stamp)) {
|
|
|
|
+ bbr->min_rtt_stamp = tcp_jiffies32;
|
|
bbr->restore_cwnd = 1; /* snap to prior_cwnd */
|
|
bbr->restore_cwnd = 1; /* snap to prior_cwnd */
|
|
bbr_reset_mode(sk);
|
|
bbr_reset_mode(sk);
|
|
}
|
|
}
|
|
@@ -810,7 +810,7 @@ static void bbr_init(struct sock *sk)
|
|
bbr->probe_rtt_done_stamp = 0;
|
|
bbr->probe_rtt_done_stamp = 0;
|
|
bbr->probe_rtt_round_done = 0;
|
|
bbr->probe_rtt_round_done = 0;
|
|
bbr->min_rtt_us = tcp_min_rtt(tp);
|
|
bbr->min_rtt_us = tcp_min_rtt(tp);
|
|
- bbr->min_rtt_stamp = tcp_time_stamp;
|
|
|
|
|
|
+ bbr->min_rtt_stamp = tcp_jiffies32;
|
|
|
|
|
|
minmax_reset(&bbr->bw, bbr->rtt_cnt, 0); /* init max bw to 0 */
|
|
minmax_reset(&bbr->bw, bbr->rtt_cnt, 0); /* init max bw to 0 */
|
|
|
|
|