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 832CF5A004F for ; Mon, 05 Aug 2024 14:17:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1722860229; bh=NjT4yBefFkttVdKQSxcn1s8vjT7alZQrHjOzic2dTPA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EoJrJg1nAWB0LROkEuYlSv51mqUfU6EQldl2WcPFh57RJ+ZIqCpRWl1P8HgTts4tw Hmu4FS6ANX24dfvSfJzdx0hFFfXyB/h1YTFS+li7Wr/zBktqmFZnrQkW+qcindc1Jf 9isy7nUcfVxUCxerUMtYCI5rJB2/LfKla9wi2FlxwQw9p5XZ+l19ub1bnXYr/wRIbi ZdicFRBB63F/EcRiq9Kzj2kSseL088zv0Xi/Y+7eH5DpN9uje+ISLFsL6gZ5mNAZE6 eaFUW4GoIgFgchJaUQ9IYnyHWd1L+rclf8csCFYeH1M/Nt6mRXFkUJqxgBQcYb07Ku J1VCJw2GXrNXg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WcwRT3R3Tz4wcl; Mon, 5 Aug 2024 22:17:09 +1000 (AEST) Date: Mon, 5 Aug 2024 22:17:03 +1000 From: David Gibson To: Laurent Vivier Subject: Re: [PATCH 2/2] udp_flow: move all udp_flow functions to udp_flow.c Message-ID: References: <20240802161036.1404559-1-lvivier@redhat.com> <20240802161036.1404559-3-lvivier@redhat.com> <73ecabe9-5ea6-46bf-8b1c-29429336ad51@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jJVgll17kejS954Y" Content-Disposition: inline In-Reply-To: <73ecabe9-5ea6-46bf-8b1c-29429336ad51@redhat.com> Message-ID-Hash: CH5A4BII433DRSVHK3JL5FICWXMVHJFZ X-Message-ID-Hash: CH5A4BII433DRSVHK3JL5FICWXMVHJFZ 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: --jJVgll17kejS954Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 05, 2024 at 09:11:36AM +0200, Laurent Vivier wrote: > On 03/08/2024 09:51, David Gibson wrote: > > On Fri, Aug 02, 2024 at 06:10:36PM +0200, Laurent Vivier wrote: > > > No code change. > > >=20 > > > They need to be exported to be available by the vhost-user version of > > > passt. > > >=20 > > > Signed-off-by: Laurent Vivier > >=20 > > LGTM, with one nit: > >=20 > > > +/** > > > + * udp_at_sidx() - Get UDP specific flow at given sidx > > > + * @sidx: Flow and side to retrieve > > > + * > > > + * Return: UDP specific flow at @sidx, or NULL of @sidx is invalid. = Asserts if > > > + * the flow at @sidx is not FLOW_UDP. > > > + */ > > > +struct udp_flow *udp_at_sidx(flow_sidx_t sidx) > > > +{ > > > + union flow *flow =3D flow_at_sidx(sidx); > > > + > > > + if (!flow) > > > + return NULL; > > > + > > > + ASSERT(flow->f.type =3D=3D FLOW_UDP); > > > + return &flow->udp; > > > +} > >=20 > > udp_at_sidx() is so simple it probably makes more sense to have it as > > an inline in the header file, rather than a regular function. When it > > was a local function, I was pretty much assuming the compiler would > > inline it anyways. > >=20 >=20 > I can't move it to udp_flow.h because udp_at_sidx() uses flow_at_sidx() t= hat > is defined in flow_table.h after udp_flow.h has already been included. > flow_table.h includes udp_flow.h at its top because it needs "struct > udp_flow" in union flow. Ah, I didn't think of that. Never mind, then. Reviewed-by: David Gibson --=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 --jJVgll17kejS954Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmawwrEACgkQzQJF27ox 2GePDhAAjILHIeLoRh5b1D0FHkHkGXARY/ijMZmkswmcECrPwP5wj0Or/aR4kHpj E+Js9CxNzm2D9HI48PL7NvkJEZ57GDcv66Qm4VIK2mNP+yUfVGevvzEe1VpRUuS8 wqDwO77wI16TyPsl0KERP+PhnddPfxxlAtIuKUPPpAGvjBjumgHoCQGqPCxN2UDW BOf5+iftWOzbnSKK+LjTtlPGasQB7vICg7IGpxNCwX7sJtXqicuelIrdRAPQxnuA iA2wtnHhdwfU2I4Oty2IpSLFGrsaP142/+EDv5eOvOvERDEU0w0tVH59e9ukZBMv R71OS45rDQzHilm08BbQSYkEAMvTzoDZQfMxJxgYVBLp3MJ3KinGkfhVXgQX70Xf ZGXxa722TR1o/+P9YaT1Pi+g3oHxaTBAr+4pKzMer9picX2gOFFMlsvvpYq9T4YC Ko0BDj6AeULUI7yfaNTGs+pOOv6Dd0I/Jgx4Jiwr7ChmNUQVQMD0DM62lTE2qv0A e1k+XbUFmfmBqFUD8ON7UEUVASvrrPniW7TifgaPEL+eozzqkEz06WIx5HQOFQnG 6/4kiyEroxvyyJkZurw4mvMwfxIsCucbBjCWEJy5KeCSF3K7R+Du4vlDX0GYYqOT S8BRU8urFUBipPAAEOOLrTeeCB+Fu8rzKZU5PLuqKoiLqUDXTjY= =0T4x -----END PGP SIGNATURE----- --jJVgll17kejS954Y--