From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTP id 83DFE5A027D for ; Wed, 21 Feb 2024 22:09:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708549789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZHiP9oD9sjykA03wXzwb29xQOH5cc0zvKjkdxb9Kmk0=; b=fsbA3/KxYamhycNfTCw7CZYQAGSptxX0Rre9GRXARk9nZaTnA8RGuPb1sr3tS306KgFyUr kkOHRf1UHrhKILdBZ5R0sOUF1PuRwnN1WUMCctoXVwmbHYWl5hjWGrQA2BgrJkHlROE8C2 hfADbha66IkU3CEuw8pwtNETxGYa2jw= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-169-NfSmQw5aNdGV4ZquIuMGow-1; Wed, 21 Feb 2024 16:09:48 -0500 X-MC-Unique: NfSmQw5aNdGV4ZquIuMGow-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-512a00a2629so4412133e87.1 for ; Wed, 21 Feb 2024 13:09:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708549786; x=1709154586; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZHiP9oD9sjykA03wXzwb29xQOH5cc0zvKjkdxb9Kmk0=; b=UemtR9zzIHdpQEBqcLoyymvuHtJiXHKjnB4lzC5146r6AnS3Di5vh0QfzRrAFTcKe0 X83xlH9IMH+YvndKoKSAWr0CJmBE7qqz2QP6WI7eDlFLRyISMf6PGcECz4syzTX9NhMA +T6SL//MSC8lrheIV3YcTSeMdGEzB0oaK5HGj1yV/Foc3Aa5XtZVpdMP+SizTlK4KwtJ dtxhnjYKdirZ2pHmdYOOlovE3+Cf/5HaH3rtOvFpqGmH0YY+n/Ww7kBkVClnQ9azThwC Wb6Y7z34LqLJaMGTg4KC7mGOHNCJSZgZuV86dm40nvfIEPj908WJVHLc1mB1li+Fhzrw TXmA== X-Gm-Message-State: AOJu0YyUSQmz5kfHYMPe3mVt0nJxFIp9trT9fTEDBcvHeXLjGQVt0V4r uwXoD44r/mGKPMlEgxIV6NYKIU/J/qJ7c0Jmvxh4KVnoGgSUGbK83egIYR9rCXm1n5y7mEZK/bP aMYcUdo2fuCrPLXfmhvn+WNmWTk9c31UH5KMHuwoqRjwJZ811PJs2DN1PfN2v X-Received: by 2002:ac2:4dae:0:b0:512:a97e:daa6 with SMTP id h14-20020ac24dae000000b00512a97edaa6mr8104245lfe.36.1708549785962; Wed, 21 Feb 2024 13:09:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGi94z7Qd/nepYetrjEZSQGXvmQivy9fyLvis3jusF2/iiWTGWExgYhqWiwHZLXBzVNUB72qw== X-Received: by 2002:ac2:4dae:0:b0:512:a97e:daa6 with SMTP id h14-20020ac24dae000000b00512a97edaa6mr8104232lfe.36.1708549785438; Wed, 21 Feb 2024 13:09:45 -0800 (PST) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id p27-20020a056402501b00b00562d908daf4sm5022799eda.84.2024.02.21.13.09.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2024 13:09:44 -0800 (PST) Date: Wed, 21 Feb 2024 22:09:10 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 4/6] tcp, tcp_splice: Issue warnings if unable to refill socket pool Message-ID: <20240221220910.159ca045@elisabeth> In-Reply-To: <20240219075651.1360229-5-david@gibson.dropbear.id.au> References: <20240219075651.1360229-1-david@gibson.dropbear.id.au> <20240219075651.1360229-5-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.36; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: Q55LBVI5FYEQTHUAPPKO5SAHRY7OZPD2 X-Message-ID-Hash: Q55LBVI5FYEQTHUAPPKO5SAHRY7OZPD2 X-MailFrom: sbrivio@redhat.com 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: On Mon, 19 Feb 2024 18:56:49 +1100 David Gibson wrote: > 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 > --- > 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 error Is -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. -- Stefano