|
@@ -2435,6 +2435,7 @@ bool tcp_schedule_loss_probe(struct sock *sk)
|
|
struct inet_connection_sock *icsk = inet_csk(sk);
|
|
struct inet_connection_sock *icsk = inet_csk(sk);
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
struct tcp_sock *tp = tcp_sk(sk);
|
|
u32 timeout, rto_delta_us;
|
|
u32 timeout, rto_delta_us;
|
|
|
|
+ int early_retrans;
|
|
|
|
|
|
/* 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.
|
|
@@ -2442,10 +2443,11 @@ bool tcp_schedule_loss_probe(struct sock *sk)
|
|
if (tp->fastopen_rsk)
|
|
if (tp->fastopen_rsk)
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
+ early_retrans = sock_net(sk)->ipv4.sysctl_tcp_early_retrans;
|
|
/* 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 && sysctl_tcp_early_retrans != 4) ||
|
|
|
|
|
|
+ if ((early_retrans != 3 && early_retrans != 4) ||
|
|
!tp->packets_out || !tcp_is_sack(tp) ||
|
|
!tp->packets_out || !tcp_is_sack(tp) ||
|
|
icsk->icsk_ca_state != TCP_CA_Open)
|
|
icsk->icsk_ca_state != TCP_CA_Open)
|
|
return false;
|
|
return false;
|