aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-12-05 05:21:35 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-12-05 08:37:30 -0500
commit52d3408150858a301a84bcbfe2f323d90d71d2ce (patch)
tree275691a21b251220257fac8932f71e77dbafbbc4 /net
parent3e6f049e0c4cf0606207c1a210abf50b436e9adf (diff)
[TCP]: Move prior_in_flight collect to more robust place
The previous location is after sacktag processing, which affects counters tcp_packets_in_flight depends on. This may manifest as wrong behavior if new SACK blocks are present and all is clear for call to tcp_cong_avoid, which in the case of tcp_reno_cong_avoid bails out early because it thinks that TCP is not limited by cwnd. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_input.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 094f8fafaf53..b9e429d2d1de 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -3065,6 +3065,7 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
3065 } 3065 }
3066 3066
3067 prior_fackets = tp->fackets_out; 3067 prior_fackets = tp->fackets_out;
3068 prior_in_flight = tcp_packets_in_flight(tp);
3068 3069
3069 if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) { 3070 if (!(flag&FLAG_SLOWPATH) && after(ack, prior_snd_una)) {
3070 /* Window is constant, pure forward advance. 3071 /* Window is constant, pure forward advance.
@@ -3104,8 +3105,6 @@ static int tcp_ack(struct sock *sk, struct sk_buff *skb, int flag)
3104 if (!prior_packets) 3105 if (!prior_packets)
3105 goto no_queue; 3106 goto no_queue;
3106 3107
3107 prior_in_flight = tcp_packets_in_flight(tp);
3108
3109 /* See if we can take anything off of the retransmit queue. */ 3108 /* See if we can take anything off of the retransmit queue. */
3110 flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets); 3109 flag |= tcp_clean_rtx_queue(sk, &seq_rtt, prior_fackets);
3111 3110