aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 540b7d92cc70..a4d214c7b506 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2391,7 +2391,7 @@ repair:
2391 2391
2392 /* Send one loss probe per tail loss episode. */ 2392 /* Send one loss probe per tail loss episode. */
2393 if (push_one != 2) 2393 if (push_one != 2)
2394 tcp_schedule_loss_probe(sk); 2394 tcp_schedule_loss_probe(sk, false);
2395 is_cwnd_limited |= (tcp_packets_in_flight(tp) >= tp->snd_cwnd); 2395 is_cwnd_limited |= (tcp_packets_in_flight(tp) >= tp->snd_cwnd);
2396 tcp_cwnd_validate(sk, is_cwnd_limited); 2396 tcp_cwnd_validate(sk, is_cwnd_limited);
2397 return false; 2397 return false;
@@ -2399,7 +2399,7 @@ repair:
2399 return !tp->packets_out && !tcp_write_queue_empty(sk); 2399 return !tp->packets_out && !tcp_write_queue_empty(sk);
2400} 2400}
2401 2401
2402bool tcp_schedule_loss_probe(struct sock *sk) 2402bool tcp_schedule_loss_probe(struct sock *sk, bool advancing_rto)
2403{ 2403{
2404 struct inet_connection_sock *icsk = inet_csk(sk); 2404 struct inet_connection_sock *icsk = inet_csk(sk);
2405 struct tcp_sock *tp = tcp_sk(sk); 2405 struct tcp_sock *tp = tcp_sk(sk);
@@ -2440,7 +2440,9 @@ bool tcp_schedule_loss_probe(struct sock *sk)
2440 } 2440 }
2441 2441
2442 /* If the RTO formula yields an earlier time, then use that time. */ 2442 /* If the RTO formula yields an earlier time, then use that time. */
2443 rto_delta_us = tcp_rto_delta_us(sk); /* How far in future is RTO? */ 2443 rto_delta_us = advancing_rto ?
2444 jiffies_to_usecs(inet_csk(sk)->icsk_rto) :
2445 tcp_rto_delta_us(sk); /* How far in future is RTO? */
2444 if (rto_delta_us > 0) 2446 if (rto_delta_us > 0)
2445 timeout = min_t(u32, timeout, usecs_to_jiffies(rto_delta_us)); 2447 timeout = min_t(u32, timeout, usecs_to_jiffies(rto_delta_us));
2446 2448