On Wed, Feb 21, 2024 at 10:09:10PM +0100, Stefano Brivio wrote:On Mon, 19 Feb 2024 18:56:49 +1100 David Gibson <david(a)gibson.dropbear.id.au> wrote:Oh, it's supposed to be an abbreviation for "negative".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. 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. Signed-off-by: David Gibson <david(a)gibson.dropbear.id.au> --- tcp.c | 24 ++++++++++++++++++------ tcp_conn.h | 2 +- tcp_splice.c | 16 ++++++++++++---- 3 files changed, 31 insertions(+), 11 deletions(-) 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 errorIs -ve an abbreviation for something or just a typo? It sounds like the voltage of the emitter in a BJT transistor.Must be a typo, the rest of the patch looks good to me, I can also fix this up while applying.Go ahead, please. -- 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