Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 72625
b: refs/heads/master
c: 94d3b1e
h: refs/heads/master
i:
  72623: 4442909
v: v3
  • Loading branch information
Ryousei Takano authored and David S. Miller committed Oct 26, 2007
1 parent d170632 commit b1ed754
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: 43cc7380eced27ee9cafdf89fa32333dc3884e8b
refs/heads/master: 94d3b1e586f6d4c7150501bde284c544ce99073c
12 changes: 5 additions & 7 deletions trunk/net/ipv4/tcp_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1248,6 +1248,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
int cached_fack_count;
int i;
int first_sack_index;
int force_one_sack;

if (!tp->sacked_out) {
if (WARN_ON(tp->fackets_out))
Expand All @@ -1272,18 +1273,18 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
* if the only SACK change is the increase of the end_seq of
* the first block then only apply that SACK block
* and use retrans queue hinting otherwise slowpath */
flag = 1;
force_one_sack = 1;
for (i = 0; i < num_sacks; i++) {
__be32 start_seq = sp[i].start_seq;
__be32 end_seq = sp[i].end_seq;

if (i == 0) {
if (tp->recv_sack_cache[i].start_seq != start_seq)
flag = 0;
force_one_sack = 0;
} else {
if ((tp->recv_sack_cache[i].start_seq != start_seq) ||
(tp->recv_sack_cache[i].end_seq != end_seq))
flag = 0;
force_one_sack = 0;
}
tp->recv_sack_cache[i].start_seq = start_seq;
tp->recv_sack_cache[i].end_seq = end_seq;
Expand All @@ -1295,7 +1296,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
}

first_sack_index = 0;
if (flag)
if (force_one_sack)
num_sacks = 1;
else {
int j;
Expand All @@ -1321,9 +1322,6 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_
}
}

/* clear flag as used for different purpose in following code */
flag = 0;

/* Use SACK fastpath hint if valid */
cached_skb = tp->fastpath_skb_hint;
cached_fack_count = tp->fastpath_cnt_hint;
Expand Down

0 comments on commit b1ed754

Please sign in to comment.