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=202512 header.b=m6TXcwq0; dkim-atps=neutral Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by passt.top (Postfix) with ESMTPS id 1E5215A004E for ; Fri, 09 Jan 2026 00:34:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1767915239; bh=ePa3g61sY5W59xRXVPC6znxT9tjiYQ6ACcmUWqQldAo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m6TXcwq0+KzGWPvZZvvUlDeWHyTTZuf7/tZEECs09Ywevdaa4SdTRollphllGsXUq sCWsEfTuP2HZkmdS35fmDQCZG4x4FoWeNyvGpFHc3RsbMMVUP5iHGfH8Q5Iif6gpN2 TRm7ZLT9mrcfvRwRQvH2K49lr5jvfLiRTS7nZIuTWbOmjRdJB+bj5ro1IWVH5W3fJX FJRIUKSk//nq203x4Ls+y524qF4dQtYfXpeEORhxNlYHnt1fLtChl1RB52IGLge0rh vGuyfVJM4I3AocwRtHwi3VwMlo9G/fCBup+oKGZf7FgO+OOKrzZiqsn1vuPaPa9Wqa RLRGGVrJGlNvw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dnLnz6BGDz4wCy; Fri, 09 Jan 2026 10:33:59 +1100 (AEDT) Date: Fri, 9 Jan 2026 10:26:34 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH v2 2/5] udp_flow: remove unneeded epoll_ref indirection Message-ID: References: <20260108140119.1204797-1-lvivier@redhat.com> <20260108140119.1204797-3-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nZFNCyD8Jlc+hcb7" Content-Disposition: inline In-Reply-To: <20260108140119.1204797-3-lvivier@redhat.com> Message-ID-Hash: 5I3M54XTFEERETWV3RG3MGNSZIZTB6AI X-Message-ID-Hash: 5I3M54XTFEERETWV3RG3MGNSZIZTB6AI 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: --nZFNCyD8Jlc+hcb7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 08, 2026 at 03:01:16PM +0100, Laurent Vivier wrote: > The fref union was used to convert flow_sidx_t to uint32_t for > assignment to ref.data. This is unnecessary since epoll_ref already > contains a flowside member of type flow_sidx_t, so we can assign > directly. >=20 > This aligns with how icmp.c and other callers assign flow_sidx_t to > epoll_ref. >=20 > Signed-off-by: Laurent Vivier Reviewed-by: David Gibson > --- > udp_flow.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) >=20 > diff --git a/udp_flow.c b/udp_flow.c > index 8907f2f72741..0ba788060db7 100644 > --- a/udp_flow.c > +++ b/udp_flow.c > @@ -74,10 +74,6 @@ static int udp_flow_sock(const struct ctx *c, > { > const struct flowside *side =3D &uflow->f.side[sidei]; > uint8_t pif =3D uflow->f.pif[sidei]; > - union { > - flow_sidx_t sidx; > - uint32_t data; > - } fref =3D { .sidx =3D FLOW_SIDX(uflow, sidei) }; > union epoll_ref ref; > int rc; > int s; > @@ -89,7 +85,7 @@ static int udp_flow_sock(const struct ctx *c, > } > =20 > ref.type =3D EPOLL_TYPE_UDP; > - ref.data =3D fref.data; > + ref.flowside =3D FLOW_SIDX(uflow, sidei); > ref.fd =3D s; > =20 > flow_epollid_set(&uflow->f, EPOLLFD_ID_DEFAULT); > --=20 > 2.52.0 >=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 --nZFNCyD8Jlc+hcb7 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmlgPSkACgkQzQJF27ox 2GcRQRAAmDVXK+nKDS8tRfUoPLLXrviQgfNLdCsqWgDlqnFe8dMvHBIuoT0U8yQX rUyDVf0AQ/+F1jzBHsu4MvLfuUV4wfTI9y+35cxaM42t9K42T6H9ZjaoZGgtjmD/ WExvVOSco/2zAzvR7SnvMIYgY0amfqEICcZE3moDUJAD2ydZhfYaAxnYYfAP+iuQ hj3ZD5uZM8l/QosIFDdFFkYOweG0NQJHBCo2PMPTBFRgH3epMGMAvwHXX9qcou3Z wnxkS1NEWeDGXxvKr8GCIv8rXxpXDZyynWFgzoeGzE3h4+OPVEqQJhvZtJoIElVx 2QqbsYonnLy52uWIMUEP63RO7C6Kihs6eodTMgYYm8hOXLrl+8MS5PrOc6/bF4wx yvyloP0NNNqYVlserLhg+fitdHXlBEbkTv1jCblInD1e7DQIxn2o7JByOh6cjyf6 JBA/DH+SJc7mmlcCha6IJFMrONC4ri4TEfSqr0ypzjZOxEEjoKQl7SNNLwJqQWRf HLN8oDRmMiwe+Tm/DxZa4MnsAncn5RufMAubDL6qLVwv5pKsDr1v95UVieqsQMru ejBj/abbSVaxCHVK1xJk/IwdMToU5kiTpec3/IndMtn0ON35JzvwRyhlQtzVk3uL g7Ha2Bep6QpHn/woqAOkXPVM19YE5o1BfgmV+GxPnwp1UrR4x60= =5/Y7 -----END PGP SIGNATURE----- --nZFNCyD8Jlc+hcb7--