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=202602 header.b=c/5qA3YF; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id B934F5A0265 for ; Wed, 25 Mar 2026 04:51:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202602; t=1774410662; bh=1McsqBXmIZbNLXtWBpcB+Entshh6LaseRXc+sI9uYxE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=c/5qA3YF/+YzXsdz0Zlmlwu1OG1q1+k1BmYJZihySqzmRAGRJAIfkXcpisNidNjim 7Rov7XPQayeSKA/yPGhllXbBnMg2M8baWEAp1JDpGS/qkKEuwR2Qdt2HoL/ZEbpYxe SQX3T4d8jkJgL1iNNrKyoRiioSBSeTAn7/w9Vu05sC/FHedsfdDe554Vyn32HnT9xm /J0koLzZdbe7T+ErWiG32gcSIxcSFv+/emLEGzBMq3QPN1ajVT1DOCpzNZye/ft8vd fbE1DsQB+Zi7djyTtiKB0jSLT7FD1RVaHbZELenqaEn3uQZcfLibd54t2l+THVv1oO un0XPsmjwcIsg== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4fgXxy30Ztz4wCW; Wed, 25 Mar 2026 14:51:02 +1100 (AEDT) Date: Wed, 25 Mar 2026 12:50:59 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3 03/25] serialise: Split functions user for serialisation from util.c Message-ID: References: <20260323073732.3158468-1-david@gibson.dropbear.id.au> <20260323073732.3158468-4-david@gibson.dropbear.id.au> <20260325015406.69751b4d@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="9vNh6gsY4PaG3FF7" Content-Disposition: inline In-Reply-To: <20260325015406.69751b4d@elisabeth> Message-ID-Hash: NE7PJRUCTV7536FSFEPFBXVPF5JVTUJ3 X-Message-ID-Hash: NE7PJRUCTV7536FSFEPFBXVPF5JVTUJ3 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: --9vNh6gsY4PaG3FF7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 25, 2026 at 01:54:07AM +0100, Stefano Brivio wrote: > On Mon, 23 Mar 2026 18:37:10 +1100 > David Gibson wrote: >=20 > > The read_all_buf() and write_all_buf() functions in util.c are > > primarily used for serialising data structures to a stream during > > migraiton. We're going to have further use for such serialisation > > when we add dynamic configuration updates, where we'll want to share > > the code with the client program. >=20 > Nit, but I'd like to make sure we're not missing anything before > applying this: the "hidden sizeof()" variants seem to be gone now > (thanks), but then we should drop this last sentence, unless I'm > missing something. Oops, yes. I removed the _var() ones but forgot to update the message. >=20 > Another nit below: >=20 > > [...] > > > > +++ b/serialise.h > > @@ -0,0 +1,14 @@ > > +/* SPDX-License-Identifier: GPL-2.0-or-later > > + * Copyright Red Hat > > + * Author: David Gibson > > + */ > > + > > +#ifndef SERIALISE_H > > +#define SERIALISE_H > > + > > +#include > > + > > +int read_all_buf(int fd, void *buf, size_t len); > > +int write_all_buf(int fd, const void *buf, size_t len); > > + > > +#endif /* _SERIALISE_H */ >=20 > This is SERIALISE_H, not _SERIALISE_H. Fixed. --=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 --9vNh6gsY4PaG3FF7 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmnDP4MACgkQzQJF27ox 2Gc9ehAArJwE2Zn4ttFzViKJoIEg6Linee9yD+mKzuyVOZVIYfMvGRs+VOTwSkjo CBVnxZp6QcYB8X9Ci3LKvq9DL7bxNID/rtLdEnaxEBWeBEMTOSx9u9U2CQ8jRFBv cApuw+NJ5vXpyz8vKV/wXks6Pp9pzvx2huhHYGV8UQWou+1EmUiGGxrpQJodkK/z SCQqWcGg4hcKcrPQNXGA/i15L5l3IhoWD7bRhXxej7/Ujhd0zwelqg/TI8Q+otpz kvO+JCnQcKoT3T1iUQXkZFksWb+DT8L9yThDJiIuz90IkpxrBGGjwyqJkxz7wZRJ EttUn4KoJV69NVA+tRCPE+ieR9eUtqCvxaOmJnVeLbYKUsv4pdmPgUgG0v58kS2r rQYRos8tH3VHNT9+3kOq8tF5jnY1XEKZiDzWM8PB8ktX7uY6EL9pFXnMk5MDlEXW U0beKShIf1RafAc/Rsrugxsiq/6AlzUWkt6NaD74HRk4CySk0+8keHWFdayM9NXI lqK6JJhgYBzLUAnZem5qT0zrW5L/91neBsWQMeCuNm3OPUMfx/9iVnYA2tNE9hJi DC8Zk722VmS4K5dZ7iWE/CjZAAmf8k2K27fRJ/w+M7n37BcU770SrS/adm8azljK 72whMdlzwx4hbx5tB8o8NFjR2uze4MgzSMIuvMWIs9cI/awTV2U= =pMOU -----END PGP SIGNATURE----- --9vNh6gsY4PaG3FF7--