Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86902
b: refs/heads/master
c: d152a7d
h: refs/heads/master
v: v3
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Mar 3, 2008
1 parent d68a62b commit 733b6b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 401023710d73aaef1191ab4d6a79d39c51add828
refs/heads/master: d152a7d88ab4134a895f91a9e00f70d118696039
14 changes: 9 additions & 5 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,14 +1367,16 @@ static struct sk_buff *tcp_sacktag_walk(struct sk_buff *skb, struct sock *sk,
* a normal way
*/
static struct sk_buff *tcp_sacktag_skip(struct sk_buff *skb, struct sock *sk,
u32 skip_to_seq)
u32 skip_to_seq, int *fack_count)
{
tcp_for_write_queue_from(skb, sk) {
if (skb == tcp_send_head(sk))
break;

if (!before(TCP_SKB_CB(skb)->end_seq, skip_to_seq))
break;

*fack_count += tcp_skb_pcount(skb);
}
return skb;
}
Expand All @@ -1390,7 +1392,7 @@ static struct sk_buff *tcp_maybe_skipping_dsack(struct sk_buff *skb,
return skb;

if (before(next_dup->start_seq, skip_to_seq)) {
skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq);
skb = tcp_sacktag_skip(skb, sk, next_dup->start_seq, fack_count);
tcp_sacktag_walk(skb, sk, NULL,
next_dup->start_seq, next_dup->end_seq,
1, fack_count, reord, flag);
Expand Down Expand Up @@ -1537,7 +1539,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,

/* Head todo? */
if (before(start_seq, cache->start_seq)) {
skb = tcp_sacktag_skip(skb, sk, start_seq);
skb = tcp_sacktag_skip(skb, sk, start_seq,
&fack_count);
skb = tcp_sacktag_walk(skb, sk, next_dup,
start_seq,
cache->start_seq,
Expand Down Expand Up @@ -1565,7 +1568,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
goto walk;
}

skb = tcp_sacktag_skip(skb, sk, cache->end_seq);
skb = tcp_sacktag_skip(skb, sk, cache->end_seq,
&fack_count);
/* Check overlap against next cached too (past this one already) */
cache++;
continue;
Expand All @@ -1577,7 +1581,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb,
break;
fack_count = tp->fackets_out;
}
skb = tcp_sacktag_skip(skb, sk, start_seq);
skb = tcp_sacktag_skip(skb, sk, start_seq, &fack_count);

walk:
skb = tcp_sacktag_walk(skb, sk, next_dup, start_seq, end_seq,
Expand Down

0 comments on commit 733b6b5

Please sign in to comment.