aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>2007-12-01 17:48:01 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:55:43 -0500
commitd67c58e9ae80ea577785111534e49d3ca757ec50 (patch)
tree45c09bcdabbde693d8b4acfe170a9f0e5c02bca4 /net/ipv4/tcp_output.c
parent50c4817e9919132639be0adc387b509e04a9ed0a (diff)
[TCP]: Remove local variable and use packets_in_flight directly
Lines won't be that long and it's compiler's job to optimize them. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index c2aa4688dae..b41176f380d 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1293,7 +1293,6 @@ static int tcp_mtu_probe(struct sock *sk)
1293 int len; 1293 int len;
1294 int probe_size; 1294 int probe_size;
1295 int size_needed; 1295 int size_needed;
1296 unsigned int pif;
1297 int copy; 1296 int copy;
1298 int mss_now; 1297 int mss_now;
1299 1298
@@ -1326,11 +1325,9 @@ static int tcp_mtu_probe(struct sock *sk)
1326 if (after(tp->snd_nxt + size_needed, tp->snd_una + tp->snd_wnd)) 1325 if (after(tp->snd_nxt + size_needed, tp->snd_una + tp->snd_wnd))
1327 return 0; 1326 return 0;
1328 1327
1329 /* Do we need to wait to drain cwnd? */ 1328 /* Do we need to wait to drain cwnd? With none in flight, don't stall */
1330 pif = tcp_packets_in_flight(tp); 1329 if (tcp_packets_in_flight(tp) + 2 > tp->snd_cwnd) {
1331 if (pif + 2 > tp->snd_cwnd) { 1330 if (!tcp_packets_in_flight(tp))
1332 /* With no packets in flight, don't stall. */
1333 if (pif == 0)
1334 return -1; 1331 return -1;
1335 else 1332 else
1336 return 0; 1333 return 0;