[PATCH net-next 05/17] tcp: Don't clear hints when tcp_fragmenting

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ilpo Järvinen
Date: Saturday, February 28, 2009 - 7:44 am

From: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>

1) We didn't remove any skbs, so no need to handle stale refs.

2) scoreboard_skb_hint is trivial, no timestamps were changed
   so no need to clear that one

3) lost_skb_hint needs tweaking similar to that of
   tcp_sacktag_one().

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
---
 net/ipv4/tcp_output.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index fa3c81a..3feab4d 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -771,7 +771,6 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
 
 	BUG_ON(len > skb->len);
 
-	tcp_clear_retrans_hints_partial(tp);
 	nsize = skb_headlen(skb) - len;
 	if (nsize < 0)
 		nsize = 0;
@@ -854,6 +853,12 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len,
 			tcp_verify_left_out(tp);
 		}
 		tcp_adjust_fackets_out(sk, skb, diff);
+
+		if (tp->lost_skb_hint &&
+		    before(TCP_SKB_CB(skb)->seq,
+			   TCP_SKB_CB(tp->lost_skb_hint)->seq) &&
+		    (tcp_is_fack(tp) || TCP_SKB_CB(skb)->sacked))
+			tp->lost_cnt_hint -= diff;
 	}
 
 	/* Link BUFF into the send queue. */
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/17]: tcp &amp; more tcp, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-2.6 01/17] tcp: fix retrans_out leaks, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 02/17] tcp: don't backtrack to sacked skbs, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 03/17] tcp: fix lost_cnt_hint miscounts, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 05/17] tcp: Don't clear hints when tcp_fra ..., Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 11/17] htcp: merge icsk_ca_state compare, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 12/17] tcp: add helper for AI algorithm, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
[PATCH net-next 14/17] tcp: remove pointless .dsack code, Ilpo Järvinen, (Sat Feb 28, 7:44 am)
Re: [PATCH net-2.6 01/17] tcp: fix retrans_out leaks, David Miller, (Sun Mar 1, 1:22 am)