diff options
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 0f0c1c9829a1..b9e429d2d1de 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -3003,17 +3003,13 @@ static int tcp_process_frto(struct sock *sk, int flag) | |||
3003 | } | 3003 | } |
3004 | 3004 | ||
3005 | if (tp->frto_counter == 1) { | 3005 | if (tp->frto_counter == 1) { |
3006 | /* Sending of the next skb must be allowed or no F-RTO */ | 3006 | /* tcp_may_send_now needs to see updated state */ |
3007 | if (!tcp_send_head(sk) || | ||
3008 | after(TCP_SKB_CB(tcp_send_head(sk))->end_seq, | ||
3009 | tp->snd_una + tp->snd_wnd)) { | ||
3010 | tcp_enter_frto_loss(sk, (tp->frto_counter == 1 ? 2 : 3), | ||
3011 | flag); | ||
3012 | return 1; | ||
3013 | } | ||
3014 | |||
3015 | tp->snd_cwnd = tcp_packets_in_flight(tp) + 2; | 3007 | tp->snd_cwnd = tcp_packets_in_flight(tp) + 2; |
3016 | tp->frto_counter = 2; | 3008 | tp->frto_counter = 2; |
3009 | |||
3010 | if (!tcp_may_send_now(sk)) | ||
3011 | tcp_enter_frto_loss(sk, 2, flag); | ||
3012 | |||
3017 | return 1; | 3013 | return 1; |
3018 | } else { | 3014 | } else { |
3019 | switch (sysctl_tcp_frto_response) { | 3015 | switch (sysctl_tcp_frto_response) { |
@@ -3069,6 +3065,7 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag) | |||
3069 | } | 3065 | } |
3070 | 3066 | ||
3071 | prior_fackets = tp->fackets_out; | 3067 | prior_fackets = tp->fackets_out; |
3068 | prior_in_flight = tcp_packets_in_flight(tp); | ||
3072 | 3069 | ||
3073 | if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) { | 3070 | if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) { |
3074 | /* Window is constant, pure forward advance. | 3071 | /* Window is constant, pure forward advance. |
@@ -3108,8 +3105,6 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag) | |||
3108 | if (!prior_packets) | 3105 | if (!prior_packets) |
3109 | goto no_queue; | 3106 | goto no_queue; |
3110 | 3107 | ||
3111 | prior_in_flight = tcp_packets_in_flight(tp); | ||
3112 | |||
3113 | /* See if we can take anything off of the retransmit queue. */ | 3108 | /* See if we can take anything off of the retransmit queue. */ |
3114 | flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets); | 3109 | flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets); |
3115 | 3110 | ||