netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
@ 2012-02-14  6:22 Neal Cardwell
  2012-02-14 19:40 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Neal Cardwell @ 2012-02-14  6:22 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, ilpo.jarvinen, Nandita Dukkipati, Yuchung Cheng,
	Tom Herbert, Vijay Subramanian, Neal Cardwell

This commit ensures that lost_cnt_hint is correctly updated in
tcp_shifted_skb() for FACK TCP senders. The lost_cnt_hint adjustment
in tcp_sacktag_one() only applies to non-FACK senders, so FACK senders
need their own adjustment.

This applies the spirit of 1e5289e121372a3494402b1b131b41bfe1cf9b7f -
except now that the sequence range passed into tcp_sacktag_one() is
correct we need only have a special case adjustment for FACK.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
---
 net/ipv4/tcp_input.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 8116d06..53c8ce4 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -1403,6 +1403,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb,
 
 	BUG_ON(!pcount);
 
+	/* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */
+	if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint))
+		tp->lost_cnt_hint += pcount;
+
 	TCP_SKB_CB(prev)->end_seq += shifted;
 	TCP_SKB_CB(skb)->seq += shifted;
 
-- 
1.7.7.3

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

end of thread, other threads:[~2012-02-28  4:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-14  6:22 [PATCH] tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK Neal Cardwell
2012-02-14 19:40 ` David Miller
2012-02-14 19:41   ` David Miller
2012-02-27 23:39   ` Ilpo Järvinen
2012-02-27 23:43     ` Ilpo Järvinen
2012-02-28  2:40       ` Neal Cardwell
2012-02-28  2:58         ` David Miller
2012-02-28  3:45           ` Neal Cardwell
2012-02-28  4:31             ` David Miller
2012-02-28  4:42               ` Neal Cardwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).