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=202510 header.b=yzdUZv07; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id B0AE05A026F for ; Thu, 30 Oct 2025 05:00:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202510; t=1761796849; bh=OA7/Vd6TRuHQjOT99JKSaWlgiLC6kpPe5Dyifz1giu8=; h=Date:From:To:Subject:References:In-Reply-To:From; b=yzdUZv07wpMbwYV4LDmtPiz5EJrCRPU2QPSKUJICuXJN9W8NqTiMKgmLR/BWGmQqp ZjjcVpUZsQTpl3l7hgUz7qWN0p4fFT0RbG5l0xb69wc0pgRa3XWhoqofwdD+ee1SUe WuDBohxiBNyPpG0ri4kY95xz918sofH3w/h9gq+5QQmOxe+i1pyW5DLJ5xSPDDXOGn fWKoci2KQ2QFo2qsTngEvaP0762XzH9x52Kag0nd1J/VLhSYMqKl83CEHeDalV4095 FQY5RgWUcinDOK9FDBEdTn9byWLod8LReItkltlXcUkC/d9OJe0/7rKoy8oLZyFgX1 UJIeDQ5njCKRQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4cxr4d3NPMz4x1h; Thu, 30 Oct 2025 15:00:49 +1100 (AEDT) Date: Thu, 30 Oct 2025 14:58:58 +1100 From: David Gibson To: passt-dev@passt.top, Stefano Brivio Subject: Re: [PATCH v3 0/8] Reduce differences between inbound and outbound socket binding Message-ID: References: <20251029062628.1647051-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WF/dxCJbJgMLjIZc" Content-Disposition: inline In-Reply-To: <20251029062628.1647051-1-david@gibson.dropbear.id.au> Message-ID-Hash: JFCO3B5AQE4HEBXVGXAWEFFXKYLGXY4R X-Message-ID-Hash: JFCO3B5AQE4HEBXVGXAWEFFXKYLGXY4R 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 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: --WF/dxCJbJgMLjIZc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 29, 2025 at 05:26:20PM +1100, David Gibson wrote: > The fact that outbound forwarding sockets are bound to the loopback > address, whereas inbound forwarding sockets are (by default) bound to > the unspecified address leads to some unexpected differences between > the paths setting up each of them. >=20 > An idea for tackling bug 100 suggested a different approach which will > also reduce some of those differences and allow more code to be shared > between the two paths. I've since discovered that this approach may > not help for bug 100, but it might still be worthwhile for the clean > up. >=20 > Patches 1..6/8 are cleanups which shouldn't change behaviour, and I > think are ready to merge. 7/8 is (arguably) a behavioural change, but > I've made my case for it in the patch comment. 8/8 needs some further > consideration, since I've discovered it does not fix bug 100 as is, > I'm including it for advance review, though. Follow up on 8/8 now I've looked into SO_BINDTODEVICE semantics more clearly. Unfortunately this approach won't work to fix bug 100 [0]. I still think the change is useful for the internals and it may also help with some other bugs such as 113. So, I don't think the code of 8/8 needs to change, but the comments and commit message do. Here's my plan: - I'll wait for review on this draft - If it needs a respin, I'll make those doc changes in the next version - If the series doesn't need a respin, go ahead and apply 1..7, and I'll send a revised 8/8 separately. [0] https://bugs.passt.top/show_bug.cgi?id=3D100#c8 --=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 --WF/dxCJbJgMLjIZc Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmkC4nEACgkQzQJF27ox 2Gf9Mg/+PF5aTZ43oXGjmQUxQyEBXR+aWxHb7jLg/Vs3jghLpHONjzLJ1jXOQ6r8 62U5YR20f2yQvLqDN/EiPjUr2TDw4vdtokl6LedzZs4nc8PfEZs/3RsSJybscLL8 fZyLLT+kQ9rG6NkgInQvLEHxLn/G8oaeODn6YVMAc06bpCVWyJA/lONuTGYrzJf/ rnoxdJuwWFQR6ve6f9jpgQyEdEnSSV44LuzB1puUyYQBoqE9yYzrqB6U0PRMekQy 4V8h8ESjcedCP2p2nXYdMJgp/kwTscgxYfq5gGH6MAMmjdRPBIu3SgynX4O1DCpE qw57BO/I4CMwQTkW8fKRAids3EhyB0lq5+ZXM39wz5F/HZdzqEP9cx78I2/K2i7e iI5eA8ka5U3fpElHj4eYs6zuR3uW7BaChjrr03agL4jDI2Ms4hmDxo/bPCJlw9o7 m+y+Bt5zShGiBD6tkeALXI1Yqi6OadUHJzDKEwMsFp0vu/tgDMsb++PBq4itSPXd Blvc4lyiyYwlsJRkJbG/JM9H1QdPnJZyTzADCgAKXv9mRaJ4cbY8fetetpsvdynt 3yp+T7RwmgqK/Dc6KU9pCUmjdLwQkEqeqeR/VRCHHBoJx9jhbzdwlGj3CSuQWKlg OOtM+2s2ApVQ92TjU89ym0wJgiP667Gkcui1PBS1xNfPDCRbOeY= =ME6g -----END PGP SIGNATURE----- --WF/dxCJbJgMLjIZc--