diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2007-12-01 23:48:01 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 23:55:43 +0100 |
commit | d67c58e9ae80ea577785111534e49d3ca757ec50 (patch) | |
tree | 45c09bcdabbde693d8b4acfe170a9f0e5c02bca4 /net/ipv4/tcp_output.c | |
parent | [TCP]: MTUprobe: prepare skb fields earlier (diff) | |
download | linux-d67c58e9ae80ea577785111534e49d3ca757ec50.tar.xz linux-d67c58e9ae80ea577785111534e49d3ca757ec50.zip |
[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.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index c2aa4688dae6..b41176f380d7 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) int len; int probe_size; int size_needed; - unsigned int pif; int copy; int mss_now; @@ -1326,11 +1325,9 @@ static int tcp_mtu_probe(struct sock *sk) if (after(tp->snd_nxt + size_needed, tp->snd_una + tp->snd_wnd)) return 0; - /* Do we need to wait to drain cwnd? */ - pif = tcp_packets_in_flight(tp); - if (pif + 2 > tp->snd_cwnd) { - /* With no packets in flight, don't stall. */ - if (pif == 0) + /* Do we need to wait to drain cwnd? With none in flight, don't stall */ + if (tcp_packets_in_flight(tp) + 2 > tp->snd_cwnd) { + if (!tcp_packets_in_flight(tp)) return -1; else return 0; |