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=mOyN9Okl; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 332245A061A for ; Tue, 14 Oct 2025 02:44:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1760402665; bh=BfviwmS87OEeUl+0Iqv7nh22Tc1j2AbzuS3aHhvofuk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mOyN9OklEO7dMuu1awVnvEaxBimhwvZacGJk6IRipHGwgG5iBdtm3yXXGyQxAm6JJ 5LuLG/Y5KgQX7H0xEwEqBL4c/K+8+xTQfPRYsGTnLurwuYhRcx98XijDp0ioouOptQ b3vh493WRT8k+9OnXpsN0dBvnYmnF/k/1eaChx07r+SXDFZhfRldPYB1i84g+drZVN zgSAsYjBSLb0Rrp5eZpNc8lKANZFkz7KpT2oCOqlyyihn/xQqEX0XRFwQzn3dMMEAr J2otAn6f+5fWhWLaaJBnNbMff7l9W2ejcTIKaCH/ZyxM467u1ra54dl6Sav0ilV8FM X39WTAC2Z7kZQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4clwTP0mnFz4wCX; Tue, 14 Oct 2025 11:44:25 +1100 (AEDT) Date: Tue, 14 Oct 2025 11:44:18 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 2/3] tcp: Resend SYN for inbound connections Message-ID: References: <20251010074700.22177-1-yuhuang@redhat.com> <20251010074700.22177-3-yuhuang@redhat.com> <20251013123125.6bcc8b9d@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dm0Jvu7MxzWWFMf/" Content-Disposition: inline In-Reply-To: <20251013123125.6bcc8b9d@elisabeth> Message-ID-Hash: KRMZRGHR2MCZIWL74CXVYTDIZWHWWS4C X-Message-ID-Hash: KRMZRGHR2MCZIWL74CXVYTDIZWHWWS4C 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: Yumei Huang , 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: --dm0Jvu7MxzWWFMf/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 13, 2025 at 12:31:25PM +0200, Stefano Brivio wrote: > On Mon, 13 Oct 2025 18:22:00 +0800 > Yumei Huang wrote: >=20 > > On Mon, Oct 13, 2025 at 8:21=E2=80=AFAM David Gibson > > wrote: > > > > > > On Fri, Oct 10, 2025 at 03:46:59PM +0800, Yumei Huang wrote: =20 > > > > > > > > +/** > > > > + * get_tcp_syn_param() - Read SYN parameters from /proc/sys > > > > + * @path: Path to the sysctl file > > > > + * @fallback: Default value if file can't be read > > > > + * > > > > + * Return: Parameter value, fallback on failure > > > > +*/ > > > > +int get_tcp_syn_param(const char *path, int fallback) =20 > > > > > > I wonder if it might be worth making a new function in util.c to read > > > a file containing a single number. =20 > >=20 > > I can do that. So it could be reused in the future. >=20 > If it helps: we already have write_file(), so it might be worth adding > a read_file() symmetric to it. Maybe it's overkill though. That might be nice. Since we can't do allocations the right interface for read_file() is slightly trickier though: we need to have a preallocated buffer and report possible truncation. --=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 --dm0Jvu7MxzWWFMf/ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmjtnOEACgkQzQJF27ox 2GeWfA/6AtBIgP2NibLSou0WOoY9FDjfDUwaG1x9oNkBtxURJPm8+IRAzTFgb/TV 2xWu4oNFQOABbSEd3LfU2o0hLO6v7qtkM+p2D28LMZfSQ04sQ9zc48+x9Qwsasaw xBMQpQmlS3Mk9IiDgLNGIZF2GE1pIYSXSqk34nYTP+54C0mjpRmODUXXWk4QQ8pO h2BW4+9XuuL/FduwQWE1caJLtflG0GRzfTD2xl4SFC667SC3Bw5aT2ch9FyDAYCG kPS8neDSZkeONx9VftQ5iMKrQV4MxAtC9I1iNHx3eRoSEYScTEacqHAjSqNGyAP9 coEsCH5gXC9vhq13Yyjr1EoWdsabLOV4/alIzjRYGKdpeYHuIz35gBA8qj69Lq69 RnLafzSdNmuWOIO7/QUUhF5EKdh4Ngw+umsTTTYepIXdFWIsBuvzlIMJYSObQVFj BuBjARuuUqm1bDiPGuKhOVSZZ0gVkX96J2LSDIrcmKvjGaa02tX5v5N8Xs+1wRWM fyy1f5IkLWQuwfNKkHNAEDXKCSPHtUWieXkSB7V68EPLwqDIjbB10PgKS1lztbSl 7Ul2nlg/gWjh6dEz1s61uAN4jOB7u7iMKQevriwjedYENaDvNSNAZDphX38KAvtr M0mXCabNnHaoco3dBNRTx8Ztode6+2Fvma4HDfhHVacfk7wzl+k= =0D9S -----END PGP SIGNATURE----- --dm0Jvu7MxzWWFMf/--