From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 1A8905A0279 for ; Mon, 19 Feb 2024 03:03:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1708308192; bh=oL5E/zWlntaZCnvcmjv4hZxgNm1vHsO5k87+KJB3BnM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=a4nlEijF497Sa8s+mb/QBKQ6aD84dzfleV9hyjXNxTqjTNdFGiiUwrnzbgNy6L5cI 39uC5dwRApazyea/JAEexvgEv70IG0kcp0fM5TXi0zrd2V3n4WXGAcJwpDGuRRKtVv iAobYKIQ25c8PXC1iNcMbrwZl1+CBh7ZMM5rXl4u06scS1XeDSqZt5IwqtH4tc3ljD avZNK6hyCNorvJl3/b/JeTB0twAkQiBxVJPJu9QXt7MuEx3mVsYVzCStt/oNtpdlQy PaDRZ9s1ptKpkOClKFO76GkDMYYb2Qhh2HcqOJKhS0KBp8ncAxms0i9d7eZ6fI5FW+ EjSpcAtmxn4hQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4TdQmc3wlKz4wcD; Mon, 19 Feb 2024 13:03:12 +1100 (AEDT) Date: Mon, 19 Feb 2024 12:48:56 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 02/22] inany: Helper to test for various address types Message-ID: References: <20240206011734.884138-1-david@gibson.dropbear.id.au> <20240206011734.884138-3-david@gibson.dropbear.id.au> <20240218215844.767562fc@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jXebSSjcwlyB1WHe" Content-Disposition: inline In-Reply-To: <20240218215844.767562fc@elisabeth> Message-ID-Hash: FDEOZL5Y6VNJJ6H5PGPC64YU6TGIJCV4 X-Message-ID-Hash: FDEOZL5Y6VNJJ6H5PGPC64YU6TGIJCV4 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: --jXebSSjcwlyB1WHe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 18, 2024 at 09:58:44PM +0100, Stefano Brivio wrote: > On Tue, 6 Feb 2024 12:17:14 +1100 > David Gibson wrote: >=20 > > Add helpers to determine if an inany is loopback, unspecified or multic= ast, > > regardless of whether it's a "true" IPv6 address or an IPv4 address > > represented as v4-mapped. > > Sometimes we need to know if an inany is a loopback address, unspecifie= d or > > some other particular kind of address, but we don't really care if it is > > IPv4. > >=20 > > Use the loopback helper to simplify tcp_splice_conn_from_sock() slightl= y. > >=20 > > Signed-off-by: David Gibson > > --- > > inany.h | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ > > tcp_splice.c | 15 +++------------ > > 2 files changed, 53 insertions(+), 12 deletions(-) > >=20 > > diff --git a/inany.h b/inany.h > > index fe652ff7..2058f145 100644 > > --- a/inany.h > > +++ b/inany.h > > @@ -55,6 +55,56 @@ static inline bool inany_equals(const union inany_ad= dr *a, > > return IN6_ARE_ADDR_EQUAL(&a->a6, &b->a6); > > } > > =20 > > +/** inany_is_loopback - Check if address is loopback >=20 > Nit: inany_is_loopback() (and four occurrences below). Corrected, thanks. --=20 David Gibson | 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 --jXebSSjcwlyB1WHe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmXSs4cACgkQzQJF27ox 2Gc3nA/9H61rGl7RtGCdUPVCzTs3pLoxRMdwRUmhxnVxgTi2rnIYvLCuELmd0dbz 8RZrHDKgBakgtOHhC5XnC4DzOf007V8ANII1dHXDh+83vv2Np2pTXsB6SywUTHl5 MAelYxEaldplTTkiCOIEDWfyH9O4yKrjm8k/m6p5h3ZQ0/WtUmjsFUJnVMYp4ZSD peqcKUb0sRCgF5F4CdkdK7wm1593cCVkJLhnpoq4xUa/OUwmgwmi8nK3lp5Tz6Av vZqa6b33ch5oXYEaHUnh7yKenSAbGmppHDBmiEyAmrjJ2EKeAqsUcVy7KH7AB90L qWvPv2tLx/39QyU7jIGyO9/12XT5c814O5EHgVl7vXGfcalZBC/MgAsUjaDCqyCQ BDMPMHJKqk7qjLkSIK8NLawxxVYDjS42qcYM6WtpkgF7jg4DLPx5R5uyDa1uLuoA 72w24Bn/tmhurYREp7xMu4uQvSIUBJ0dxOi/0Ce7n8jFuMMJSSIXdTRwqMNjBRJE mOba1sloTdm/A3V4JdBhrRrQvG6n7ympsJpFqgo9szMbk8vgx3wFeRrW9ZtT2sKe N1/tCwurlRIBxIj+icmit/t4PzPlwPihxG0+5/ktDR0OwpoAekx9Mvq5/v0xXBKW arMmNOOOXzv/u3eBE8P0l6JdRJFpwW58mbTMm0fLRDF/RTLvvCI= =lXxV -----END PGP SIGNATURE----- --jXebSSjcwlyB1WHe--