From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id 6404B5A065B; Mon, 08 Dec 2025 01:22:29 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH v2 8/9] tcp: Send a duplicate ACK also on complete sendmsg() failure Date: Mon, 8 Dec 2025 01:22:16 +0100 Message-ID: <20251208002229.391162-9-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251208002229.391162-1-sbrivio@redhat.com> References: <20251208002229.391162-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: I77VEF6CXMZAIDHCRT7VR2YAH2BGANXH X-Message-ID-Hash: I77VEF6CXMZAIDHCRT7VR2YAH2BGANXH X-MailFrom: sbrivio@passt.top X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Max Chernoff , David Gibson X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ...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 60a9687..fa22e9b 100644 --- a/tcp.c +++ b/tcp.c @@ -2017,7 +2017,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; } -- 2.43.0