diff options
-rw-r--r-- | include/linux/tcp.h | 2 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h index c6b9f92e82..c072f88afb 100644 --- a/include/linux/tcp.h +++ b/include/linux/tcp.h | |||
@@ -333,6 +333,8 @@ struct tcp_sock { | |||
333 | 333 | ||
334 | struct tcp_sack_block_wire recv_sack_cache[4]; | 334 | struct tcp_sack_block_wire recv_sack_cache[4]; |
335 | 335 | ||
336 | u32 highest_sack; /* Start seq of globally highest revd SACK (valid only in slowpath) */ | ||
337 | |||
336 | /* from STCP, retrans queue hinting */ | 338 | /* from STCP, retrans queue hinting */ |
337 | struct sk_buff* lost_skb_hint; | 339 | struct sk_buff* lost_skb_hint; |
338 | 340 | ||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index f893e90061..813f2049b8 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -979,8 +979,10 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
979 | int i; | 979 | int i; |
980 | int first_sack_index; | 980 | int first_sack_index; |
981 | 981 | ||
982 | if (!tp->sacked_out) | 982 | if (!tp->sacked_out) { |
983 | tp->fackets_out = 0; | 983 | tp->fackets_out = 0; |
984 | tp->highest_sack = tp->snd_una; | ||
985 | } | ||
984 | prior_fackets = tp->fackets_out; | 986 | prior_fackets = tp->fackets_out; |
985 | 987 | ||
986 | /* Check for D-SACK. */ | 988 | /* Check for D-SACK. */ |
@@ -1217,6 +1219,10 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
1217 | 1219 | ||
1218 | if (fack_count > tp->fackets_out) | 1220 | if (fack_count > tp->fackets_out) |
1219 | tp->fackets_out = fack_count; | 1221 | tp->fackets_out = fack_count; |
1222 | |||
1223 | if (after(TCP_SKB_CB(skb)->seq, | ||
1224 | tp->highest_sack)) | ||
1225 | tp->highest_sack = TCP_SKB_CB(skb)->seq; | ||
1220 | } else { | 1226 | } else { |
1221 | if (dup_sack && (sacked&TCPCB_RETRANS)) | 1227 | if (dup_sack && (sacked&TCPCB_RETRANS)) |
1222 | reord = min(fack_count, reord); | 1228 | reord = min(fack_count, reord); |