diff options
author | Neal Cardwell <ncardwell@google.com> | 2012-02-13 15:22:08 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-29 19:34:17 -0500 |
commit | 623f1904ef55789082259573bb6248df5fea3d92 (patch) | |
tree | 61b3e8c873b5aef9c0af3621fe8778dbeba523cf /net/ipv4/tcp_input.c | |
parent | dd31c1ce7ef7b363215081fde02f13bf3e50b5a1 (diff) |
tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
[ Upstream commit 0af2a0d0576205dda778d25c6c344fc6508fc81d ]
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | 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 78689e56936..ee08f11ff21 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1385,6 +1385,10 @@ static int tcp_shifted_skb(struct sock *sk, struct sk_buff *skb, | |||
1385 | 1385 | ||
1386 | BUG_ON(!pcount); | 1386 | BUG_ON(!pcount); |
1387 | 1387 | ||
1388 | /* Adjust hint for FACK. Non-FACK is handled in tcp_sacktag_one(). */ | ||
1389 | if (tcp_is_fack(tp) && (skb == tp->lost_skb_hint)) | ||
1390 | tp->lost_cnt_hint += pcount; | ||
1391 | |||
1388 | TCP_SKB_CB(prev)->end_seq += shifted; | 1392 | TCP_SKB_CB(prev)->end_seq += shifted; |
1389 | TCP_SKB_CB(skb)->seq += shifted; | 1393 | TCP_SKB_CB(skb)->seq += shifted; |
1390 | 1394 | ||