diff options
author | Neal Cardwell <ncardwell@google.com> | 2012-02-13 20:22:08 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-14 14:38:57 -0500 |
commit | 0af2a0d0576205dda778d25c6c344fc6508fc81d (patch) | |
tree | 3f3b3d70ed8d614c2b64ddeaaac27f526e844497 /net/ipv4/tcp_input.c | |
parent | fbcf88b8833ce2c404b9a0e7caab82b20312cbbc (diff) | |
download | lwn-0af2a0d0576205dda778d25c6c344fc6508fc81d.tar.gz lwn-0af2a0d0576205dda778d25c6c344fc6508fc81d.zip |
tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
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>
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 8116d06e042c..53c8ce4046b2 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; |