From: David Gibson <david@gibson.dropbear.id.au>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: passt-dev@passt.top
Subject: Re: [PATCH v2 3/3] conf, repair, tap: Document reasons for blocking Unix sockets
Date: Wed, 20 May 2026 11:13:43 +1000 [thread overview]
Message-ID: <ag0KxzpNdvs8SJyX@zatzit> (raw)
In-Reply-To: <20260520025213.3dd9e706@elisabeth>
[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]
On Wed, May 20, 2026 at 02:52:14AM +0200, Stefano Brivio wrote:
> On Mon, 18 May 2026 13:22:43 +1000
> David Gibson <david@gibson.dropbear.id.au> wrote:
>
> > Most of our operation is asynchronous, based on non-blocking fds handled
> > in our epoll loop. However, our several Unix sockets (tap client, repair
> > helper, control client) are all blocking fds after accept().
> >
> > That is in fact correct, but for not especially obvious reasons that are
> > slightly different in each case. Add explanatory comments to each of them.
> >
> > Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> > ---
> > conf.c | 6 ++++++
> > repair.c | 4 ++++
> > tap.c | 5 +++++
> > 3 files changed, 15 insertions(+)
> >
> > diff --git a/conf.c b/conf.c
> > index 029b9c7c..5c7dfea1 100644
> > --- a/conf.c
> > +++ b/conf.c
> > @@ -2084,6 +2084,12 @@ static void conf_accept(struct ctx *c)
> > int fd, rc;
> >
> > retry:
> > + /* Currently we perform the configuration transaction more-or-less
> > + * synchronously, so we want the accepted socket to be blocking.
> > + *
> > + * FIXME: We should make the configuration update asynchronous, like
> > + * most of our operation, so a misbehaving configuration client can't
> > + * block the main forwarding loop. */
>
> Nit I fixed on merge:
>
> * [...] loop.
> */
Oh, thanks.
--
David Gibson (he or they) | 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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-05-20 1:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 3:22 [PATCH v2 0/3] More caution with NONBLOCK flag on " David Gibson
2026-05-18 3:22 ` [PATCH v2 1/3] treewide: Add SOCK_CLOEXEC to accept() calls that are missing it David Gibson
2026-05-18 3:22 ` [PATCH v2 2/3] tap: Report accept() errors David Gibson
2026-05-18 3:22 ` [PATCH v2 3/3] conf, repair, tap: Document reasons for blocking Unix sockets David Gibson
2026-05-20 0:52 ` Stefano Brivio
2026-05-20 1:13 ` David Gibson [this message]
2026-05-20 0:52 ` [PATCH v2 0/3] More caution with NONBLOCK flag on " 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=ag0KxzpNdvs8SJyX@zatzit \
--to=david@gibson.dropbear.id.au \
--cc=passt-dev@passt.top \
--cc=sbrivio@redhat.com \
/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).