diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-11-15 22:43:56 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:54:05 -0500 |
commit | b7d4815f35ab1d0f1eef2521a94a7d4c789290a2 (patch) | |
tree | 1d8175fd4cb2c29d643c0f76d446fef04521c849 /net/ipv4/tcp_input.c | |
parent | 9f58f3b721f52a4d3f497ea57f830ccd307f1d76 (diff) |
[TCP]: Prior_fackets can be replaced by highest_sack seq
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
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 | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7a2bfd85fff0..5e01ac2c003c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1251,7 +1251,6 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1251 | struct sk_buff *cached_skb; | 1251 | struct sk_buff *cached_skb; |
1252 | int num_sacks = (ptr[1] - TCPOLEN_SACK_BASE)>>3; | 1252 | int num_sacks = (ptr[1] - TCPOLEN_SACK_BASE)>>3; |
1253 | int reord = tp->packets_out; | 1253 | int reord = tp->packets_out; |
1254 | int prior_fackets; | ||
1255 | int flag = 0; | 1254 | int flag = 0; |
1256 | int found_dup_sack = 0; | 1255 | int found_dup_sack = 0; |
1257 | int cached_fack_count; | 1256 | int cached_fack_count; |
@@ -1264,7 +1263,6 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1264 | tp->fackets_out = 0; | 1263 | tp->fackets_out = 0; |
1265 | tp->highest_sack = tcp_write_queue_head(sk); | 1264 | tp->highest_sack = tcp_write_queue_head(sk); |
1266 | } | 1265 | } |
1267 | prior_fackets = tp->fackets_out; | ||
1268 | 1266 | ||
1269 | found_dup_sack = tcp_check_dsack(tp, ack_skb, sp, | 1267 | found_dup_sack = tcp_check_dsack(tp, ack_skb, sp, |
1270 | num_sacks, prior_snd_una); | 1268 | num_sacks, prior_snd_una); |
@@ -1457,7 +1455,8 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1457 | /* New sack for not retransmitted frame, | 1455 | /* New sack for not retransmitted frame, |
1458 | * which was in hole. It is reordering. | 1456 | * which was in hole. It is reordering. |
1459 | */ | 1457 | */ |
1460 | if (fack_count < prior_fackets) | 1458 | if (before(TCP_SKB_CB(skb)->seq, |
1459 | tcp_highest_sack_seq(tp))) | ||
1461 | reord = min(fack_count, reord); | 1460 | reord = min(fack_count, reord); |
1462 | 1461 | ||
1463 | /* SACK enhanced F-RTO (RFC4138; Appendix B) */ | 1462 | /* SACK enhanced F-RTO (RFC4138; Appendix B) */ |