From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202510 header.b=TNv8USBf; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 0C3915A061A for ; Fri, 05 Dec 2025 03:37:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1764902221; bh=n1pKapZ40CMdLw+sBdHG8Ltfl5dgZyEAkg8BYx5LDL0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TNv8USBfkgCeAFAdZOrWhcXnaFoXrRGUqFFt3OjG437Ii0MQi5FkNq3N0uAbGho4H vawmiZLfbB5BTq+9FvRtk3Gq/isnnWbvwQyu/IWsS0jZdt0A5NQXOlkmdzCqcj1m+s GL47YR2Pn/BhHKA/CzjZ7P+W4A4SAkwflV75i1NmkzugGuNQOLZTa6gYBTQvUsou96 7E+rGg2QWIlMX83Nj/RsRgrvMRUS5aljb5TqFbv52iX3Fl3fO71gjqWcYMnYVth8hY T1fhivZVrO0LbmbbFEb9mU3otQivhuVLNTdqTk1rRf/ifR61dM1ehl6C/LQi/0xqrX OAnAqr6ydH5+w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dMwWK3tr0z4wHY; Fri, 05 Dec 2025 13:37:01 +1100 (AEDT) Date: Fri, 5 Dec 2025 13:36:42 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 8/8] tcp: Skip redundant ACK on partial sendmsg() failure Message-ID: References: <20251204074542.2156548-1-sbrivio@redhat.com> <20251204074542.2156548-9-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LNA8AR3hUT+RV8zN" Content-Disposition: inline In-Reply-To: <20251204074542.2156548-9-sbrivio@redhat.com> Message-ID-Hash: YLQCN63CJDBUV4QDHUBOQDETEHCMYLT7 X-Message-ID-Hash: YLQCN63CJDBUV4QDHUBOQDETEHCMYLT7 X-MailFrom: dgibson@gandalf.ozlabs.org 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: passt-dev@passt.top, Max Chernoff 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: --LNA8AR3hUT+RV8zN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 04, 2025 at 08:45:41AM +0100, Stefano Brivio wrote: > ...we'll send a duplicate ACK right away in this case, and this > redundant, earlier check is not just useless, but it might actually > be harmful as we'll now send a triple ACK which might cause two > retransmissions. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > tcp.c | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) >=20 > diff --git a/tcp.c b/tcp.c > index 76a9daf..fc986a2 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -1972,13 +1972,10 @@ eintr: > return -1; > } > =20 > - if (n < (int)(seq_from_tap - conn->seq_from_tap)) { > + if (n < (int)(seq_from_tap - conn->seq_from_tap)) > partial_send =3D 1; > - conn->seq_from_tap +=3D n; > - tcp_send_flag(c, conn, ACK_IF_NEEDED); > - } else { > - conn->seq_from_tap +=3D n; > - } > + > + conn->seq_from_tap +=3D n; > =20 > out: > if (keep !=3D -1 || partial_send) { > --=20 > 2.43.0 >=20 --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --LNA8AR3hUT+RV8zN Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmkyRTkACgkQzQJF27ox 2GeBBA/5ARcwwsu7AvKhnjm9LxWI2hYkBwO/Io5dURfQYwm3fBuo6N82/pi7Rp0M XWIfWIsouKSYmKvA3CeLUDolNE1KucieMOa5o/WpHI83ZkdX8A/onFzPgG32OEHm r12YLOtXdBSJqhc/G5q9ZsemEJ4V7U2kvuJ7XZwe0B/mSQlJNWyOlN/7jxH/hWVS zr7zlfwkrGyfkMyjrkuWSGtHqnnZuiwoteDgxKMxWwhYciu+Z2qiW9gb/+RLzu39 WBPMNAAFDqTnMUgA0JdnV0zU2R/2HMyZzTRFZn71MCTbKuKpVLgxOZmtgRzADz8C VsqR6XvCZZ3N4EvX0Y4Wn7zQLgci34liqbNA+rYvBeoms7aeyBhPrnK6lfaeTEdx FaM3tSGHp8SDXMpHrFppThk4Mr3mZSCWuwXLqfkfCDnPeLas5S23XuLd+twdk8lp nRgs5ze+m/5i61oFaGa1/gjHhjCCQUO5/Iu4EmBmfG4Pltg67qjGFTkulaE484ub Kb1GwnfQdr5DyRR8yJZI+EB9OOir9ypqaVHbLJIIbXNSvOle5BTDkfEyG0UA4f2p cXP6JABgbgadRCO6ltaexrTh2LFUw/C2ekRkQci3yBsOAJcERn80dHwhq4UEtgc7 IzRvbETbGsQgad+djjS2L272ubuMYh9r64t428YAJ5b0cxjCKng= =gKg0 -----END PGP SIGNATURE----- --LNA8AR3hUT+RV8zN--