Skip to content

Commit

Permalink
[TCP]: Fix tcp_tso_should_defer() when limit>=65536
Browse files Browse the repository at this point in the history
That's >= a full sized TSO frame, so we should always
return 0 in that case.

Based upon a report and initial patch from Lachlan
Andrew, final patch suggested by Herbert Xu.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Mar 12, 2006
1 parent c127437 commit ba244fe
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,10 @@ static int tcp_tso_should_defer(struct sock *sk, struct tcp_sock *tp, struct sk_

limit = min(send_win, cong_win);

/* If a full-sized TSO skb can be sent, do it. */
if (limit >= 65536)
return 0;

if (sysctl_tcp_tso_win_divisor) {
u32 chunk = min(tp->snd_wnd, tp->snd_cwnd * tp->mss_cache);

Expand Down

0 comments on commit ba244fe

Please sign in to comment.