From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=hTOb2nng; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 8C3055A0265 for ; Wed, 25 Mar 2026 01:54:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1774400052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g6kWtlPBjz1uGDIxeoqH+rQ2O9yXorNFMFxaNB5+Lws=; b=hTOb2nng9tHcHhbELIf5lO/CzqyIdsRu2uYuvUeXerHXQyjv8kx5Sve4hx2+85iuDyaMF7 0nuo3jeRphtpCioDR3C+LPCbAtjMKGU0OpHO7qW3Iz9EpdeVIFhlax8q2Kj8etl6h/h4Mq KmywE0sTedn9bvpAWL7S4lpUss8Z6Ug= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-556-3k-20pD7NBqOnfxUbPFA1g-1; Tue, 24 Mar 2026 20:54:10 -0400 X-MC-Unique: 3k-20pD7NBqOnfxUbPFA1g-1 X-Mimecast-MFC-AGG-ID: 3k-20pD7NBqOnfxUbPFA1g_1774400050 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-48534941525so55830195e9.2 for ; Tue, 24 Mar 2026 17:54:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774400049; x=1775004849; h=date:content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=g6kWtlPBjz1uGDIxeoqH+rQ2O9yXorNFMFxaNB5+Lws=; b=mCHYI1QRc/VgYzucOpBFqPlb/p6/UFnJd+JadakRiX7N+1vhpB5RD9OV2a9gcDuMz+ zA4ZDafQ/3vUrqnrJGcvEBS/neUReq5/uNl9hanBTO5Rc9KIiakDRjwQ1cdV6V0DY/w5 nojV9AW8f7rwFTE4LbC4aVVnuwYG9t5VHth94eEBJx3Wn3fSjwxJHNwbLWbTHisiLCFF BPTnhtmpqLjhX9g2J3fElvHZk96JDXjjhzYOf/SbtTZneEgNxzQDKR8TTofiSGz45HCW ch6w2nQReETtKPGqIVqm3SqNjhEugb4xNGewNP/7j4AAcSAQ0Myu82Aco8SrhmOXbL97 GfZw== X-Gm-Message-State: AOJu0Yw65MDkH8o9FBG+CICOT84mQXOCbQJ90/YUUC2b4UolMqE0EETu rwFs6sFPdEJgNTnI9nfYwj0MSJC4BL3nTSAO6M7LkA71BJxwsdtDFPvn2a8v5mbkZEDs0THduW1 DmlRkHky+Rx37xtqLNa7kL2TFv9S2cVvL9IztCmyAsA7WdRluT7f2z3HNNGdOhn5v X-Gm-Gg: ATEYQzwCeg3e024BhULwHrVCyqUgH1d2aSj32kAhHkt9MWfrSsbgeCwP+XjfTcWD4kb iMMTCYwI2wW4LQCZSNmmAkvNzwzCmTp+UBaQV6RgeqlKoM4vbPXVQxOdDSpj3JwQ+AF7LMAnclA tNi7A93f2Qp5fTE0g5mS18qIKxq+M4zronO5ha1v3u73Uz59qYK0elZEzPHFA+JGRVjR7o7wVP8 NIDuQ5t9lFLMWZGDXZf0zNjBZ8S6b/wiXlQOdcuF2Q+FEpUDwIgqxDxxjMgNKo1D+CUXSNIiNO8 O6sGy4Qf/8qgrdoKTWg9mTl2onk5nypn2bc6nXz1rU8FSRPT7b8VBIwvt1F15uX5gxtGFKLKdjq ByYpgwehIzoSncMBVnAMj2MZCys6WzhnWQ/eth77BEaZBuAfN+A== X-Received: by 2002:a05:600c:4f48:b0:485:3d00:efd with SMTP id 5b1f17b1804b1-48715fbfc42mr25013815e9.7.1774400049193; Tue, 24 Mar 2026 17:54:09 -0700 (PDT) X-Received: by 2002:a05:600c:4f48:b0:485:3d00:efd with SMTP id 5b1f17b1804b1-48715fbfc42mr25013505e9.7.1774400048133; Tue, 24 Mar 2026 17:54:08 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48711693a08sm113192705e9.2.2026.03.24.17.54.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Mar 2026 17:54:07 -0700 (PDT) From: Stefano Brivio To: David Gibson Subject: Re: [PATCH v3 03/25] serialise: Split functions user for serialisation from util.c Message-ID: <20260325015406.69751b4d@elisabeth> In-Reply-To: <20260323073732.3158468-4-david@gibson.dropbear.id.au> References: <20260323073732.3158468-1-david@gibson.dropbear.id.au> <20260323073732.3158468-4-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.49; x86_64-pc-linux-gnu) MIME-Version: 1.0 Date: Wed, 25 Mar 2026 01:54:07 +0100 (CET) X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Z5yVaJpemMPd7Vlj0WWVfTJ5AyuoZXogYSE1ojG67jU_1774400050 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: GF5CPAAKB66RSN7FRGODCNDBC3TFKCT2 X-Message-ID-Hash: GF5CPAAKB66RSN7FRGODCNDBC3TFKCT2 X-MailFrom: sbrivio@redhat.com 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: On Mon, 23 Mar 2026 18:37:10 +1100 David Gibson wrote: > 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. 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. Another nit below: > [...] > > +++ 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 */ This is SERIALISE_H, not _SERIALISE_H. -- Stefano