|
@@ -1875,8 +1875,12 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
|
|
|
* - better RTT estimation and ACK scheduling
|
|
|
* - faster recovery
|
|
|
* - high rates
|
|
|
+ * Alas, some drivers / subsystems require a fair amount
|
|
|
+ * of queued bytes to ensure line rate.
|
|
|
+ * One example is wifi aggregation (802.11 AMPDU)
|
|
|
*/
|
|
|
- limit = max(skb->truesize, sk->sk_pacing_rate >> 10);
|
|
|
+ limit = max_t(unsigned int, sysctl_tcp_limit_output_bytes,
|
|
|
+ sk->sk_pacing_rate >> 10);
|
|
|
|
|
|
if (atomic_read(&sk->sk_wmem_alloc) > limit) {
|
|
|
set_bit(TSQ_THROTTLED, &tp->tsq_flags);
|