From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 74CE15A004F for ; Fri, 05 Jul 2024 02:06:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1720137980; bh=f4auJo6tX7maZJqYGSDKBA4ONG1OBgI5B/V8d4HgUK8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AK87R6cVAbV8nJtFfps50a6QiSUbefpRaDNj65XuILX18RaMCd0OaM9pTdgaZiG0k 9Y3znKtStBfohDBIUptMFlph+DiPD6bMOoF1Cmp0oaTw8RwA/lwHbDvR48P4BiMn5w Y3CYhGOkb8VKLZW94KNLXjUpeKLcDNyCaB/PS4z8NqLOea5HMHcfxqP+iCNrmAUJlf mNgIDyIxInA8FN6Oig7KTTDOBdHgraOq3LVMu03Cevaao0LS8Zfmb2XGcoxvlbcNqC SrQao2VZekDs0anMd4kYEQj2TmJilh8Qr0/Fm7I1+0206qv2eScB6BnCYzMLnrbbns WCsGgqgswE41w== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WFYhX4Pc3z4wnx; Fri, 5 Jul 2024 10:06:20 +1000 (AEST) Date: Fri, 5 Jul 2024 10:06:12 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 10/11] contrib: Add program to document and test assumptions about SO_REUSEADDR Message-ID: References: <20240704045835.1149746-1-david@gibson.dropbear.id.au> <20240704045835.1149746-11-david@gibson.dropbear.id.au> <20240704232121.60bcebee@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B0uqt6zkCavAwSA5" Content-Disposition: inline In-Reply-To: <20240704232121.60bcebee@elisabeth> Message-ID-Hash: P35Z2ZMO6UVAGVYWETEPTQJMRSL5BCRT X-Message-ID-Hash: P35Z2ZMO6UVAGVYWETEPTQJMRSL5BCRT 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: --B0uqt6zkCavAwSA5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 04, 2024 at 11:21:21PM +0200, Stefano Brivio wrote: > On Thu, 4 Jul 2024 14:58:34 +1000 > David Gibson wrote: >=20 > > For the approach we intend to use for handling UDP flows, we have some > > pretty specific requirements about how SO_REUSEADDR works with UDP sock= ets. > > Specifically SO_REUSEADDR allows multiple sockets with overlapping bind= ()s, > > and therefore there can be multiple sockets which are eligible to recei= ve > > the same datagram. Which one will actually receive it is important to = us. > >=20 > > Add a test program which verifies things work the way we expect, which > > documents what those expectations are in the process. > >=20 > > Signed-off-by: David Gibson > > --- > > contrib/udp-behaviour/.gitignore | 1 + > > contrib/udp-behaviour/Makefile | 45 ++++ > > contrib/udp-behaviour/common.c | 66 ++++++ > > contrib/udp-behaviour/common.h | 47 ++++ > > contrib/udp-behaviour/reuseaddr-priority.c | 240 +++++++++++++++++++++ > > 5 files changed, 399 insertions(+) >=20 > I reviewed these (10/11 and 11/11) a bit lightly, but they look sane to > me. I just wonder: wouldn't it be better to have > contrib/linux/udp-behaviour instead, so that it's consistent with the > other stuff unter contrib/ (project names, kind of)? Well.. if we ever port to something non-Linux, we'll need the same socket behaviour there. Indeed, that's one reason I think having these test programs is valuable. So I don't think 'linux/' is a great pick. In some ways contrib/ isn't really the right place for this. Maybe it would be better under doc/? But at the moment that's more user facing than developer facing documentation. > By the way, I reviewed everything else except for 9/11. That will take > me a bit longer. And for the rest, I just have nits that I could also > take care of on merge. >=20 --=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 --B0uqt6zkCavAwSA5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmaHOPMACgkQzQJF27ox 2GdsvQ//W66u1Ubm7uDK0onUGQhXnLRU3/zQYvjaSkG8k2kZqNawu0GFBHtyqjBA BKjPvghgQaJ+ZuCSd1Loy3tzgLMqh8HyTDzVV+qzWuLxY6KRduNYhB4TITjdrrDC XCTkf2amRQdVCHKAHApMPdlWUcU+DbprH3GFbfigR6lavpk5wxlCsOos0HVzCyLZ pG0D5q7zkVQDBgGB98dHqWDYgZwBTKOX8XsGRUGKkjitKgDFezlJiaEQCmHNOvip hJ1K6KnVCYRVjlzFknb/+4yFHYL6LA/pMEtXPTqa2ypgZymNIkeMMWlUA1AkPmd0 rTVOwK5GePh/grjFyqeO9p6zvufa9PNIkVWr3WoyZc75ENUljgkvIxXCupYMjh+/ kygkqJV/IgLBiN0SylxkwuC77FE/P6odgbZt5nGA2oQf0+xkCoMKcvpH8eSDxeTC 2L6dQuXiJ8DYON7iMI1yFW6KfmADP3pcN31zXecHFHilzAEMgtQZEVp2NSSB20Yi ZwWPGwwkPIgkQEt4Xf1C8Ds1VylJvIRuDKYGp8Xix058nEmVGOUgOvJ0DbcfOQC7 HaIFexjzWvJcYSstAWtf6Lm3rMqFBTxc/mI8uhJ24nglUWUUjeB7ulP8jUFOlqvr 82wnvrfK8z+CI5YT2BiRx4I3YvNNU6RASunfvsu3mna9uLZqU0Y= =88eo -----END PGP SIGNATURE----- --B0uqt6zkCavAwSA5--