From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id B0AFF5A027E for ; Wed, 21 Feb 2024 22:45:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1708551955; bh=kAEbUv4YgqXnjABXpLN8bn2q1KNqRLvtb4GuNl7eUWk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hY5NcSBo/aZ4sfJkzJ/hRRbFCB2ooG6UwWU6il3DbAjsOZG88H+yfmmUuN9+JWmUj W249O8gJgC23ApUDwt0fxIL3CXVfXFnM+R8o9SMPMAE+6Tl+1aYQoPqJPuoEYomvd7 4Qi/NQV/NJpYdfwNW2jzQMGIJkAsYtIBWJnAcZ9A+nncGojYbHD3iBRY9DOBMJ7fOv jKuPYA+tAp3koGZ+SMO/leSkAHqGbB06AM9uT//LHiJCftHhszGeFVR1v8PExsIpi9 O4RcZhMeUvojYX7pcd5rnvOt/VmOTp0QBFi5sSzkcHJTiNj2qRrRHRNSteOP8l4QGX av1VojtaIXn/A== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Tg8wM0sQPz4wcq; Thu, 22 Feb 2024 08:45:55 +1100 (AEDT) Date: Thu, 22 Feb 2024 08:44:48 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 4/6] tcp, tcp_splice: Issue warnings if unable to refill socket pool Message-ID: References: <20240219075651.1360229-1-david@gibson.dropbear.id.au> <20240219075651.1360229-5-david@gibson.dropbear.id.au> <20240221220910.159ca045@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="u5nq+xoX4Y2oa8po" Content-Disposition: inline In-Reply-To: <20240221220910.159ca045@elisabeth> Message-ID-Hash: JZFSQHXJ3GQRFFENKMTFLKJBEA2OKISL X-Message-ID-Hash: JZFSQHXJ3GQRFFENKMTFLKJBEA2OKISL 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 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: --u5nq+xoX4Y2oa8po Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 21, 2024 at 10:09:10PM +0100, Stefano Brivio wrote: > On Mon, 19 Feb 2024 18:56:49 +1100 > David Gibson wrote: >=20 > > Currently if tcp_sock_refill_pool() is unable to fill all the slots in = the > > pool, it will silently exit. This might lead to a later attempt to get > > fds from the pool to fail at which point it will be harder to tell what > > originally went wrong. > >=20 > > Instead add warnings if we're unable to refill any of the socket pools = when > > requested. We have tcp_sock_refill_pool() return an error and report it > > in the callers, because those callers have more context allowing for a > > more useful message. > >=20 > > Signed-off-by: David Gibson > > --- > > tcp.c | 24 ++++++++++++++++++------ > > tcp_conn.h | 2 +- > > tcp_splice.c | 16 ++++++++++++---- > > 3 files changed, 31 insertions(+), 11 deletions(-) > >=20 > > diff --git a/tcp.c b/tcp.c > > index d49210bc..ad56ffc3 100644 > > --- a/tcp.c > > +++ b/tcp.c > > @@ -3007,8 +3007,10 @@ static int tcp_ns_socks_init(void *arg) > > * @c: Execution context > > * @pool: Pool of sockets to refill > > * @af: Address family to use > > + * > > + * Return: 0 on success, -ve error code if there was at least one error >=20 > Is -ve an abbreviation for something or just a typo? It sounds like the > voltage of the emitter in a BJT transistor. Oh, it's supposed to be an abbreviation for "negative". > Must be a typo, the rest of the patch looks good to me, I can also fix > this up while applying. Go ahead, please. --=20 David Gibson | 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 --u5nq+xoX4Y2oa8po Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmXWbs8ACgkQzQJF27ox 2Gd4GhAAlP1yo+/xbb8sbkl1ssoFX1ltvsRkfjz15Kr7Ks8JeFR3S/PTl+jlmYJK DaOaTwgLqqEotTxT+ncsCPk/e3ZckD3/A58lRhFFDrJSpQGJA8GGUTQ8xsud5pZy fcop7GqA/ti2JeLCbCaUkmyi2L9Pp52nz/zfDJM64BpAU02NQe6oqoUTXVfBVOUO fFW8lA0eiM3EoMlQpRrVo/VX7mUpD5oi+yBR5GtiJxqKqpZmM6VF4/xTjfo0SrL7 QYKn7Wrh2ZmBet42HscYJ2EZGuLjje6tVA1aaUofUXP7AcbXsi2ydETrSpXeTmj/ zTydatxmoaacJJF0FfVoEiSCUJ8MtfmU54l25qaZYsLBIUmS/G8iRpdtGEf8IXvu JIzCJbYpLuDYTvUxkTIs1YoqcKGJvHtAa3C+QbEfHVgcqfy5INjiPAq8gzNH4D8W 9tqFMrz8B5/EvWSpcCIH35xKQL0UWKBVH6ZxI8yvEXEcGbgYr+Iwoc0zwwE8lgWZ qIkSKflHaIr1qTwYRZSFbJFv1u8LBPz37VtOfN28/KDFCsQlXMkznwiT8A/ggPhO pQsHaIFmU6Nma1dazfVXe4Knu05mEEQSJrZYMSPgq8OlAq3ulPyifRnJ8knDvi9A Ps22w5cYQBnOGQf/O8fZjZawEWFbtCoItwiUkXab7KJ9dmtoJ1U= =nVC1 -----END PGP SIGNATURE----- --u5nq+xoX4Y2oa8po--