public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 4/6] tcp, tcp_splice: Issue warnings if unable to refill socket pool
Date: Thu, 22 Feb 2024 13:45:16 +0100	[thread overview]
Message-ID: <20240222134516.05794f58@elisabeth> (raw)
In-Reply-To: <ZdZu0J0_FkZJSMJi@zatzit>

On Thu, 22 Feb 2024 08:44:48 +1100
David Gibson <david@gibson.dropbear.id.au> 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 <david@gibson.dropbear.id.au> 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 <david@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 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


  reply	other threads:[~2024-02-22 12:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19  7:56 [PATCH 0/6] tcp: Improve error handling around socket pools David Gibson
2024-02-19  7:56 ` [PATCH 1/6] treewide: Use sa_family_t for address family variables David Gibson
2024-02-19  7:56 ` [PATCH 2/6] tcp: Don't stop refilling socket pool if we find a filled entry David Gibson
2024-02-21 21:08   ` Stefano Brivio
2024-02-21 21:42     ` David Gibson
2024-02-19  7:56 ` [PATCH 3/6] tcp: Stop on first error when refilling socket pools David Gibson
2024-02-19  7:56 ` [PATCH 4/6] tcp, tcp_splice: Issue warnings if unable to refill socket pool David Gibson
2024-02-21 21:09   ` Stefano Brivio
2024-02-21 21:44     ` David Gibson
2024-02-22 12:45       ` Stefano Brivio [this message]
2024-02-19  7:56 ` [PATCH 5/6] tcp, tcp_splice: Helpers for getting sockets from the pools David Gibson
2024-02-19  7:56 ` [PATCH 6/6] tcp: Don't store errnos in socket pool David Gibson
2024-02-21 21:09   ` Stefano Brivio
2024-02-21 21:45     ` David Gibson
2024-02-27 14:22 ` [PATCH 0/6] tcp: Improve error handling around socket pools Stefano Brivio

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240222134516.05794f58@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).