diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-11-29 08:59:07 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:55:10 -0500 |
commit | ea4f76ae13b4240dac304ed50636391d6b22e9c5 (patch) | |
tree | 7b26858bfa3cfd4cccd7d667b55fefbf7208698a /net/ipv4/tcp_input.c | |
parent | df1b86c53dc56b1a3125b6792356066ac3af4254 (diff) |
[TCP]: Two fixes to new sacktag code
1) Skip condition used to be wrong way around which made SACK
processing very broken, missed many blocks because of that.
2) Use highest_sack advancement only if some skbs are already
sacked because otherwise tcp_write_queue_next may move things
too far (occurs mainly with GSO). The other similar advancement
is not problem because highest_sack was previosly put to point
a sacked skb.
These problems were located because of problem report from Matt
Mathis <mathis@psc.edu>.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
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, 2 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 97ea3eda206d..33d284e3f7f5 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1384,7 +1384,7 @@ static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk, | |||
1384 | if (skb == tcp_send_head(sk)) | 1384 | if (skb == tcp_send_head(sk)) |
1385 | break; | 1385 | break; |
1386 | 1386 | ||
1387 | if (before(TCP_SKB_CB(skb)->end_seq, skip_to_seq)) | 1387 | if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq)) |
1388 | break; | 1388 | break; |
1389 | } | 1389 | } |
1390 | return skb; | 1390 | return skb; |
@@ -1575,7 +1575,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1575 | continue; | 1575 | continue; |
1576 | } | 1576 | } |
1577 | 1577 | ||
1578 | if (!before(start_seq, tcp_highest_sack_seq(tp))) { | 1578 | if (tp->sacked_out && !before(start_seq, tcp_highest_sack_seq(tp))) { |
1579 | skb = tcp_write_queue_next(sk, tp->highest_sack); | 1579 | skb = tcp_write_queue_next(sk, tp->highest_sack); |
1580 | fack_count = tp->fackets_out; | 1580 | fack_count = tp->fackets_out; |
1581 | } | 1581 | } |