|
Michal Kubecek |
894711 |
From: Michal Kubecek <mkubecek@suse.cz>
|
|
Michal Kubecek |
894711 |
Date: Fri, 21 Jan 2022 01:15:39 +0100
|
|
Michal Kubecek |
894711 |
Subject: net: allow retransmitting a TCP packet if original is still in queue
|
|
Michal Kubecek |
894711 |
Patch-mainline: Never, temporary workaround
|
|
Michal Kubecek |
894711 |
References: bsc#1188605 bsc#1187428 bsc#1206619
|
|
Michal Kubecek |
894711 |
|
|
Michal Kubecek |
894711 |
This effectively reverts mainline commit 1f3279ae0c13 ("tcp: avoid
|
|
Michal Kubecek |
894711 |
retransmits of TCP packets hanging in host queues") so that the retransmit
|
|
Michal Kubecek |
894711 |
can unblock the previous transmit of a TCP packet if it was left in the
|
|
Michal Kubecek |
894711 |
qdisc queue of pfifo_fast due to a race condition in lockless qdisc code.
|
|
Michal Kubecek |
894711 |
Rather than a full revert, just let skb_still_in_host_queue() always return
|
|
Michal Kubecek |
894711 |
false so that everything else works exactly as before.
|
|
Michal Kubecek |
894711 |
|
|
Michal Kubecek |
894711 |
This is only a temporary workaround until the bsc#1188605 race condition is
|
|
Michal Kubecek |
894711 |
identified and fixed.
|
|
Michal Kubecek |
894711 |
|
|
Michal Kubecek |
894711 |
Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
|
|
Michal Kubecek |
894711 |
---
|
|
Michal Kubecek |
894711 |
net/ipv4/tcp_output.c | 4 +++-
|
|
Michal Kubecek |
894711 |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
Michal Kubecek |
894711 |
|
|
Michal Kubecek |
894711 |
--- a/net/ipv4/tcp_output.c
|
|
Michal Kubecek |
894711 |
+++ b/net/ipv4/tcp_output.c
|
|
Michal Kubecek |
894711 |
@@ -2785,7 +2785,9 @@ static bool skb_still_in_host_queue(struct sock *sk,
|
|
Michal Kubecek |
894711 |
if (skb_fclone_busy(sk, skb)) {
|
|
Michal Kubecek |
894711 |
NET_INC_STATS(sock_net(sk),
|
|
Michal Kubecek |
894711 |
LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES);
|
|
Michal Kubecek |
894711 |
- return true;
|
|
Michal Kubecek |
894711 |
+ /* unclog the qdisc queue if previous transmit is still
|
|
Michal Kubecek |
894711 |
+ * there because of a race condition
|
|
Michal Kubecek |
894711 |
+ */
|
|
Michal Kubecek |
894711 |
}
|
|
Michal Kubecek |
894711 |
}
|
|
Michal Kubecek |
894711 |
return false;
|