From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none 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=ARjYfIra; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id 6B45A5A0627 for ; Fri, 31 Jan 2025 06:53:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1738302837; 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=usQSNWC/cecs1OWQIeX+nmpp6FHw7F84LEWne4leC8s=; b=ARjYfIraJpLVFd0pYY6YW9F0AyagNClinN48qApw6wXaHN3s2SO1C01uupi2XI/gTDw4PU 3lBzG/Pmw1p18MhTW/fjJxhAGb/IMvdc+qK5jPeVwr56MbfRNXboZybEnxrL22atvJhPqc F/hb1acAXV/9SWgfI6JYmKC4VNBKgws= 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-19-T6gpHqOMNHOryH9C34AY6g-1; Fri, 31 Jan 2025 00:53:55 -0500 X-MC-Unique: T6gpHqOMNHOryH9C34AY6g-1 X-Mimecast-MFC-AGG-ID: T6gpHqOMNHOryH9C34AY6g Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-436723db6c4so11349525e9.3 for ; Thu, 30 Jan 2025 21:53:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738302833; x=1738907633; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=usQSNWC/cecs1OWQIeX+nmpp6FHw7F84LEWne4leC8s=; b=n2pZr/oLuAVsaS8izbopdMAx7rYur6TYsK/4VcDO2szevFvbf16HO6xY2v/pj1LPSn By8hiEP7bMkEXR7dieO+HKrhT3u1xiMIYRe5z08VGk3A5WCnC9v4n8iW69kh36v95zGN ojrQtIvF5pUij8NI/uIPPmoyGKsVFYl34X3MdIMBwiHXC3O9YVwp13F7Y7bMqfIZ4RaV tWW1htnm9af/gS8MJuKWrFBPW1nt1yPRHUWW/1f/XwU3pUMmPscCOIVOd1RaVYhJmc30 1qHt5bf8qc7sn905qjYP/yP5jp7kURLjDrnjKEZ2KtdPaqoAj/Fw7ZCKBVpQyT5LLsK6 FAcg== X-Gm-Message-State: AOJu0Yx+Yz7FopGZM44PiC2qUd+DpTu/okue4JV+owoMcaVCkVbNulqc ZFz1n6O+o5QsfXwvjlCkrSmHaro+r6Jph6+Mef2WjMePZgJJuwmaPggMASGibGQ6DPpcVUF/u1I yV2kwIwEqpHMDC02DqaDcdJCkNawL3Vq27UnJqdrxygoA6Hc1u9c8kqVN6Q== X-Gm-Gg: ASbGnctwUneijcOK8YeMsVsuK5QHqKFbfhUiYx6DUIu2LCO2zDZ+j70csadUWsgqvn+ 7hXxdFmHKVbl7T9ErYsnoY4uWFUvcPhh9zSr7Pd5ju+zPNU7AhV7mX/ZkNuFS20llVgia+ZWECM lYC5/Z5jQ2RhWj5l8Rnd7ia2VaDLqBGwVTJ7xO+DxKYeJ1DmNcLle2XOAoBUguF+HDAZU/qsV/z /c75C/jOV19ex6BnZRM/hKnyicDKGi5A7OmAumdhkIggbOLnDlzk6P4MC8CCfOVFr+iXzrxPMvw HiULD3AD1nXtFYnn X-Received: by 2002:a5d:6dae:0:b0:38c:5bfa:a961 with SMTP id ffacd0b85a97d-38c5bfaabefmr3579587f8f.4.1738302833372; Thu, 30 Jan 2025 21:53:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEFjAgwVNxyVFvhPqWzeqbv80TokrdT6rEUhFTi9MxDjtDcfAN4xkosFRXl+8p0LlihqVFjzw== X-Received: by 2002:a5d:6dae:0:b0:38c:5bfa:a961 with SMTP id ffacd0b85a97d-38c5bfaabefmr3579579f8f.4.1738302833005; Thu, 30 Jan 2025 21:53:53 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438e236f9bfsm46101875e9.0.2025.01.30.21.53.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jan 2025 21:53:51 -0800 (PST) Date: Fri, 31 Jan 2025 06:53:48 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH 2/2] migrate: More sophisticated versioning Message-ID: <20250131065348.0b283d0f@elisabeth> In-Reply-To: <20250131045215.1368543-3-david@gibson.dropbear.id.au> References: <20250131045215.1368543-1-david@gibson.dropbear.id.au> <20250131045215.1368543-3-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: AQ_n8WCIm66_DDnaej1mB6dFVE4ITdICW1ERU3W-HN8_1738302834 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: YHQXJUQDF5RT4ZJJVD4XNIPTDNFKEMBL X-Message-ID-Hash: YHQXJUQDF5RT4ZJJVD4XNIPTDNFKEMBL 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 Fri, 31 Jan 2025 15:52:15 +1100 David Gibson 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 > --- > 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