public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: passt-dev@passt.top
Subject: Re: [PATCH 2/2] migrate: More sophisticated versioning
Date: Fri, 31 Jan 2025 06:53:48 +0100	[thread overview]
Message-ID: <20250131065348.0b283d0f@elisabeth> (raw)
In-Reply-To: <20250131045215.1368543-3-david@gibson.dropbear.id.au>

On Fri, 31 Jan 2025 15:52:15 +1100
David Gibson <david@gibson.dropbear.id.au> wrote:

> At present the header for our device state migration stream is sent as
> a buffer in the sections array, like anything else.  It contains both
> version information, and details on the source ABI which are specific to
> v1 of the migration protocol.  Alter this for greater flexibility:
> 
>  * We separate out a minimal fixed header, which we will need to keep for
>    every future version, from a version specific header, containing (for
>    v1) the ABI data

What's the purpose of this if there should be no ABI data?

I have this for the moment:

	/* Immutable part of header structure: keep these two sections at the
	 * beginning, because they are enough to identify a version regardless
	 * of metadata.
	 */
	.magic		= MIGRATE_MAGIC,
	.version	= htonl_constant(MIGRATE_VERSION),
	/* End of immutable part of header structure */

...which to be honest already felt like wasted effort, despite being
just two comments.

>  * Handle both the headers separately from the data sections making for
>    better symmetry between the source and target sides
>  * Add a "compat_version" field.  This will allow us to make future
>    protocol extensions which are backwards compatible with older targets,
>    while retaining the ability to also make breaking protocol extensions.
> 
> This establishes a minimal header with fixed representation to maintain
> for all future versions.
> 
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>  migrate.c | 157 ++++++++++++++++++++++++++++++++++++++++--------------
>  migrate.h |  26 ++++++---
>  2 files changed, 138 insertions(+), 45 deletions(-)
                    ^^^

...is this really a good idea if we want to drop this right away? I
might be missing something but I think it would more sense to focus on
the "targeted" data transfer instead.

-- 
Stefano


  reply	other threads:[~2025-01-31  5:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31  4:52 [PATCH 0/2] Fancier version handling for migration David Gibson
2025-01-31  4:52 ` [PATCH 1/2] migrate: Merge protocol version information into one table David Gibson
2025-01-31  5:53   ` Stefano Brivio
2025-01-31  6:17     ` David Gibson
2025-01-31  4:52 ` [PATCH 2/2] migrate: More sophisticated versioning David Gibson
2025-01-31  5:53   ` Stefano Brivio [this message]
2025-01-31  6:21     ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250131065348.0b283d0f@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=passt-dev@passt.top \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://passt.top/passt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).