Skip to content

Commit

Permalink
[TCP]: Fix TSO deferring
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Jan 28, 2008
1 parent 255f97b commit bd515c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bd515c3

Please sign in to comment.