aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorYuchung Cheng <[email protected]>2015-08-12 18:18:18 +0000
committerDavid S. Miller <[email protected]>2015-08-13 23:52:19 +0000
commitfcd16c0a95a8faf4d310f94d831b22f901c5a744 (patch)
tree1ff1be5fd078e8e663d7f2aba1f67246a6758f34 /net/ipv4/tcp_output.c
parentMerge branch 'cpsw-errata-workaround' (diff)
downloadkernel-fcd16c0a95a8faf4d310f94d831b22f901c5a744.tar.gz
kernel-fcd16c0a95a8faf4d310f94d831b22f901c5a744.zip
tcp: don't extend RTO on failed loss probe attempts
If TLP was unable to send a probe, it extended the RTO to now + icsk_rto. But extending the RTO makes little sense if no TLP probe went out. With this commit, instead of extending the RTO we re-arm it relative to the transmit time of the write queue head. Signed-off-by: Yuchung Cheng <[email protected]> Signed-off-by: Neal Cardwell <[email protected]> Signed-off-by: Nandita Dukkipati <[email protected]> Acked-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 7d1efa762b75..78fc89c1c43c 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2275,13 +2275,12 @@ void tcp_send_loss_probe(struct sock *sk)
tp->tlp_high_seq = tp->snd_nxt;
rearm_timer:
- inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
- inet_csk(sk)->icsk_rto,
- TCP_RTO_MAX);
-
- if (likely(!err))
- NET_INC_STATS_BH(sock_net(sk),
- LINUX_MIB_TCPLOSSPROBES);
+ if (likely(!err)) {
+ NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPLOSSPROBES);
+ /* Reset s.t. tcp_rearm_rto will restart timer from now */
+ inet_csk(sk)->icsk_pending = 0;
+ }
+ tcp_rearm_rto(sk);
}
/* Push out any pending frames which were held back due to