tcp: refine skb->ooo_okay setting
authorEric Dumazet <edumazet@google.com>
Thu, 17 Aug 2023 18:23:53 +0000 (18:23 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 19 Aug 2023 02:29:36 +0000 (19:29 -0700)
commit726e9e8b94b92d69004af17a68f9f37ffc0358b9
tree42016eb3bb7ca8be1126b7aa324b7f6a169982ba
parentfc720399ffd9e3cc556dc48773f3cde1d28fc20d
tcp: refine skb->ooo_okay setting

Enabling BIG TCP on a low end platform apparently increased
chances of getting flows locked on one busy TX queue.

A similar problem was handled in commit 9b462d02d6dd
("tcp: TCP Small Queues and strange attractors"),
but the strategy worked for either bulk flows,
or 'large enough' RPC. BIG TCP changed how large
RPC needed to be to enable the work around:
If RPC fits in a single skb, TSQ never triggers.

Root cause for the problem is a busy TX queue,
with delayed TX completions.

This patch changes how we set skb->ooo_okay to detect
the case TX completion was not done, but incoming ACK
already was processed and emptied rtx queue.

Update the comment to explain the tricky details.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20230817182353.2523746-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp_output.c