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 701965A005E for ; Sun, 15 Jan 2023 01:31:24 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NvbgB6n5Hz4xwl; Sun, 15 Jan 2023 11:31:18 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1673742678; bh=omVHRj6mzFIhkLdDuRuUFBlT+Kf20xdGX/h8IXvtzvk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Uq2zEl3SXjLrU4///X+pMxHKDecFyJQ0TUl7GyWzgFWaxZ1JM5U6Y1+jjdH6ennaM H5T283jBDim7HhRKx/cRpW2e06ehDFn4hedYqqsjtFrMYukH8CrggB+3/TyPOH248b VuTidqeTCmHX+zEqLGyy7s5Cr/42KeEnoVDnheLQ= Date: Sun, 15 Jan 2023 10:22:51 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 1/5] tcp: Make a helper to refill each socket pool Message-ID: References: <20230109005026.24512-1-david@gibson.dropbear.id.au> <20230109005026.24512-2-david@gibson.dropbear.id.au> <20230112190921.7a6bf18c@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ed+nmVMYY3act+Wl" Content-Disposition: inline In-Reply-To: <20230112190921.7a6bf18c@elisabeth> Message-ID-Hash: 4P27DSPX4WXDH4BWCC63XB7PQRQJHF2X X-Message-ID-Hash: 4P27DSPX4WXDH4BWCC63XB7PQRQJHF2X 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.3 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: --ed+nmVMYY3act+Wl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 12, 2023 at 07:09:21PM +0100, Stefano Brivio wrote: > On Mon, 9 Jan 2023 11:50:22 +1100 > David Gibson wrote: >=20 > > tcp_sock_refill() contains two near-identical loops to refill the IPv4 > > and IPv6 socket pools. In addition, if we get an error on the IPv4 pool > > we exit early and won't attempt to refill the IPv6 pool. That doesn't = seem > > sensible, since these are essentially completely independent, and there > > may be value to filling up either one without the other. >=20 > Well, for the purposes of the single error condition that's checked > there, they're not independent, in practice: if we just had a socket > number that's too high, the next one will be, too. This is not formally > guaranteed, though. Ok, I've tweaked the commit message a bit. > In any case, this is indeed more elegant, and also drops a > 'return -EIO' which doesn't really match the "Return: 0" comment. >=20 --=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 --ed+nmVMYY3act+Wl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmPDRzkACgkQgypY4gEw YSIT1w/8Dm0oDYzZcDICVD3nYwQaiAuYrb3tOmBjJK+NTqYKYQwQ8PndlgmbiRYv V1H2ujdb2lh4lmddqqZtr09JouMt6VO9zkt5no9Lc8+St4uuQXfsNY5/x3/AQwfE 388VlkSVshHvpcEg6luobNWDOTEyGH6j5zFePEB/k10X2AaIFJjlNtUi5PkA4U7j R7eoSrHau02uk5F5gP9UNXm2YLXyRo/7a0RPOov4ksLxbc+dU3vFuZpKuqoGoC8o X6FWQp670rZB6DlLUh+E/OQtddM3Q0TZVipmcZyjvR9SmxTBUTpEuPTqpReJhZC2 Uw4C6Hx29TskitOICOEArJDgTQptkL+OWwxfo7oWuMCyd5roVhuYbxmnuupL7XrV MYhv2ak7T3IUssA4S4QaMIJU6wO+YicqH/odRzUGGT03l0DFtx96WNGQjZlVuQFA yjmNRRHRlEa8V1vuLeTznR3AY7SCAuZUbZU5o66UBQwa67ytOE26dF0izzV7OZ9W trXWjDwbIN3HF3YVNwaqZv3QZG7yu6N7D/aBPQDoMfjr9xaA0n56icU4OeRXBARc OaOya80woEcGF6a/Q7l2myfg6cMFi8dWmYKC7wU7iw006ggVG9yEc5Tyw0yFfk01 IGsAdSzwTMYheE91QHaBypuqRv7tnO1bM2T/sfRSIL0cMq+uA04= =Ruco -----END PGP SIGNATURE----- --ed+nmVMYY3act+Wl--