|
@@ -2165,7 +2165,7 @@ bool tcp_schedule_loss_probe(struct sock *sk)
|
|
|
/* Don't do any loss probe on a Fast Open connection before 3WHS
|
|
/* Don't do any loss probe on a Fast Open connection before 3WHS
|
|
|
* finishes.
|
|
* finishes.
|
|
|
*/
|
|
*/
|
|
|
- if (sk->sk_state == TCP_SYN_RECV)
|
|
|
|
|
|
|
+ if (tp->fastopen_rsk)
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
/* TLP is only scheduled when next timer event is RTO. */
|
|
/* TLP is only scheduled when next timer event is RTO. */
|
|
@@ -2175,7 +2175,7 @@ bool tcp_schedule_loss_probe(struct sock *sk)
|
|
|
/* Schedule a loss probe in 2*RTT for SACK capable connections
|
|
/* Schedule a loss probe in 2*RTT for SACK capable connections
|
|
|
* in Open state, that are either limited by cwnd or application.
|
|
* in Open state, that are either limited by cwnd or application.
|
|
|
*/
|
|
*/
|
|
|
- if (sysctl_tcp_early_retrans < 3 || !tp->srtt_us || !tp->packets_out ||
|
|
|
|
|
|
|
+ if (sysctl_tcp_early_retrans < 3 || !tp->packets_out ||
|
|
|
!tcp_is_sack(tp) || inet_csk(sk)->icsk_ca_state != TCP_CA_Open)
|
|
!tcp_is_sack(tp) || inet_csk(sk)->icsk_ca_state != TCP_CA_Open)
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
@@ -2184,9 +2184,10 @@ bool tcp_schedule_loss_probe(struct sock *sk)
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
/* Probe timeout is at least 1.5*rtt + TCP_DELACK_MAX to account
|
|
/* Probe timeout is at least 1.5*rtt + TCP_DELACK_MAX to account
|
|
|
- * for delayed ack when there's one outstanding packet.
|
|
|
|
|
|
|
+ * for delayed ack when there's one outstanding packet. If no RTT
|
|
|
|
|
+ * sample is available then probe after TCP_TIMEOUT_INIT.
|
|
|
*/
|
|
*/
|
|
|
- timeout = rtt << 1;
|
|
|
|
|
|
|
+ timeout = rtt << 1 ? : TCP_TIMEOUT_INIT;
|
|
|
if (tp->packets_out == 1)
|
|
if (tp->packets_out == 1)
|
|
|
timeout = max_t(u32, timeout,
|
|
timeout = max_t(u32, timeout,
|
|
|
(rtt + (rtt >> 1) + TCP_DELACK_MAX));
|
|
(rtt + (rtt >> 1) + TCP_DELACK_MAX));
|