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.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 6327e4d368a4..9a1a1494b9dd 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -76,10 +76,8 @@ static void tcp_event_new_data_sent(struct sock *sk, const struct sk_buff *skb)
76 tp->snd_nxt = TCP_SKB_CB(skb)->end_seq; 76 tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
77 77
78 tp->packets_out += tcp_skb_pcount(skb); 78 tp->packets_out += tcp_skb_pcount(skb);
79 if (!prior_packets || icsk->icsk_pending == ICSK_TIME_EARLY_RETRANS || 79 if (!prior_packets || icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)
80 icsk->icsk_pending == ICSK_TIME_LOSS_PROBE) {
81 tcp_rearm_rto(sk); 80 tcp_rearm_rto(sk);
82 }
83 81
84 NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPORIGDATASENT, 82 NET_ADD_STATS(sock_net(sk), LINUX_MIB_TCPORIGDATASENT,
85 tcp_skb_pcount(skb)); 83 tcp_skb_pcount(skb));
@@ -2289,8 +2287,6 @@ bool tcp_schedule_loss_probe(struct sock *sk)
2289 u32 timeout, tlp_time_stamp, rto_time_stamp; 2287 u32 timeout, tlp_time_stamp, rto_time_stamp;
2290 u32 rtt = usecs_to_jiffies(tp->srtt_us >> 3); 2288 u32 rtt = usecs_to_jiffies(tp->srtt_us >> 3);
2291 2289
2292 if (WARN_ON(icsk->icsk_pending == ICSK_TIME_EARLY_RETRANS))
2293 return false;
2294 /* No consecutive loss probes. */ 2290 /* No consecutive loss probes. */
2295 if (WARN_ON(icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)) { 2291 if (WARN_ON(icsk->icsk_pending == ICSK_TIME_LOSS_PROBE)) {
2296 tcp_rearm_rto(sk); 2292 tcp_rearm_rto(sk);
@@ -2309,8 +2305,9 @@ bool tcp_schedule_loss_probe(struct sock *sk)
2309 /* Schedule a loss probe in 2*RTT for SACK capable connections 2305 /* Schedule a loss probe in 2*RTT for SACK capable connections
2310 * in Open state, that are either limited by cwnd or application. 2306 * in Open state, that are either limited by cwnd or application.
2311 */ 2307 */
2312 if (sysctl_tcp_early_retrans < 3 || !tp->packets_out || 2308 if ((sysctl_tcp_early_retrans != 3 && sysctl_tcp_early_retrans != 4) ||
2313 !tcp_is_sack(tp) || inet_csk(sk)->icsk_ca_state != TCP_CA_Open) 2309 !tp->packets_out || !tcp_is_sack(tp) ||
2310 icsk->icsk_ca_state != TCP_CA_Open)
2314 return false; 2311 return false;
2315 2312
2316 if ((tp->snd_cwnd > tcp_packets_in_flight(tp)) && 2313 if ((tp->snd_cwnd > tcp_packets_in_flight(tp)) &&