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=Qhk+iP4E; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id D5B595A061C for ; Fri, 05 Dec 2025 01:35:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1764894926; bh=woccuvHI9UAnKJf/3B5edT0J2qKvKzFkrHKAzBi1jdM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qhk+iP4ElLhPYoZosOx7kC5A2gL79AfaPBaGQe6sbrgMMHDzzZNeHa7PEWe7+92G/ DywgcjXnFXCXhApYPKF5FPz169oBfRlgttcQCJZsT22sMBMp/VYim67ugJEv9tIGG/ C2EfV8wJMc+GuDMX63wD5qc04uOnn5VGHGdHzEW77bhMbUn64+QK/YPiuOcWsdTyTL VRVIc9s9mAE24B4KTFnSQFWvFBybtfmDKbQ6yyKMBohdup7/2mpc/gBMM8Bom8HwKU 7+m8ZzMvRhRsnUniEnRwTSjLzaA4mCtoyygaRAB34+GzaRQT0A6LKBOkAnMpS1A5Uh nu20LmgSZ1ZYA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dMsq26Gnvz4wHX; Fri, 05 Dec 2025 11:35:26 +1100 (AEDT) Date: Fri, 5 Dec 2025 10:50:37 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 3/8] tcp: Don't clear ACK_TO_TAP_DUE if we're advertising a zero-sized window Message-ID: References: <20251204074542.2156548-1-sbrivio@redhat.com> <20251204074542.2156548-4-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3gToGIF17dvTW+kx" Content-Disposition: inline In-Reply-To: <20251204074542.2156548-4-sbrivio@redhat.com> Message-ID-Hash: WW2CTEFBGO3F52N73A3RLW56PXPCIQB3 X-Message-ID-Hash: WW2CTEFBGO3F52N73A3RLW56PXPCIQB3 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: --3gToGIF17dvTW+kx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 04, 2025 at 08:45:36AM +0100, Stefano Brivio wrote: > We correctly avoid doing that at the beginning of tcp_prepare_flags(), > but we might clear the flag later on if we actually end up sending a > "flag" segment. >=20 > Make sure we don't, otherwise we might delay window updates after a > zero-window condition significantly, and significantly affect > throughput. >=20 > In some cases, we're forcing peers to send zero-window probes or > keep-alive segments. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > tcp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/tcp.c b/tcp.c > index b00b874..e4c5a5b 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -1285,7 +1285,8 @@ int tcp_prepare_flags(const struct ctx *c, struct t= cp_tap_conn *conn, > th->fin =3D !!(flags & FIN); > =20 > if (th->ack) { > - if (SEQ_GE(conn->seq_ack_to_tap, conn->seq_from_tap)) > + if (SEQ_GE(conn->seq_ack_to_tap, conn->seq_from_tap) && > + conn->wnd_to_tap) > conn_flag(c, conn, ~ACK_TO_TAP_DUE); > else > conn_flag(c, conn, ACK_TO_TAP_DUE); > --=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 --3gToGIF17dvTW+kx Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmkyHkwACgkQzQJF27ox 2Gdt3BAAj/ssm+RWLxWXix3bzVyh/yf5ebjrJNcdMozVI0B/Z42aTSDoLizYcalc z95OkUfDmXi6/k+BtjjrVMskpitJ0jiJoXjyoOom2rMa859yNXhAlXxW2ejyhOzg WaA1OIuGy1+HfY1aGuM96lpvfF60aDIPfdj0r659C1cX78klfdDTb9gqPk7y0RKG 6OzCrMRqtGEu4izc5bFkts75he0B3x6LWhIm6SMmhs5AZvzhSmFABU2u5GBH3Q1H 2AtYcUgNB6r5YSEmDx08AD47afiWKw9AmgjbH2BzJxL2EF9ZIDAniUXQEIn8j25w NHNwvdcR5SrC9qlU7mA3oFb3TSp0QHjCXDvwwxVMUHsA1HVi2XunGo8OGL0dOIZB SouByN+B7HaPMBTXlfsukjq2tj9gw/sO6e8EUAoIFVLk1pcdoMe8rkZT49VAtXN6 q7Bkwy1LpGF5qRD1OP2YsVhMbPSKwycFdJ1qa10oOayq9Q9JY2zMxRNuuWrEnhh0 vnguAzKJ5z3VtbxXXTOi/NInIismQcHSj5ULlupuzbU42iRmtZYIdU48AveCRrn9 JxRziIXFvrIj3W2XR1Fb3UOA+nw/Ng1mCSEUnPSQRvy5Lhk4schzcCn1NK8JAWRA 8js2ox0FDmq2adKWoBVu9+NuBlF+WyvgLJkMmPW28089GGq8KAM= =7Rsu -----END PGP SIGNATURE----- --3gToGIF17dvTW+kx--