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=1749125896; cv=none; d=zohomail.com; s=zohoarc; b=bz8QE0Y+JjAF7q/8UkQbubWZuHFVK7FhM+IjU08d/qRm3vCWAfvXKNqceLISlRNdsNpRgVusxv+g640+qxYI8g9e+kxIO58ZZPoegC/eooDBd+UmasYr0m0i0DU0/9LgFz/TN/Oj2GJSWyYKoU/dtRqdj4VZOzVS6LBUT/E9Jx0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1749125896; 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=xAY5mt/Cm7T80/+efsW15sHZan/5qBVw4+z2D7CqNuE=; b=cfGRyMmYIUIBTdrcKh6vcFHT1A4oHg2x+WVqFN0nv6ypkfOTvlZIGPi+xY/lNmz8McBeiL/ql8hPQV5IbJxy14sQcppVMU7/jTff+VPSsnpNldwEJwXUY2C13sGrhK4kCblZcXbFUKPY94bp+/6nmLJZ1trdeo4l3NF5W/I5vZ4= 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 1749125896154998.4828997266952; Thu, 5 Jun 2025 05:18:16 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 04D8214A3; Thu, 5 Jun 2025 08:18:15 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 2B93A14F4; Thu, 5 Jun 2025 08:16:27 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 034D9D61; 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.129.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 4B28E10F3 for ; Thu, 5 Jun 2025 08:16:17 -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-589--TVtpNZ6OhuKh6ZfN8X_qw-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 CFDB11956086 for ; Thu, 5 Jun 2025 12:16:13 +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 263A11956087 for ; Thu, 5 Jun 2025 12:16:12 +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=koB6FLUX/cXV875WJXXH2NcIN1sv06KXMEgcr/9MoW8=; b=N6rVKK0QpqJNtAx0lSyvg6l/cjgUD1ZKBJQs+GEPulYOPJyzX+I9iTg05XABlteChkUHKv 7sVBJV64xOwe0O/UyES0H5rh3MP3MC+YvaHeR7iBBgzY33ebd1rKz0rE6ZOduQb9XdDFhJ R5kG6/piKiQndDDMC9STc7QBpC5PGYA= X-MC-Unique: -TVtpNZ6OhuKh6ZfN8X_qw-1 X-Mimecast-MFC-AGG-ID: -TVtpNZ6OhuKh6ZfN8X_qw_1749125773 To: devel@lists.libvirt.org Subject: [PATCH 02/10] src: Unify argument name of virDomainMigratePerform() Date: Thu, 5 Jun 2025 14:15:59 +0200 Message-ID: <9646a81aeef3b2516d50019283e578c1dd648722.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: j-cCsz97bXAoJXq-jiRpVGe8RK1D8oXOSVo6qlEyUjs_1749125773 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7PG47S3KBEH2SHSIWYU7H3TYLIW7VSKJ X-Message-ID-Hash: 7PG47S3KBEH2SHSIWYU7H3TYLIW7VSKJ 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: 1749125898952116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The virDomainMigratePerform() 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 --- src/driver-hypervisor.h | 2 +- src/libvirt_internal.h | 2 +- src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_migration.c | 12 ++++++------ src/remote/remote_protocol.x | 2 +- src/remote_protocol-structs | 2 +- src/rpc/gendispatch.pl | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h index fa2c08391f..65c20cbb74 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -593,7 +593,7 @@ typedef int const char *uri, unsigned long flags, const char *dname, - unsigned long resource); + unsigned long bandwidth); =20 typedef virDomainPtr (*virDrvDomainMigrateFinish)(virConnectPtr dconn, diff --git a/src/libvirt_internal.h b/src/libvirt_internal.h index c532218226..aead4dbfb6 100644 --- a/src/libvirt_internal.h +++ b/src/libvirt_internal.h @@ -153,7 +153,7 @@ int virDomainMigratePerform (virDomainPtr domain, const char *uri, unsigned long flags, const char *dname, - unsigned long resource); + unsigned long bandwidth); virDomainPtr virDomainMigrateFinish (virConnectPtr dconn, const char *dname, const char *cookie, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b3b0ee66f8..a531bdc581 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10863,7 +10863,7 @@ qemuDomainMigratePerform(virDomainPtr dom, const char *uri, unsigned long flags, const char *dname, - unsigned long resource) + unsigned long bandwidth) { virQEMUDriver *driver =3D dom->conn->privateData; virDomainObj *vm =3D NULL; @@ -10904,7 +10904,7 @@ qemuDomainMigratePerform(virDomainPtr dom, NULL, migParams, cookie, cookielen, NULL, NULL, /* No output cookies in v2 */ - flags, dname, resource, false); + flags, dname, bandwidth, false); =20 cleanup: virDomainObjEndAPI(&vm); diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 2400750ee4..38ffcdf428 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -6447,7 +6447,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, int *cookieoutlen, unsigned int flags, const char *dname, - unsigned long resource, + unsigned long bandwidth, bool v3proto) { g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); @@ -6457,12 +6457,12 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, "migrate_disks=3D%p, nbdPort=3D%d, " "nbdURI=3D%s, " "cookiein=3D%s, cookieinlen=3D%d, cookieout=3D%p, cookieoutl= en=3D%p, " - "flags=3D0x%x, dname=3D%s, resource=3D%lu, v3proto=3D%d", + "flags=3D0x%x, dname=3D%s, bandwidth=3D%lu, v3proto=3D%d", driver, conn, vm, NULLSTR(xmlin), NULLSTR(dconnuri), NULLSTR(uri), NULLSTR(graphicsuri), NULLSTR(listenAddress), migrate_disks, nbdPort, NULLSTR(nbdURI), NULLSTR(cookiein), cookieinlen, cookieout, cookieoutlen, - flags, NULLSTR(dname), resource, v3proto); + flags, NULLSTR(dname), bandwidth, v3proto); =20 if (cfg->migrateTLSForce && !(flags & VIR_MIGRATE_TUNNELLED) && @@ -6485,7 +6485,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, nbdURI, migParams, cookiein, cookieinlen, cookieout, cookieoutlen, - flags, dname, resource, v3proto); + flags, dname, bandwidth, v3proto= ); } =20 if (dconnuri) { @@ -6501,7 +6501,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, migParams, cookiein, cookieinlen, cookieout, cookieoutlen, - flags, resource, nbdURI); + flags, bandwidth, nbdURI); } =20 return qemuMigrationSrcPerformJob(driver, conn, vm, xmlin, persist_xml= , NULL, @@ -6510,7 +6510,7 @@ qemuMigrationSrcPerform(virQEMUDriver *driver, nbdURI, migParams, cookiein, cookieinlen, cookieout, cookieoutlen, flags, - dname, resource, v3proto); + dname, bandwidth, v3proto); } =20 static int diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 2dc0a6fea6..9210c0dc1c 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -1069,7 +1069,7 @@ struct remote_domain_migrate_perform_args { remote_nonnull_string uri; unsigned hyper flags; remote_string dname; - unsigned hyper resource; + unsigned hyper bandwidth; }; =20 struct remote_domain_migrate_finish_args { diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 50fcdaa134..5c30e9d107 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -646,7 +646,7 @@ struct remote_domain_migrate_perform_args { remote_nonnull_string uri; uint64_t flags; remote_string dname; - uint64_t resource; + uint64_t bandwidth; }; struct remote_domain_migrate_finish_args { remote_nonnull_string dname; diff --git a/src/rpc/gendispatch.pl b/src/rpc/gendispatch.pl index 2b7fd657cb..fc8e7e8891 100755 --- a/src/rpc/gendispatch.pl +++ b/src/rpc/gendispatch.pl @@ -403,7 +403,7 @@ my $long_legacy =3D { DomainMigrateFinish2 =3D> { arg =3D> { flags =3D> 1 } }, DomainMigrateFinish3 =3D> { arg =3D> { flags =3D> 1 } }, DomainMigratePeer2Peer =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, - DomainMigratePerform =3D> { arg =3D> { flags =3D> 1, resource = =3D> 1 } }, + DomainMigratePerform =3D> { arg =3D> { flags =3D> 1, bandwidth = =3D> 1 } }, DomainMigratePerform3 =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 } }, --=20 2.49.0