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: > > > 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. > > 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. > -- 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