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=foZlME4l; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id EAFC65A0965 for ; Mon, 17 Nov 2025 06:13:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1763356411; bh=F+iM1BDiUfx2B+CXHB4ucjPhQ9/XVu1SuVK7KAKtENI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=foZlME4lq+cnGs1cL/S6Q4XVZ/lBwgQkQFNwg8Vjne3+gdtJjtwUQxjvy/GDWWl1I vV4+JzRd5CUQx79pUsGcYv4vYuda/Z178BiO5e7pEgZ+l26XXvLNun8qB/REsHeJ2f X3Ztjoax1KLuuKmDOqZ7yyAVL5sl5Z04xwF/KJIV6G4Ax2BFtf15O7NBM2xRwIVoYy ioOCDOrbNWf+6Mk3Oy+WE4fGOPimhvsSrFWmdkrNhv/5rFIW3zhKPVmKijV7qU8BTk YieTFq+Yw+ld6TItG8fVig4/77rqdkgiaAgyon9PAqbSM6IiQ1krmSxBBWUTWrWTLm tmdw16O87TMxQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4d8wrC3RvYz58bP; Mon, 17 Nov 2025 16:13:31 +1100 (AEDT) Date: Mon, 17 Nov 2025 15:50:40 +1100 From: David Gibson To: Yumei Huang Subject: Re: [PATCH v8 6/6] tcp: Clamp the retry timeout Message-ID: References: <20251110093137.87705-7-yuhuang@redhat.com> <20251114010121.10dfb18a@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cbu2nuZ/B+SRomgq" Content-Disposition: inline In-Reply-To: Message-ID-Hash: 7L6ZPPR7RYQ2NLL7O7OPJ3QRIIRTWY6C X-Message-ID-Hash: 7L6ZPPR7RYQ2NLL7O7OPJ3QRIIRTWY6C 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: Stefano Brivio , passt-dev@passt.top 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: --cbu2nuZ/B+SRomgq Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 17, 2025 at 10:38:52AM +0800, Yumei Huang wrote: > On Fri, Nov 14, 2025 at 12:19=E2=80=AFPM David Gibson > wrote: > > > > On Fri, Nov 14, 2025 at 11:05:51AM +0800, Yumei Huang wrote: > > > On Fri, Nov 14, 2025 at 8:47=E2=80=AFAM David Gibson > > > wrote: [snip] > > > > > > > @@ -2811,10 +2821,15 @@ void tcp_get_rto_params(struct ctx *c) > > > > > > > v =3D read_file_integer(SYN_LINEAR_TIMEOUTS, SYN_LINEAR_TIM= EOUTS_DEFAULT); > > > > > > > c->tcp.syn_linear_timeouts =3D MIN(v, MAX_SYNCNT); > > > > > > > > > > > > > > + v =3D read_file_integer(RTO_MAX_MS, RTO_MAX_MS_DEFAULT); > > > > > > > + c->tcp.rto_max =3D MIN(DIV_ROUND_CLOSEST(v, 1000), INT_MAX); > > > > > > > > > > > > Possibly we should verify this is =3D> RTO_INIT. > > > > > > > > > > As a sanity check, maybe, but I don't see any harmful effect if i= t's > > > > > < RTO_INIT, right? So I'm not sure if we should. No preference fr= om my > > > > > side really. > > > > > > > > Sorry, describing this as >=3D RTO_INIT was misleading. What I'm > > > > concerned about here is if the kernel value is set to 400ms, we'll > > > > round it to... 0s. > > > > > > > > So, really what I'm concerned about is that we ensure this is > 0. > > > > > > That's a good point. > > > > Actually, thinking about it, I wonder if makes more sense to always > > round up to 1s, rather than to the nearest 1s. >=20 > So it's to replace DIV_ROUND_CLOSEST with DIV_ROUND_UP, right? Yes. --=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 --cbu2nuZ/B+SRomgq Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmkaqY0ACgkQzQJF27ox 2Gd4ew//caAGBGr34diSf5BSxwRrwv0o6Z9tj/m3Xb8fJRqK9cLBYY+C5CnN8Gyt EVkjb0eA6Xm9SXMlIE/sjqtxhFMq22qWZON9Lt4rcOJuxhzPJpLireUjpS0RDonG GILLA+tiDEgIIEj8pDhoOmZ0IKBr/JGSgXFUVFOVwOowkKUQShRVgIUltbWEC8EY +xUxGb3Bl+gdCW5j0P+DQrBlw96SfvKNx5CvlZOppgGBUIXGxTH4bFsAjk3DL4ix 3Dfz0jfWoePGyA5N9D/F6tw1rXoORkD8BeyIO3vC8XSgBP3e3/viDsOcqgVP1GgY OhLyGBELMqkj0rNuREE3sc5prn7OG3DZT7A0lmFUj7xDkf75JAYCINX7PeKC0Pez DuEjVJX9GsUSNyozy9Q66aAyw7+3EMaWhPrprGdGz153rEnm8p7qXkfIRLLHeXYR M+Oqdcges0rAjwj4ohQkb63LMticUaAwto87CoQt9l24pyL3fdk/Ba/g3XL2fTe3 a4fAE2z355xa2RvzpL1Sd9s8+ftpt35S+bwjk7N6X+CX+i6VDO/B7HbNdWt8MK5l JbjA6Yv3WNaDQZcYAIDlumGC9iS063TURQOvc5CbOqEq0/Yb8DCnVcGPhYh8O0ld TNIzvOAlcXq1fV7ZkVjShRT8qxK8CiCIa7k+U42Pd0M4yt5kQIY= =DFgB -----END PGP SIGNATURE----- --cbu2nuZ/B+SRomgq--