From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202602 header.b=POQSuAW4; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 5C0035A0269 for ; Wed, 20 May 2026 03:18:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1779239878; bh=DdiePxOIMlQ8h0a1HSCzs18eGYGlHyPR/nU3mHAwk3M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=POQSuAW417lpSmShBY04Lznomp2ZzKwaLgrvB8AO5O19F0XQ/nPY7wZhM11xGq1Nk q/IeUW2Jfo0l75px0kFpY1FZbNDPB8OWKmCaH6oLhjYub9pHxhILdD2mTow55CA5iN V8mz3hnSYKD3qUu9DNzFfR1bBY7udMAxP8rXzNSdjL9f6DzSndRxrBWGTdedB1DVdh qIj6ClPnYKdy+LS+KuZrV+uXDeKcHb0/t9Cyvw9Y46eW3s65bmrc9aT+o4Fdr3QnoB 1EBoeZja7r4Rg1yvH3Iuko0ijE3BCClZE0q//6N0z5q0yKaAokaYh9EmSyjnmaVj4X FMZcMFJSQRnQA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4gKtvV5Z5tz58ms; Wed, 20 May 2026 11:17:58 +1000 (AEST) Date: Wed, 20 May 2026 11:13:43 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 3/3] conf, repair, tap: Document reasons for blocking Unix sockets Message-ID: References: <20260518032243.823768-1-david@gibson.dropbear.id.au> <20260518032243.823768-4-david@gibson.dropbear.id.au> <20260520025213.3dd9e706@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="s+gEmMJ7GJ7h38GR" Content-Disposition: inline In-Reply-To: <20260520025213.3dd9e706@elisabeth> Message-ID-Hash: TCXQZQMG5SXK2T6DGGUPQVFWZ6JZ7GWS X-Message-ID-Hash: TCXQZQMG5SXK2T6DGGUPQVFWZ6JZ7GWS X-MailFrom: dgibson@gandalf.ozlabs.org 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: --s+gEmMJ7GJ7h38GR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 20, 2026 at 02:52:14AM +0200, Stefano Brivio wrote: > On Mon, 18 May 2026 13:22:43 +1000 > David Gibson wrote: >=20 > > Most of our operation is asynchronous, based on non-blocking fds handled > > in our epoll loop. However, our several Unix sockets (tap client, repa= ir > > helper, control client) are all blocking fds after accept(). > >=20 > > That is in fact correct, but for not especially obvious reasons that are > > slightly different in each case. Add explanatory comments to each of t= hem. > >=20 > > Signed-off-by: David Gibson > > --- > > conf.c | 6 ++++++ > > repair.c | 4 ++++ > > tap.c | 5 +++++ > > 3 files changed, 15 insertions(+) > >=20 > > 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; > > =20 > > 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. */ >=20 > Nit I fixed on merge: >=20 > * [...] loop. > */ Oh, thanks. --=20 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 --s+gEmMJ7GJ7h38GR Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIyBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmoNCsYACgkQzQJF27ox 2Gfcsw/zBQP+H5Rtl1aucVty31mjcIsvET7iJ/FrZkILaNoG10L92fwWw4xnyLu9 4a+yZEh8Czya1zaqdda6GDn9jWK0V37UNTlHB9UabHPvTYjjVnIE0QjOUFEsttYG dVvdLWCBS1V5rUiN2U85PKlhcAlAY4b0K2nvisw9A5AB0n4Zw5y9b3up8h4K0A9M 69LMAdNuATGAO+KgxTWLKucPfGIucvNHImX5wIhI+9pa+wr2CWHP28+9u23hRlFS OhTuSUA/tKI9Vq19lEbsu6Yi9Am1b9Y4uKa+dLijLFK7hmWyWoiFOtJAce4qVpIU PY3h3Z7dL7oTpxn9FJBVFujXjh38vPqOM4oNSJzVPpNbdC/8c2Dwx1pW6CwTIUhx UGCduMrC8Oz5bjRRU5U3NP9UsTpiIj4ifzXr45uDeD6mZ1waClvXa8G5DchRTwCX Z+7MAO6fHWZ/CqQRb5qx0o9Bk8jCunF9K6N9fm2lNst1rRUrY2r5DagfRRo+brzQ Y+CV4ZKhe0eM+TDdsZV4yY/w3Cw40mcvIO12D0QZCwwrAN83OWOaSiqPLNQ/cCUz cr+ia6Ku6oCkYxoQHOIENCZCiSQkbKgLp8kODFm/O8gnPLDQ4A5hreJXOG3tKU+D IBiRCZ3u3Q/BjrES9f/MTXXviBr6njIMUOs0ICt8irr2+aP3PQ== =Y/Rj -----END PGP SIGNATURE----- --s+gEmMJ7GJ7h38GR--