@@ -277,7 +277,6 @@ int tcp_set_congestion_control(struct sock *sk, const char *name)
}
/* RFC2861 Check whether we are limited by application or congestion window
- * This is the inverse of cwnd check in tcp_tso_should_defer
*/
bool tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
{
@@ -288,10 +287,7 @@ bool tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
return true;
left = tp->snd_cwnd - in_flight;
- if (sk_can_gso(sk) &&
- left * sysctl_tcp_tso_win_divisor < tp->snd_cwnd &&
- left * tp->mss_cache < sk->sk_gso_max_size &&
- left < sk->sk_gso_max_segs)
+ if (sk_can_gso(sk) && left < tp->xmit_size_goal_segs)
return true;
return left <= tcp_max_tso_deferred_mss(tp);
}