From nobody Tue Sep 9 03:16:12 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1749125834; cv=none; d=zohomail.com; s=zohoarc; b=WNGJglxGuFdAxsO+N1eLO1j0JKiTpAOWY1hQFatgUqtPDpICYyoDgMuiRdYmBBf9RyrPBbygSiz7sSWoYj5s6S+1T/Ohz+4HRG4bHmz/9TlBH+X31Sm1vpiMf9b6o/XKyAeCzxa83ICTj8/XjvN2zB6SYKihaGD+F/HtvsLgbbs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749125834; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=pe3M5e6vc7hcrkAoxq1hMDttStCeWznOWYf+DH9CGT0=; b=E8x7SbtgsahzIE3lzIEfF4ZIHHJSas+sLzx2WaMWM6ChSpGXYI2+nEk0yqruJqIKTlU0m1sy22WRiMcUUzYf3K8IzgTf5HRDuLmvOvgJeyM1mIRLkZkyt3o38zRAkwXGd+YaJweTfQmYAjk299zFMXVaW/6pJPwFhwjnfHuQchU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 174912583497647.28566271477803; Thu, 5 Jun 2025 05:17:14 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 061D0121D; Thu, 5 Jun 2025 08:17:14 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 68C4114A9; Thu, 5 Jun 2025 08:16:22 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6722E10F5; Thu, 5 Jun 2025 08:16:17 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id D5958CA5 for ; Thu, 5 Jun 2025 08:16:16 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-260-GECrGISVO8GUxy7HIf8EFA-1; Thu, 05 Jun 2025 08:16:14 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B226B195608D for ; Thu, 5 Jun 2025 12:16:12 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0809F1956087 for ; Thu, 5 Jun 2025 12:16:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1749125776; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XXc0cSPY7m2oWs2ugLhGa+6DWcDXNL0Isyiz0ozxxNk=; b=Y7lnfNXViO/Si4druhm730ELOhFkB4e0ppNk+3Qn5O8niXGV6yNR6LUTQLSIBf5BV8SXrY 5+Vgkny5okbRDPDoN+JS2Nm4KnABLBa9msMNfg+j/T5X2rSkXqTeRimQ8fz8sxF0ZKdZnl mqY2T7HA1WNwOZLdiP1FolD+iVpWV4o= X-MC-Unique: GECrGISVO8GUxy7HIf8EFA-1 X-Mimecast-MFC-AGG-ID: GECrGISVO8GUxy7HIf8EFA_1749125773 To: devel@lists.libvirt.org Subject: [PATCH 01/10] src: Unify argument name of virDomainMigratePrepare() Date: Thu, 5 Jun 2025 14:15:58 +0200 Message-ID: <4876893427cbfddc227316d4c36017963bdfc823.1749125656.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lw1Unny7YVJACo5xVmsoOgf1DNdzCuqmLCAtFnnWIUA_1749125773 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2XTKPQPATMO2NV62QBJGONX4HB2FG6IG X-Message-ID-Hash: 2XTKPQPATMO2NV62QBJGONX4HB2FG6IG X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1749125836137116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The virDomainMigratePrepare() API declares its last argument as 'bandwidth', though throughout various typedefs, RPC and callback implementations the name is changed to 'resource'. This creates a confusing. Unify the name. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/driver-hypervisor.h | 2 +- src/esx/esx_driver.c | 2 +- src/libvirt_internal.h | 2 +- src/remote/remote_daemon_dispatch.c | 2 +- src/remote/remote_driver.c | 4 ++-- src/remote/remote_protocol.x | 2 +- src/remote_protocol-structs | 2 +- src/rpc/gendispatch.pl | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h index 8e080620bb..fa2c08391f 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -584,7 +584,7 @@ typedef int char **uri_out, unsigned long flags, const char *dname, - unsigned long resource); + unsigned long bandwidth); =20 typedef int (*virDrvDomainMigratePerform)(virDomainPtr domain, diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 512ca6c028..34c0e28d31 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -3614,7 +3614,7 @@ esxDomainMigratePrepare(virConnectPtr dconn, char **uri_out, unsigned long flags, const char *dname G_GNUC_UNUSED, - unsigned long resource G_GNUC_UNUSED) + unsigned long bandwidth G_GNUC_UNUSED) { esxPrivate *priv =3D dconn->privateData; =20 diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index 1ae3e2b2e0..c532218226 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -146,7 +146,7 @@ int virDomainMigratePrepare (virConnectPtr dconn, char **uri_out, unsigned long flags, const char *dname, - unsigned long resource); + unsigned long bandwidth); int virDomainMigratePerform (virDomainPtr domain, const char *cookie, int cookielen, diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index 5dfed7ceef..229bd677bb 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -3075,7 +3075,7 @@ remoteDispatchDomainMigratePrepare(virNetServer *serv= er G_GNUC_UNUSED, =20 if (virDomainMigratePrepare(conn, &cookie, &cookielen, uri_in, uri_out, - args->flags, dname, args->resource) < 0) + args->flags, dname, args->bandwidth) < 0) goto cleanup; =20 /* remoteDispatchClientRequest will free cookie, uri_out and diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 2690c05267..1609c6b391 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -2333,7 +2333,7 @@ remoteDomainMigratePrepare(virConnectPtr dconn, char **cookie, int *cookielen, const char *uri_in, char **uri_out, unsigned long flags, const char *dname, - unsigned long resource) + unsigned long bandwidth) { remote_domain_migrate_prepare_args args =3D {0}; g_auto(remote_domain_migrate_prepare_ret) ret =3D {0}; @@ -2343,7 +2343,7 @@ remoteDomainMigratePrepare(virConnectPtr dconn, args.uri_in =3D uri_in =3D=3D NULL ? NULL : (char **) &uri_in; args.flags =3D flags; args.dname =3D dname =3D=3D NULL ? NULL : (char **) &dname; - args.resource =3D resource; + args.bandwidth =3D bandwidth; =20 if (call(dconn, priv, 0, REMOTE_PROC_DOMAIN_MIGRATE_PREPARE, (xdrproc_t) xdr_remote_domain_migrate_prepare_args, (char *) = &args, diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 57cd5796af..2dc0a6fea6 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -1055,7 +1055,7 @@ struct remote_domain_migrate_prepare_args { remote_string uri_in; unsigned hyper flags; remote_string dname; - unsigned hyper resource; + unsigned hyper bandwidth; }; =20 struct remote_domain_migrate_prepare_ret { diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index dd612b4dc6..50fcdaa134 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -628,7 +628,7 @@ struct remote_domain_migrate_prepare_args { remote_string uri_in; uint64_t flags; remote_string dname; - uint64_t resource; + uint64_t bandwidth; }; struct remote_domain_migrate_prepare_ret { struct { diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index f9fae39fb1..2b7fd657cb 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -405,7 +405,7 @@ my $long_legacy =3D { DomainMigratePeer2Peer =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, DomainMigratePerform =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, DomainMigratePerform3 =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, - DomainMigratePrepare =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, + DomainMigratePrepare =3D> { arg =3D> { flags =3D> 1, bandwidth = =3D> 1 } }, DomainMigratePrepare2 =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, DomainMigratePrepare3 =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, DomainMigratePrepareTunnel =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, --=20 2.49.0