Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba244fe9 authored by David S. Miller's avatar David S. Miller
Browse files

[TCP]: Fix tcp_tso_should_defer() when limit>=65536



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: default avatarDavid S. Miller <davem@davemloft.net>
parent c1274376
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);