diff options
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/tcp_input.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 52b5c2d0ecd0..f772aaa4319e 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3009,11 +3009,11 @@ static void tcp_update_cwnd_in_recovery(struct sock *sk, int newly_acked_sacked, | |||
3009 | * tcp_xmit_retransmit_queue(). | 3009 | * tcp_xmit_retransmit_queue(). |
3010 | */ | 3010 | */ |
3011 | static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, | 3011 | static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, |
3012 | int newly_acked_sacked, int flag) | 3012 | int newly_acked_sacked, bool is_dupack, |
3013 | int flag) | ||
3013 | { | 3014 | { |
3014 | struct inet_connection_sock *icsk = inet_csk(sk); | 3015 | struct inet_connection_sock *icsk = inet_csk(sk); |
3015 | struct tcp_sock *tp = tcp_sk(sk); | 3016 | struct tcp_sock *tp = tcp_sk(sk); |
3016 | int is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP)); | ||
3017 | int do_lost = is_dupack || ((flag & FLAG_DATA_SACKED) && | 3017 | int do_lost = is_dupack || ((flag & FLAG_DATA_SACKED) && |
3018 | (tcp_fackets_out(tp) > tp->reordering)); | 3018 | (tcp_fackets_out(tp) > tp->reordering)); |
3019 | int fast_rexmit = 0, mib_idx; | 3019 | int fast_rexmit = 0, mib_idx; |
@@ -3681,10 +3681,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3681 | u32 prior_snd_una = tp->snd_una; | 3681 | u32 prior_snd_una = tp->snd_una; |
3682 | u32 ack_seq = TCP_SKB_CB(skb)->seq; | 3682 | u32 ack_seq = TCP_SKB_CB(skb)->seq; |
3683 | u32 ack = TCP_SKB_CB(skb)->ack_seq; | 3683 | u32 ack = TCP_SKB_CB(skb)->ack_seq; |
3684 | bool is_dupack = false; | ||
3684 | u32 prior_in_flight; | 3685 | u32 prior_in_flight; |
3685 | u32 prior_fackets; | 3686 | u32 prior_fackets; |
3686 | int prior_packets; | 3687 | int prior_packets; |
3687 | int prior_sacked = tp->sacked_out; | 3688 | int prior_sacked = tp->sacked_out; |
3689 | int pkts_acked = 0; | ||
3688 | int newly_acked_sacked = 0; | 3690 | int newly_acked_sacked = 0; |
3689 | int frto_cwnd = 0; | 3691 | int frto_cwnd = 0; |
3690 | 3692 | ||
@@ -3757,6 +3759,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3757 | /* See if we can take anything off of the retransmit queue. */ | 3759 | /* See if we can take anything off of the retransmit queue. */ |
3758 | flag |= tcp_clean_rtx_queue(sk, prior_fackets, prior_snd_una); | 3760 | flag |= tcp_clean_rtx_queue(sk, prior_fackets, prior_snd_una); |
3759 | 3761 | ||
3762 | pkts_acked = prior_packets - tp->packets_out; | ||
3760 | newly_acked_sacked = (prior_packets - prior_sacked) - | 3763 | newly_acked_sacked = (prior_packets - prior_sacked) - |
3761 | (tp->packets_out - tp->sacked_out); | 3764 | (tp->packets_out - tp->sacked_out); |
3762 | 3765 | ||
@@ -3771,8 +3774,9 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag) | |||
3771 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd && | 3774 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd && |
3772 | tcp_may_raise_cwnd(sk, flag)) | 3775 | tcp_may_raise_cwnd(sk, flag)) |
3773 | tcp_cong_avoid(sk, ack, prior_in_flight); | 3776 | tcp_cong_avoid(sk, ack, prior_in_flight); |
3774 | tcp_fastretrans_alert(sk, prior_packets - tp->packets_out, | 3777 | is_dupack = !(flag & (FLAG_SND_UNA_ADVANCED | FLAG_NOT_DUP)); |
3775 | newly_acked_sacked, flag); | 3778 | tcp_fastretrans_alert(sk, pkts_acked, newly_acked_sacked, |
3779 | is_dupack, flag); | ||
3776 | } else { | 3780 | } else { |
3777 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd) | 3781 | if ((flag & FLAG_DATA_ACKED) && !frto_cwnd) |
3778 | tcp_cong_avoid(sk, ack, prior_in_flight); | 3782 | tcp_cong_avoid(sk, ack, prior_in_flight); |