From e0f1330287fad6c09bc140ba47914ba4aed90f98 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 4 Dec 2025 07:13:44 +0100 Subject: tcp: Send a duplicate ACK also on complete sendmsg() failure ...in order to trigger a fast retransmit as soon as possible. There's no benefit in forcing the sender to wait for a longer time than that. We already do this on partial failures (short socket writes), but for historical reason not on complete failures. Make these two cases consistent between each other. Signed-off-by: Stefano Brivio Reviewed-by: David Gibson --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index 1f57fda..2ad9764 100644 --- a/tcp.c +++ b/tcp.c @@ -2020,7 +2020,7 @@ eintr: goto eintr; if (errno == EAGAIN || errno == EWOULDBLOCK) { - tcp_send_flag(c, conn, ACK_IF_NEEDED); + tcp_send_flag(c, conn, ACK | DUP_ACK); return p->count - idx; } -- cgit v1.2.3