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 4F0D25A026A for ; Fri, 25 Nov 2022 08:17:23 +0100 (CET) Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4NJR5C6jSMz4xN9; Fri, 25 Nov 2022 18:17:19 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1669360639; bh=PdUAyz5/4dYZDyttdSgoZmyJD7ZJuh/4BXYXI7nGNpo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Qe7mGlaedRH+zLkkVaf9/u4436w7wphZHxVi9cGqedp0hDneRQ6IrLe2EbKaq+E/Y ulBgssEtp9u9U0N5m9XZu910mMmDExjaL5LtS9x3gpZ4FRSKmi9JwiBygCHOvCRZqt hhzXh7q633syb+M5hmYxiSy8NkgYEmNFvMWSNtss= Date: Fri, 25 Nov 2022 18:10:02 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v2 13/16] udp: Add helper to extract port from a sockaddr_in or sockaddr_in6 Message-ID: References: <20221124011659.1024901-1-david@gibson.dropbear.id.au> <20221124011659.1024901-14-david@gibson.dropbear.id.au> <20221125024809.14ad1a30@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="y2vt4A46iVw0eazR" Content-Disposition: inline In-Reply-To: <20221125024809.14ad1a30@elisabeth> Message-ID-Hash: LA5PRTMBD4WKFFDMKDCY755U74I3OR7I X-Message-ID-Hash: LA5PRTMBD4WKFFDMKDCY755U74I3OR7I 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.3 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: --y2vt4A46iVw0eazR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 25, 2022 at 02:48:09AM +0100, Stefano Brivio wrote: > Nit: >=20 > On Thu, 24 Nov 2022 12:16:56 +1100 > David Gibson wrote: >=20 > > udp_sock_handler_splice() has a somewhat clunky if to extract the port = =66rom > > a socket address which could be either IPv4 or IPv6. Future changes are > > going to make this even more clunky, so introduce a helper function to > > do this extraction. > >=20 > > Signed-off-by: David Gibson > > --- > > udp.c | 26 ++++++++++++++------------ > > 1 file changed, 14 insertions(+), 12 deletions(-) > >=20 > > diff --git a/udp.c b/udp.c > > index 1db55e5..a79e5ca 100644 > > --- a/udp.c > > +++ b/udp.c > > @@ -498,6 +498,19 @@ static int udp_splice_new_ns(void *arg) > > return 0; > > } > > =20 > > +/** > > + * sa_port() - Determine port from a sockaddr_in or sockaddr_in6 > > + * @v6: Is @sa a sockaddr_in6 (otherwise sockaddr_in) >=20 > Missing '?' Fixed. --=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 --y2vt4A46iVw0eazR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoULxWu4/Ws0dB+XtgypY4gEwYSIFAmOAakMACgkQgypY4gEw YSJtnBAAlz7BGt5vtroNH2+pz0zoO4IRbdlXcLdhSwUL/hiPiMpC+iTRCUfYbPRA H+88a4HzeCGMvAE2EKKf56rb0Yaaex2wLLJ3+asxUrFScLzMeTbkw1nBweXXHcUr ksOf1KYuSF87dRjFlX5MGDlVAVHOhllaKvRd/P1LBLw/Hfp2vfy/Qq3rg50ZVWaD ob9gRRH4nTsJFSeJaHhyGnLFP5xLZp/n4rALrWqhsyCUd4ZfS/xPWjQ6huXYFc3G 5amDuLJV+2f1hX3xH7O9q/WGFB1Frtd3AHRBPjo39b7DHrqn+by3mBc1ePHKetq0 rzWiQHBZRDGIkg0kCScWGe34XjVYl6HYq/NsROt5lX/JC/P/Hz+qxqmHoov1wAAu Gg1YnKqdG5sc0fhMI3aB75ZFh1v5uEyNL/1NKNqGxQPN/z9qyzwmS9U0T3AHGS4v om61G38fOOCI+G8GyU7DaJaNMrBtFc+czWNe/B4MRwQI+W4P94jQ4VCq29mPs7vC c0I8SPtfFDcXN6stqnpdJHILvVAED5rN9z53TBHP7dxvWUvFwZiPR9SxhdawYnDM TKs+gHAT5bdDATxWoEmu6YgI3xAiE32PBrVAIqD9ItJToB04vWdP9qSxQeBR0gLi a9IuY7lZiv8+w4uCsZmnHWjnYqkDXuAfwMwGiNL6WjVp2L3XqI0= =vrLQ -----END PGP SIGNATURE----- --y2vt4A46iVw0eazR--