From 55c5b669a29b3ea017636fe06757dd95bb0a2967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Date: Sun, 2 Dec 2007 00:48:01 +0200 Subject: [PATCH] --- yaml --- r: 78267 b: refs/heads/master c: d67c58e9ae80ea577785111534e49d3ca757ec50 h: refs/heads/master i: 78265: 3b3cce977e505eee8dcc812bac321ae5fb9200bd 78263: 82980980ac7228f8bd67f2f138d4125eeac89c6f v: v3 --- [refs] | 2 +- trunk/net/ipv4/tcp_output.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 9e3fb513632d..686fdd28cfd2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 50c4817e9919132639be0adc387b509e04a9ed0a +refs/heads/master: d67c58e9ae80ea577785111534e49d3ca757ec50 diff --git a/trunk/net/ipv4/tcp_output.c b/trunk/net/ipv4/tcp_output.c index c2aa4688dae6..b41176f380d7 100644 --- a/trunk/net/ipv4/tcp_output.c +++ b/trunk/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;