From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by passt.top (Postfix, from userid 1000) id D37A75A095E; Thu, 04 Dec 2025 08:45:42 +0100 (CET) From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 7/8] tcp: Send a duplicate ACK also on complete sendmsg() failure Date: Thu, 4 Dec 2025 08:45:40 +0100 Message-ID: <20251204074542.2156548-8-sbrivio@redhat.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251204074542.2156548-1-sbrivio@redhat.com> References: <20251204074542.2156548-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: WJEKRQQ77WJJJTYPINTPNSP43PCSLXMG X-Message-ID-Hash: WJEKRQQ77WJJJTYPINTPNSP43PCSLXMG 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 --- tcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp.c b/tcp.c index 454df69..76a9daf 100644 --- a/tcp.c +++ b/tcp.c @@ -1965,7 +1965,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