Skip to contentSkip to conversation

tcp: Fix tcp_prequeue() to get correct rto_min value

PATCH In review Satoru SATOH 3 participants 3 messages May 2, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 tcp: Fix tcp_prequeue() to get correct rto_min value

This patch depends on the previous patch, makes tcp_prequeue() uses the correct tcp rto_min value returns from tcp_rto_min().

---
 include/net/tcp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/net/tcp.h +1 -1
index 284cc68..a54d139 100644
@@ -920,7 +920,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
 			wake_up_interruptible(sk->sk_sleep);
 			if (!inet_csk_ack_scheduled(sk))
 				inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
-						          (3 * TCP_RTO_MIN) / 4,
+						          (3 * tcp_rto_min(sk)) / 4,
 							  TCP_RTO_MAX);
 		}
 		return 1;
Signature · 1 line
1.6.2.2
#1 lore raw
Quoted 15 lines · Satoru SATOH

This patch depends on the previous patch, makes tcp_prequeue() uses the correct tcp rto_min value returns from tcp_rto_min().

---
 include/net/tcp.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/net/tcp.h +0 -0
index 284cc68..a54d139 100644

include/net/tcp.h static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb) · line 926

Quoted 8 lines
include/net/tcp.h +1 -1
@@ -920,7 +920,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
 			wake_up_interruptible(sk->sk_sleep);
 			if (!inet_csk_ack_scheduled(sk))
 				inet_csk_reset_xmit_timer(sk, ICSK_TIME_DACK,
-						          (3 * TCP_RTO_MIN) / 4,
+						          (3 * tcp_rto_min(sk)) / 4,
 							  TCP_RTO_MAX);
 		}
 		return 1;

I'm not fully sure we really want this... I wonder did you run into some real problem with the TCP_RTO_MIN based version as it's not setting RTO timer but delayed ACK timer...? The change could have nasty effects to interactivity of a flow if somebody is hit by nagle delay and the peer has tuned their minimum RTO. Not that I in anyway believe it should be that useful to set that minimum RTO because of frto that is nowadays enabled.

In any case, I see very little point in putting them into a separate patches due to non-complex nature of the actual change (with complex changes it might help though).

Signature · 1 line
 i.