Skip to content

Commit c4221a8

Browse files
edumazetkuba-moo
authored andcommitted
tcp: always use tcp_limit_output_bytes limitation
This partially reverts commit c73e580 ("tcp: tsq: no longer use limit_output_bytes for paced flows") Overriding the tcp_limit_output_bytes sysctl value for FQ enabled flows has the following problem: It allows TCP to queue around 2 ms worth of data per flow, defeating tcp_rcv_rtt_update() accuracy on the receiver, forcing it to increase sk->sk_rcvbuf even if the real RTT is around 100 us. After this change, we keep enough packets in flight to fill the pipe, and let receive queues small enough to get good cache behavior (cpu caches and/or NIC driver page pools). Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20250513193919.1089692-11-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 9ea3bfa commit c4221a8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

net/ipv4/tcp_output.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2619,9 +2619,8 @@ static bool tcp_small_queue_check(struct sock *sk, const struct sk_buff *skb,
26192619
limit = max_t(unsigned long,
26202620
2 * skb->truesize,
26212621
READ_ONCE(sk->sk_pacing_rate) >> READ_ONCE(sk->sk_pacing_shift));
2622-
if (sk->sk_pacing_status == SK_PACING_NONE)
2623-
limit = min_t(unsigned long, limit,
2624-
READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_limit_output_bytes));
2622+
limit = min_t(unsigned long, limit,
2623+
READ_ONCE(sock_net(sk)->ipv4.sysctl_tcp_limit_output_bytes));
26252624
limit <<= factor;
26262625

26272626
if (static_branch_unlikely(&tcp_tx_delay_enabled) &&

0 commit comments

Comments
 (0)