From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=EWyqiIBv; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 322DF5A0262 for ; Wed, 20 May 2026 02:52:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779238344; 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=RIWKUrhXw00V3sUp9UBgDyVx9mzXwWl9xOxdVborV0M=; b=EWyqiIBvumzsxMGwTAXMZK5lnVD05x6aEAxsYK4AoXtMWWQ2odPrG0zG4nlVlTIC+dLoRz +UiqmaMYUb+VRi6tU/fqmueVYK5nNJiaT/lVPLX2lOuebOguoWqNCRK93CeHOAk5NIX9sr aBRXfqoISykCC2/IFgoKq45ZubEBjR8= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-401-j80Q1Xi3O5iTzcHuhJ1b5g-1; Tue, 19 May 2026 20:52:22 -0400 X-MC-Unique: j80Q1Xi3O5iTzcHuhJ1b5g-1 X-Mimecast-MFC-AGG-ID: j80Q1Xi3O5iTzcHuhJ1b5g_1779238341 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-45e73a4f1dfso2708726f8f.0 for ; Tue, 19 May 2026 17:52:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779238341; x=1779843141; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RIWKUrhXw00V3sUp9UBgDyVx9mzXwWl9xOxdVborV0M=; b=lw00uE46FxVSWxDIajYk1Fjm/aaGRRsKUgtHQh9ZqYKXZsXbyanTEoqvwhqRdXoT7X MkqLRKGsKUA5ZXnd9rTDRWuG8yp2WizGxrW3duMVg3J72F6yBxSgwp0Yug2IQJ3Z4XdT PTBK+JSpsYC+nWNr08mEdCW7Ab0W4OSMZ0jZWbFSnrQDL5iG/feWWe6YHTYT0gGwMTm+ wjjMuUx4ENrmTzygaBgZtu5aIE7fHRHL3Pn4ZwhA/Y/9e62b5IsGJwz45hkZBGYGZMco L6KqJhgAiHOT1UaTdKQZtdxpnLpgqALbKTft+Jxchh5gJdFtbcoVntIYEhUC5e3IjvqO C6KQ== X-Gm-Message-State: AOJu0YwR0QKPuNlfTLbHBwu/NxCHV2Ak5B8KFK0Vc6Zi4GUb7Z2V//G6 mhpkSCNN/vIw/y9CudqfP0m0DbVkdrelfLOv7T8pvIoK5XcswfWpGLHJTTQLC8qztWmX8aQDznN yJWw2tFaCTbhLTaQAKCPFygr+vhmpzI+f5mLI8krGGmcCV9d7RMj7hA== X-Gm-Gg: Acq92OHzn9E2cVVHwi4Y5n5KwtlksCmVaKZbnf8+ku6hARM0oA4CbZKmLjbfbHH6q9m R6ad/0voif+upXgkwho5kXd9MJhS01cKBsvij6Ea8N7T/IY54LRMxOdG8NR6LKINWq+909Vo29l nMBjUZ1paRB1qT88DU3fD0qzS3IZRlkppk+ugy15e097aPrEiQg7Pmmh+PmQP1Xq4jtjal0SXS1 X4O7GJ+EjlTZ4n48coE74ZL4bWlURgYzoo27gULVyUg3tePkyfhAW0JtPE5W9RNDxs9fFAj7w+a YtZ+z/EycTc2e+IB1gSv/es3NbLqGL3MdfnjarSbPFndb70OVrDYBX8buDAyCRmDjCDfJmie+v9 wNtKUz6YNUENiuievf/Rgc4TngfAtFrRU X-Received: by 2002:a05:600c:858d:b0:48f:e230:80a2 with SMTP id 5b1f17b1804b1-48fe65148e1mr266151675e9.32.1779238341087; Tue, 19 May 2026 17:52:21 -0700 (PDT) X-Received: by 2002:a05:600c:858d:b0:48f:e230:80a2 with SMTP id 5b1f17b1804b1-48fe65148e1mr266151565e9.32.1779238340712; Tue, 19 May 2026 17:52:20 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490225bf8d6sm52102465e9.13.2026.05.19.17.52.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2026 17:52:20 -0700 (PDT) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v2 3/3] conf, repair, tap: Document reasons for blocking Unix sockets Message-ID: <20260520025213.3dd9e706@elisabeth> In-Reply-To: <20260518032243.823768-4-david@gibson.dropbear.id.au> References: <20260518032243.823768-1-david@gibson.dropbear.id.au> <20260518032243.823768-4-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Wed, 20 May 2026 02:52:14 +0200 (CEST) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: zvo-_MKraFi0RnfFYpab9rc6HzBDb_A4OGFP3U7_4Jg_1779238341 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: AP4B25IVJFEF2BVGOZ4V3JVBCX3AWGTD X-Message-ID-Hash: AP4B25IVJFEF2BVGOZ4V3JVBCX3AWGTD 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, 18 May 2026 13:22:43 +1000 David Gibson 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 > --- > 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. */ -- Stefano