diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_input.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 44a4fffc2cc3..85627f83665f 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -2844,6 +2844,7 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets) | |||
2844 | int flag = 0; | 2844 | int flag = 0; |
2845 | u32 pkts_acked = 0; | 2845 | u32 pkts_acked = 0; |
2846 | u32 reord = tp->packets_out; | 2846 | u32 reord = tp->packets_out; |
2847 | u32 prior_sacked = tp->sacked_out; | ||
2847 | s32 seq_rtt = -1; | 2848 | s32 seq_rtt = -1; |
2848 | s32 ca_seq_rtt = -1; | 2849 | s32 ca_seq_rtt = -1; |
2849 | ktime_t last_ackt = net_invalid_timestamp(); | 2850 | ktime_t last_ackt = net_invalid_timestamp(); |
@@ -2925,9 +2926,11 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets) | |||
2925 | 2926 | ||
2926 | tcp_unlink_write_queue(skb, sk); | 2927 | tcp_unlink_write_queue(skb, sk); |
2927 | sk_wmem_free_skb(sk, skb); | 2928 | sk_wmem_free_skb(sk, skb); |
2928 | tcp_clear_retrans_hints_partial(tp); | 2929 | tp->scoreboard_skb_hint = NULL; |
2929 | if (skb == tp->retransmit_skb_hint) | 2930 | if (skb == tp->retransmit_skb_hint) |
2930 | tp->retransmit_skb_hint = NULL; | 2931 | tp->retransmit_skb_hint = NULL; |
2932 | if (skb == tp->lost_skb_hint) | ||
2933 | tp->lost_skb_hint = NULL; | ||
2931 | } | 2934 | } |
2932 | 2935 | ||
2933 | if (skb && (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) | 2936 | if (skb && (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) |
@@ -2946,6 +2949,15 @@ static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets) | |||
2946 | /* Non-retransmitted hole got filled? That's reordering */ | 2949 | /* Non-retransmitted hole got filled? That's reordering */ |
2947 | if (reord < prior_fackets) | 2950 | if (reord < prior_fackets) |
2948 | tcp_update_reordering(sk, tp->fackets_out - reord, 0); | 2951 | tcp_update_reordering(sk, tp->fackets_out - reord, 0); |
2952 | |||
2953 | /* No need to care for underflows here because | ||
2954 | * the lost_skb_hint gets NULLed if we're past it | ||
2955 | * (or something non-trivial happened) | ||
2956 | */ | ||
2957 | if (tcp_is_fack(tp)) | ||
2958 | tp->lost_cnt_hint -= pkts_acked; | ||
2959 | else | ||
2960 | tp->lost_cnt_hint -= prior_sacked - tp->sacked_out; | ||
2949 | } | 2961 | } |
2950 | 2962 | ||
2951 | tp->fackets_out -= min(pkts_acked, tp->fackets_out); | 2963 | tp->fackets_out -= min(pkts_acked, tp->fackets_out); |