Thread (17 messages) 17 messages, 5 authors, 2010-01-27

Re: [PATCH] tcp: fix ICMP-RTO war

From: Damian Lukowski <hidden>
Date: 2010-01-25 15:07:45
Subsystem: networking [general], networking [tcp], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Neal Cardwell, Linus Torvalds

Denys Fedoryshchenko schrieb:
quoted
Cool, thanks for testing.

Dave, please send into stable too (besides net-2.6). If we want less strict
state check we can continue playing with that in net-next, IMHO.
Maybe better to wait. Sad news, got messages after while (before they was 
appearing  almost immediately on such load).

[ ... ]
Hi Denys,
could you test the following patch, please?

Damian

diff --git a/include/net/tcp.h b/include/net/tcp.h
index 34f5cc2..ec2fc91 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -530,7 +530,11 @@ static inline void tcp_bound_rto(const struct sock *sk)
 
 static inline u32 __tcp_set_rto(const struct tcp_sock *tp)
 {
-	return (tp->srtt >> 3) + tp->rttvar;
+	u32 rto = (tp->srtt >> 3) + tp->rttvar;
+	if (unlikely(rto < TCP_RTO_MIN))
+		return TCP_RTO_MIN;
+	else
+		return rto;
 }
 
 static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help