From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 1B5895A004F for ; Sat, 03 Aug 2024 09:52:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1722671508; bh=Q/oaif2D8R50XmrlVoX4mxJ4RjRTvf+aiVcVBoxm2QQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KuXkqwLiONyYdDCiOgx9LW74Tde7Y76E7R/EZzPRP/GeolzORhAdyDFQpo+3SZHS9 CIZfgk5vQfJXfDmuT9Tvy9yLzfUx8/yXkch1cWOQbLPEt2XtCkHODLSbWdgVpGX8vL svm/oGsGM5LjGXivmMyv/RijKNxxowfGPLiyAqP1hx2zKXPP4A/anDCQ4h0cNdzPmQ zAPrKXuHVfGoI6+RqrHxKmVlFHnr0bfStSxjRkd3K6sKMKHsT8mnsKgPcqMdGwf9+O 2c71YIKfnFvlIpH7D4My0miY/weewaDyinxw3LA3/7w1iwC6eirYkDDcGSFHKR5jIQ ZhEzmk1nS7ZSA== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WbZfD1QWGz4wbv; Sat, 3 Aug 2024 17:51:48 +1000 (AEST) Date: Sat, 3 Aug 2024 17:51:12 +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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="YTQsDGoPl0I++beg" Content-Disposition: inline In-Reply-To: <20240802161036.1404559-3-lvivier@redhat.com> Message-ID-Hash: GEHMJ2CKKSHPJDR5H7I4I7ACDKBTLENT X-Message-ID-Hash: GEHMJ2CKKSHPJDR5H7I4I7ACDKBTLENT 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: --YTQsDGoPl0I++beg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 LGTM, with one nit: > +/** > + * 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. Ass= erts 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; > +} 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 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 --YTQsDGoPl0I++beg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmat4WIACgkQzQJF27ox 2GdiHQ//e+UUT1pjSBSYR1woEr6nOJDDDaVvDgiAkvAh26QZAat6OnjA4FHJsNc7 TDsYa4KivEH8IrFY7aW+8yOblYaRVxcK/jLg9Zg6iCllxpe8h7RZVj3dAxzapPDl j51qESZGdXVSRedbgAvLUxpDaT7oGDoTqM2pi6B717HsxUlYObHdwj6VSSGe08H3 wVC+aZiwRuGO/u9DwH6fcHmRUefE4mnxLR3Nr42BF8iAcs1Duxyv5VAlERG2RGI8 Kf8GCwx2stHYYhjNR9AUS7C0eiVX1NikYbKYgRwC9KEo2DO7yHCh9XrKjBZffdc8 O/VkhzGp+Bc6Me8S3BMqADOzDc3UOausiSTS5RzM3YCY2Xksbzg9RBaKmYvfLmKz akeMFikfdtaUlYgM3yBhZu6oq8zyILcZWDcy/F5Hgwdwb7GZwNr4SSweedYo6W49 nVAcod2OuxKGep6JYpiZhFp73wcnYEmzZCAGp7OeK0uQmvO1SG3HmlIQKi0IJeUx wfYu/1KlZZPjN9AiEO5l4/w3PJKnbRfI6X8VDFP4NO0T5EMjQmjkKvikJgoXa5Xc mIX84j3q7Vq231PAHj7dCyQSPGhOY4kKbgRJIY7atUaps//7CFWpZn/pTAZtc3jQ jgzQ6diVpL0bX4k7pURzlQGWACbvvZ0mbCdRbR2vJiJYLH//bD4= =RJlC -----END PGP SIGNATURE----- --YTQsDGoPl0I++beg--