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.133.124]) by passt.top (Postfix) with ESMTP id E7A695A0278 for ; Thu, 22 Feb 2024 13:45:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708605954; 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=xthNOuKvojwmzIFpUXgKMBToS5qvHafFgvC8/vNk8FY=; b=LTD9KXEGyCIEfoPbGX+ddmVlXGG7q33WcghH5lQNFnwGs7kBnRnISmeb24L8+cIKrNG+tg ANSc7Sxzp8vTvgidFZJD1DGZkFnbQoShMivRrgt3MO2GQoLKlioSFf+cnR70oRXvOH8MAI GYPu3ez6bTL5a/5rLjTRwNLgoM+vxrg= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-608--tI1W8DwOF-6SOMc1YDxAg-1; Thu, 22 Feb 2024 07:45:53 -0500 X-MC-Unique: -tI1W8DwOF-6SOMc1YDxAg-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-a35ef7abe08so432743866b.2 for ; Thu, 22 Feb 2024 04:45:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708605951; x=1709210751; 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=xthNOuKvojwmzIFpUXgKMBToS5qvHafFgvC8/vNk8FY=; b=r3ZrkPHJKzF9zX1xOFMLqHRB/E8kxCVv18ByqPvl4Jv4VFt02EuZ10BckAbkFR0d7q CNg/9EBik4o91Bzo8wvlQn1REitom5pnTbj7JvABzZUh9Umxd2Ttg/vZOs0tdYFuw80g IlHsC7Tb9zfVSUYvktKrPsrDbVdTy9T8azyBtAKxhLgtfJk4l9yjTKSqPL3/4dHpFPTs eGknAwiRPMeqTUsg4TlB+jXqLitFlC1283OkvS5xbcNUdhUp7H4/+TVg0fDgdkRK1n5/ EA6IlJAHR52SmWd5fFQWCfVOLH7Cjw74m+mI9CzGYEcydDNEJ5JEg1CRY2xdJ+0ZQs1s A0oQ== X-Gm-Message-State: AOJu0Yweed4wchoHQbvt24NPKPr3t8fenzvhdKeuMUaX+k5YaDaaeZXx aGWKdb+Ov0/Mb+fH6VHH6au3I4Guko0z5jQ4lLCUYiVvlpSsm+Lhx3JxzzKSyIItnzuiGEjDPzW 7ulVcydLDBmq2GlVwaopxS6Unv7Ey4xkUCg1f0wuEiiKubG8W63FkPjBWkbBo X-Received: by 2002:a17:906:6bc5:b0:a3f:baa:b52b with SMTP id t5-20020a1709066bc500b00a3f0baab52bmr5749998ejs.26.1708605951660; Thu, 22 Feb 2024 04:45:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IHwDXVowJTMv2E4EWk2/8xS8ArhDJxDAunyHmMZpZqvHvE3tnQaFIlkGJzgIDbmJEiMPD8p/w== X-Received: by 2002:a17:906:6bc5:b0:a3f:baa:b52b with SMTP id t5-20020a1709066bc500b00a3f0baab52bmr5749985ejs.26.1708605951340; Thu, 22 Feb 2024 04:45:51 -0800 (PST) Received: from maya.cloud.tilaa.com (maya.cloud.tilaa.com. [164.138.29.33]) by smtp.gmail.com with ESMTPSA id l20-20020a1709067d5400b00a3e85909a1csm4215967ejp.182.2024.02.22.04.45.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Feb 2024 04:45:50 -0800 (PST) Date: Thu, 22 Feb 2024 13:45:16 +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: <20240222134516.05794f58@elisabeth> In-Reply-To: References: <20240219075651.1360229-1-david@gibson.dropbear.id.au> <20240219075651.1360229-5-david@gibson.dropbear.id.au> <20240221220910.159ca045@elisabeth> 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: EJUQO6CSBTKIK364LRMUHTGHOES4UKST X-Message-ID-Hash: EJUQO6CSBTKIK364LRMUHTGHOES4UKST 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 Thu, 22 Feb 2024 08:44:48 +1100 David Gibson wrote: > 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: > > > > > 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. > > Oh, it's supposed to be an abbreviation for "negative". Funny, I just found https://en.wiktionary.org/wiki/-ve#English, but I never used "-ve" like that. Well, for consistency, I would change this to "negative" anyway. -- Stefano