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=pY0bRE1q; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id CE89F5A0624 for ; Thu, 08 Jan 2026 00:48:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202512; t=1767829693; bh=qsM+Su37axcKKREF4NAz1Sy7cvQrtGSqkJf10Gpx+rk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pY0bRE1qqORtfToC9r2XT6xraCIjp7mbtyrYsfbI7tRTUadSohlPYRujts7qn1GOJ xni08BcS1lptf7j3LsMxFKa9yMS2Z2C5CIj/2H6QIJJ2tRaVpjXXOsYppslJa0VNAl 8b34WdXrX5XJQVM9nh0DiEeLhwhVtZb7Wx1UX7KqeyWCLpzvIxT9Atle2bSv7DHagv IiCK+coTxmZQdfdW1k/hpz6IZF8BqtrZHF1Rv8sL7pUq9IT5qq6041DfCzM/aASqmq hxZrDEBXAtr+9/uuWQXvMwceB6G3tdOKt+jpWktF6St3tW0xZ1hgQISYQ9cEAJLysD RtrB+o1IQa11Q== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4dml8s0mxgz4wHX; Thu, 08 Jan 2026 10:48:13 +1100 (AEDT) Date: Thu, 8 Jan 2026 10:41:43 +1100 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH] udp_flow: remove unneeded epoll_ref indirection Message-ID: References: <20260107150612.55192-1-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1gzgn3jaJu7XbZFD" Content-Disposition: inline In-Reply-To: <20260107150612.55192-1-lvivier@redhat.com> Message-ID-Hash: MTAWYK7FVZ6WAXZHUS4R542GXQKIDY5J X-Message-ID-Hash: MTAWYK7FVZ6WAXZHUS4R542GXQKIDY5J 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: --1gzgn3jaJu7XbZFD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 07, 2026 at 04:06:12PM +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. Huh, yes. The UDP flow sockets are definitely supposed to be using ref.flowside. Sorry I didn't catch this on initial review. >=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 --1gzgn3jaJu7XbZFD Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmle7ygACgkQzQJF27ox 2GdfcQ/8D+mq0p3rHhP87zmnVCxjT2Ir0lTNZ1wYbjM9oAxuvKtyzRPsAcY6rkpM wBOxco9Ew8GrWrAOo/q+ZcoTp5RCZeYi4IGahgBTPt+/YV053nztmSUy+VOOMuLn Cw4ze0VfgmTphkLi0X8KcuNQuErIQvo0DDH21VRoYqr/zrPldbwRXf1cRfZgMeOL nnB6wEfr/S4Z4gFCL6oAaqOvPTMSVQmOWp/63DfhGUa/yoinY4icudVo+j44VA+P iQgNkmwpycXhdJCfdU80sSKHrRnsx8VvYawC2cV9DN2cG78ohxO6N45oEIlUcW6O 4HafIu2Dg7EVxTJ2SXjx3JBbmX5k9ZdTtGoZTJtQzCCtxaZnpvNxn2RYUQ/cYIk6 NBBmX0JoIsNOqYjj59D8eviZxY0tBq4m8+vM65g56rqXYiOE0NUHWBleRPpR9KLJ YoPAAXih0s1AUSugF5+6UpnLd2cIJnXHTrdiJUnTegMxjLyMh/KgWvIJmEaQL80g +Okcmq/Ee3Izcfb3ptm+BgNEX602XAY3X39s1gpcm2h+d1JRusnoKASDhHrawvlM VTlZMVtrLCqoFd110EluUSk/8QFbQeZbEKdPHoXmCv8SgYAvfKdAVs/r9mUN+fwZ HSOlqlkIqhLLRhnwVEM55qDkwyXVwHjWgMZ3KtW927kxSLE4+hI= =9EIx -----END PGP SIGNATURE----- --1gzgn3jaJu7XbZFD--