From nobody Thu May 2 20:34:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549897931225673.0848106957387; Mon, 11 Feb 2019 07:12:11 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47EFC90B0A; Mon, 11 Feb 2019 15:12:08 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C8A3F62662; Mon, 11 Feb 2019 15:12:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 34A0B3F603; Mon, 11 Feb 2019 15:12:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1BFC4k9010244 for ; Mon, 11 Feb 2019 10:12:05 -0500 Received: by smtp.corp.redhat.com (Postfix) id EC53F1A7D1; Mon, 11 Feb 2019 15:12:04 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4B41A19C7D; Mon, 11 Feb 2019 15:12:04 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Mon, 11 Feb 2019 16:11:54 +0100 Message-Id: <76218edd80d24819047404da1f3d27356c0101ae.1549897891.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [libvirt-go PATCH 1/2] Add VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY constant X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 11 Feb 2019 15:12:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 --- domain.go | 4 ++++ domain_compat.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/domain.go b/domain.go index 98dd290..f4546b8 100644 --- a/domain.go +++ b/domain.go @@ -2309,6 +2309,10 @@ func getMigrateParameterFieldInfo(params *DomainMigr= ateParameters) map[string]ty set: ¶ms.BandwidthSet, ul: ¶ms.Bandwidth, }, + C.VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY: typedParamsFieldInfo{ + set: ¶ms.BandwidthSet, + ul: ¶ms.Bandwidth, + }, C.VIR_MIGRATE_PARAM_GRAPHICS_URI: typedParamsFieldInfo{ set: ¶ms.GraphicsURISet, s: ¶ms.GraphicsURI, diff --git a/domain_compat.h b/domain_compat.h index d869865..7589f41 100644 --- a/domain_compat.h +++ b/domain_compat.h @@ -939,4 +939,9 @@ struct _virDomainInterface { #define VIR_DOMAIN_JOB_MEMORY_POSTCOPY_REQS "memory_postcopy_requests" #endif =20 +/* 5.1.0 */ +#ifndef VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY +#define VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY "bandwidth.postcopy" +#endif + #endif /* LIBVIRT_GO_DOMAIN_COMPAT_H__ */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 20:34:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1549897950385169.97733678157726; Mon, 11 Feb 2019 07:12:30 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4C139A786C; Mon, 11 Feb 2019 15:12:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02D11611CD; Mon, 11 Feb 2019 15:12:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9A8913F604; Mon, 11 Feb 2019 15:12:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x1BFC5IA010251 for ; Mon, 11 Feb 2019 10:12:06 -0500 Received: by smtp.corp.redhat.com (Postfix) id EEF081850E; Mon, 11 Feb 2019 15:12:05 +0000 (UTC) Received: from beluga.usersys.redhat.com (unknown [10.43.2.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48D3619741; Mon, 11 Feb 2019 15:12:05 +0000 (UTC) From: Erik Skultety To: libvir-list@redhat.com Date: Mon, 11 Feb 2019 16:11:55 +0100 Message-Id: <2d1b2cdd2ae479a73619a21ed793ae57a4a66c69.1549897891.git.eskultet@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [libvirt-go PATCH 2/2] Introduce DomainMigrateMaxSpeedFlags constant X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 11 Feb 2019 15:12:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Also enforce the enum type for MigrateSetMaxSpeed and MigrateGetMaxSpeed functions which previously accepted generic uint32 type since the flags haven't been in use. Signed-off-by: Erik Skultety Reviewed-by: Daniel P. Berrang=C3=A9 --- domain.go | 10 ++++++++-- domain_compat.h | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/domain.go b/domain.go index f4546b8..91b8399 100644 --- a/domain.go +++ b/domain.go @@ -811,6 +811,12 @@ const ( MIGRATE_TLS =3D DomainMigrateFlags(C.VIR_MIGRATE_TLS) ) =20 +type DomainMigrateMaxSpeedFlags int + +const ( + MIGRATE_MAX_SPEED_POSTCOPY =3D DomainMigrateMaxSpeedFlags(C.VIR_DOMAIN_MI= GRATE_MAX_SPEED_POSTCOPY) +) + type VcpuState int =20 const ( @@ -2484,7 +2490,7 @@ func (d *Domain) MigrateSetCompressionCache(size uint= 64, flags uint32) error { } =20 // See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomain= MigrateGetMaxSpeed -func (d *Domain) MigrateGetMaxSpeed(flags uint32) (uint64, error) { +func (d *Domain) MigrateGetMaxSpeed(flags DomainMigrateMaxSpeedFlags) (uin= t64, error) { var maxSpeed C.ulong =20 var err C.virError @@ -2497,7 +2503,7 @@ func (d *Domain) MigrateGetMaxSpeed(flags uint32) (ui= nt64, error) { } =20 // See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomain= MigrateSetMaxSpeed -func (d *Domain) MigrateSetMaxSpeed(speed uint64, flags uint32) error { +func (d *Domain) MigrateSetMaxSpeed(speed uint64, flags DomainMigrateMaxSp= eedFlags) error { var err C.virError ret :=3D C.virDomainMigrateSetMaxSpeedWrapper(d.ptr, C.ulong(speed), C.ui= nt(flags), &err) if ret =3D=3D -1 { diff --git a/domain_compat.h b/domain_compat.h index 7589f41..9a30e8f 100644 --- a/domain_compat.h +++ b/domain_compat.h @@ -944,4 +944,8 @@ struct _virDomainInterface { #define VIR_MIGRATE_PARAM_BANDWIDTH_POSTCOPY "bandwidth.postcopy" #endif =20 +#ifndef VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY +#define VIR_DOMAIN_MIGRATE_MAX_SPEED_POSTCOPY (1 << 0) +#endif + #endif /* LIBVIRT_GO_DOMAIN_COMPAT_H__ */ --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list