diff options
author | Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> | 2009-02-28 05:44:29 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-02 12:00:10 +0100 |
commit | 62ad27619cbcf23fb8581ae72f3806c1d90a861d (patch) | |
tree | 2fa0b2f94534c333312aa2a657ef84c257993818 /net/ipv4/tcp_output.c | |
parent | tcp: fix lost_cnt_hint miscounts (diff) | |
download | linux-62ad27619cbcf23fb8581ae72f3806c1d90a861d.tar.xz linux-62ad27619cbcf23fb8581ae72f3806c1d90a861d.zip |
tcp: deferring in middle of queue makes very little sense
If skb can be sent right away, we certainly should do that
if it's in the middle of the queue because it won't get
more data into it.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 2471cd4f66db..fa3c81aa4e6a 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1356,6 +1356,10 @@ static int tcp_tso_should_defer(struct sock *sk, struct sk_buff *skb) if (limit >= sk->sk_gso_max_size) goto send_now; + /* Middle in queue won't get any more data, full sendable already? */ + if ((skb != tcp_write_queue_tail(sk)) && (limit >= skb->len)) + goto send_now; + if (sysctl_tcp_tso_win_divisor) { u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache); |