[TCP]: Fix TSO deferring
authorIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Fri, 21 Dec 2007 04:36:03 +0000 (20:36 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:59:36 +0000 (14:59 -0800)
I'd say that most of what tcp_tso_should_defer had in between
there was dead code because of this.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c

index 9a985b55e7d8d06af3c5e9170621ea94b8eb1f98..7c50271ddc30e05aabc6908d1ebb56fa5d40a22a 100644 (file)
@@ -1230,7 +1230,8 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb)
                goto send_now;
 
        /* Defer for less than two clock ticks. */
-       if (!tp->tso_deferred && ((jiffies<<1)>>1) - (tp->tso_deferred>>1) > 1)
+       if (tp->tso_deferred &&
+           ((jiffies << 1) >> 1) - (tp->tso_deferred >> 1) > 1)
                goto send_now;
 
        in_flight = tcp_packets_in_flight(tp);