aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2013-04-29 04:44:51 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-29 15:14:03 -0400
commitcd75eff64dae8856afbf6ef0f0ca3c145465d8e0 (patch)
tree2fc9c3079b60e4534935a4daaf6410485a477dd5 /net
parent6a5dc9e598fe90160fee7de098fa319665f5253e (diff)
tcp: reset timer after any SYNACK retransmit
Linux immediately returns SYNACK on (spurious) SYN retransmits, but keeps the SYNACK timer running independently. Thus the timer may fire right after the SYNACK retransmit and causes a SYN-SYNACK cross-fire burst. Adopt the fast retransmit/recovery idea in established state by re-arming the SYNACK timer after the fast (SYNACK) retransmit. The timer may fire late up to 500ms due to the current SYNACK timer wheel, but it's OK to be conservative when network is congested. Eric's new listener design should address this issue. Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Acked-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_minisocks.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 05eaf8904613..0f0178827259 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -551,8 +551,13 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,
551 * 551 *
552 * Note that even if there is new data in the SYN packet 552 * Note that even if there is new data in the SYN packet
553 * they will be thrown away too. 553 * they will be thrown away too.
554 *
555 * Reset timer after retransmitting SYNACK, similar to
556 * the idea of fast retransmit in recovery.
554 */ 557 */
555 inet_rtx_syn_ack(sk, req); 558 if (!inet_rtx_syn_ack(sk, req))
559 req->expires = min(TCP_TIMEOUT_INIT << req->num_timeout,
560 TCP_RTO_MAX) + jiffies;
556 return NULL; 561 return NULL;
557 } 562 }
558 563