All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tcp: detect SYN/data drop when F-RTO is disabled
@ 2013-01-31 19:16 Yuchung Cheng
  2013-01-31 19:21 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Yuchung Cheng @ 2013-01-31 19:16 UTC (permalink / raw)
  To: davem, ncardwell, edumazet; +Cc: netdev, Yuchung Cheng

On receiving the SYN-ACK, Fast Open checks icsk_retransmit for SYN
retransmission to detect SYN/data drops. But if F-RTO is disabled,
icsk_retransmit is reset at step D of tcp_fastretrans_alert() (
under tcp_ack()) before tcp_rcv_fastopen_synack(). The fix is to use
total_retrans instead which accounts for SYN retransmission regardless
the use of F-RTO.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
---
 net/ipv4/tcp_input.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 492c7cf..de52403 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -5647,8 +5647,7 @@ static bool tcp_rcv_fastopen_synack(struct sock *sk, struct sk_buff *synack,
 	 * the remote receives only the retransmitted (regular) SYNs: either
 	 * the original SYN-data or the corresponding SYN-ACK is lost.
 	 */
-	syn_drop = (cookie->len <= 0 && data &&
-		    inet_csk(sk)->icsk_retransmits);
+	syn_drop = (cookie->len <= 0 && data && tp->total_retrans);
 
 	tcp_fastopen_cache_set(sk, mss, cookie, syn_drop);
 
-- 
1.8.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] tcp: detect SYN/data drop when F-RTO is disabled
  2013-01-31 19:16 [PATCH] tcp: detect SYN/data drop when F-RTO is disabled Yuchung Cheng
@ 2013-01-31 19:21 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-01-31 19:21 UTC (permalink / raw)
  To: ycheng; +Cc: ncardwell, edumazet, netdev

From: Yuchung Cheng <ycheng@google.com>
Date: Thu, 31 Jan 2013 11:16:46 -0800

> On receiving the SYN-ACK, Fast Open checks icsk_retransmit for SYN
> retransmission to detect SYN/data drops. But if F-RTO is disabled,
> icsk_retransmit is reset at step D of tcp_fastretrans_alert() (
> under tcp_ack()) before tcp_rcv_fastopen_synack(). The fix is to use
> total_retrans instead which accounts for SYN retransmission regardless
> the use of F-RTO.
> 
> Signed-off-by: Yuchung Cheng <ycheng@google.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-31 19:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-31 19:16 [PATCH] tcp: detect SYN/data drop when F-RTO is disabled Yuchung Cheng
2013-01-31 19:21 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.