From nobody Tue Apr 30 23:45:25 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 1542730646170505.48811016974844; Tue, 20 Nov 2018 08:17:26 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 44C02308125E; Tue, 20 Nov 2018 16:17:23 +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 D7B53272B0; Tue, 20 Nov 2018 16:17:22 +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 4B6663F603; Tue, 20 Nov 2018 16:17:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAKGHJNC010957 for ; Tue, 20 Nov 2018 11:17:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id D0C2E67679; Tue, 20 Nov 2018 16:17:19 +0000 (UTC) Received: from unknown4CEB42C824F4.redhat.com (ovpn-117-6.phx2.redhat.com [10.3.117.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9262166071 for ; Tue, 20 Nov 2018 16:17:19 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Tue, 20 Nov 2018 11:17:10 -0500 Message-Id: <20181120161712.10464-2-jferlan@redhat.com> In-Reply-To: <20181120161712.10464-1-jferlan@redhat.com> References: <20181120161712.10464-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-python PATCH 1/3] Fix typos in virDomainSetSchedulerParameters name 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 20 Nov 2018 16:17:24 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Signed-off-by: John Ferlan Reviewed-by: Pavel Hrdina --- libvirt-override.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-override.c b/libvirt-override.c index e74c7dd..761b71b 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -571,7 +571,7 @@ libvirt_virDomainSetSchedulerParameters(PyObject *self = ATTRIBUTE_UNUSED, Py_ssize_t size =3D 0; virTypedParameterPtr params =3D NULL, new_params =3D NULL; =20 - if (!PyArg_ParseTuple(args, (char *)"OO:virDomainSetScedulerParameters= ", + if (!PyArg_ParseTuple(args, (char *)"OO:virDomainSetSchedulerParameter= s", &pyobj_domain, &info)) return NULL; domain =3D (virDomainPtr) PyvirDomain_Get(pyobj_domain); @@ -647,7 +647,7 @@ libvirt_virDomainSetSchedulerParametersFlags(PyObject *= self ATTRIBUTE_UNUSED, virTypedParameterPtr params =3D NULL, new_params =3D NULL; =20 if (!PyArg_ParseTuple(args, - (char *)"OOI:virDomainSetScedulerParametersFlags= ", + (char *)"OOI:virDomainSetSchedulerParametersFlag= s", &pyobj_domain, &info, &flags)) return NULL; domain =3D (virDomainPtr) PyvirDomain_Get(pyobj_domain); --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 30 23:45:25 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 1542730666303511.79055324393005; Tue, 20 Nov 2018 08:17:46 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81CEC723D9; Tue, 20 Nov 2018 16:17:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25443605C6; Tue, 20 Nov 2018 16:17:41 +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 3AC8D181B9E4; Tue, 20 Nov 2018 16:17:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAKGHKVS010962 for ; Tue, 20 Nov 2018 11:17:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 44F1C67679; Tue, 20 Nov 2018 16:17:20 +0000 (UTC) Received: from unknown4CEB42C824F4.redhat.com (ovpn-117-6.phx2.redhat.com [10.3.117.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03B6666071 for ; Tue, 20 Nov 2018 16:17:19 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Tue, 20 Nov 2018 11:17:11 -0500 Message-Id: <20181120161712.10464-3-jferlan@redhat.com> In-Reply-To: <20181120161712.10464-1-jferlan@redhat.com> References: <20181120161712.10464-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-python PATCH 2/3] Add missing virPyDictToTypedParams for libvirt_virDomainBlockCopy 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: , MIME-Version: 1.0 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.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 20 Nov 2018 16:17:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Need to free params like similar API's such as libvirt_virDomainMigrate3 and libvirt_virDomainMigrateToURI3. Signed-off-by: John Ferlan Reviewed-by: Pavel Hrdina --- libvirt-override.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt-override.c b/libvirt-override.c index 761b71b..0353306 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -8784,6 +8784,7 @@ libvirt_virDomainBlockCopy(PyObject *self ATTRIBUTE_U= NUSED, c_retval =3D virDomainBlockCopy(dom, disk, destxml, params, nparams, f= lags); LIBVIRT_END_ALLOW_THREADS; =20 + virTypedParamsFree(params, nparams); return libvirt_intWrap(c_retval); } =20 --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 30 23:45:25 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 1542730670003413.4141075522425; Tue, 20 Nov 2018 08:17:50 -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 5F9E0307DAAE; Tue, 20 Nov 2018 16:17:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E6235B6AE; Tue, 20 Nov 2018 16:17:43 +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 5D737181B9EB; Tue, 20 Nov 2018 16:17:37 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAKGHKLW010971 for ; Tue, 20 Nov 2018 11:17:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id AA97067679; Tue, 20 Nov 2018 16:17:20 +0000 (UTC) Received: from unknown4CEB42C824F4.redhat.com (ovpn-117-6.phx2.redhat.com [10.3.117.6]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6A04A66071 for ; Tue, 20 Nov 2018 16:17:20 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Tue, 20 Nov 2018 11:17:12 -0500 Message-Id: <20181120161712.10464-4-jferlan@redhat.com> In-Reply-To: <20181120161712.10464-1-jferlan@redhat.com> References: <20181120161712.10464-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [libvirt-python PATCH 3/3] Implement API binding for virDomainSetIOThreadParams 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: , MIME-Version: 1.0 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.42]); Tue, 20 Nov 2018 16:17:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Similar to libvirt_virDomainBlockCopy (and migration API's). Create the code for the new API. Signed-off-by: John Ferlan --- generator.py | 1 + libvirt-override-api.xml | 8 +++++++ libvirt-override.c | 51 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+) diff --git a/generator.py b/generator.py index bd7ff11..6cb923f 100755 --- a/generator.py +++ b/generator.py @@ -440,6 +440,7 @@ skip_impl =3D ( 'virDomainPinEmulator', 'virDomainGetIOThreadInfo', 'virDomainPinIOThread', + 'virDomainSetIOThreadParams', 'virSecretGetValue', 'virSecretSetValue', 'virSecretGetUUID', diff --git a/libvirt-override-api.xml b/libvirt-override-api.xml index 4e8d6c0..0a68d32 100644 --- a/libvirt-override-api.xml +++ b/libvirt-override-api.xml @@ -292,6 +292,14 @@ + + Dynamically allow changing the IOThread performance related pa= rameters. This function requires privileged access to the hypervisor. + + + + + + Change the scheduler parameters diff --git a/libvirt-override.c b/libvirt-override.c index 0353306..cd03ff1 100644 --- a/libvirt-override.c +++ b/libvirt-override.c @@ -1679,6 +1679,54 @@ libvirt_virDomainPinIOThread(PyObject *self ATTRIBUT= E_UNUSED, =20 #endif /* LIBVIR_CHECK_VERSION(1, 2, 14) */ =20 +#if LIBVIR_CHECK_VERSION(4, 10, 4) + +static virPyTypedParamsHint virPyDomainSetIOThreadParams[] =3D { + { VIR_DOMAIN_IOTHREAD_POLL_MAX_NS, VIR_TYPED_PARAM_ULLONG }, + { VIR_DOMAIN_IOTHREAD_POLL_GROW, VIR_TYPED_PARAM_UINT }, + { VIR_DOMAIN_IOTHREAD_POLL_SHRINK, VIR_TYPED_PARAM_ULLONG }, +}; + +static PyObject * +libvirt_virDomainSetIOThreadParams(PyObject *self ATTRIBUTE_UNUSED, + PyObject *args) +{ + PyObject *pyobj_dom =3D NULL; + PyObject *pyobj_dict =3D NULL; + + virDomainPtr dom; + int iothread_val; + virTypedParameterPtr params =3D NULL; + int nparams =3D 0; + unsigned int flags; + int c_retval; + + if (!PyArg_ParseTuple(args, + (char *)"OiOI:virDomainSetIOThreadParams", + &pyobj_dom, &iothread_val, &pyobj_dict, &flags)) + return NULL; + + if (PyDict_Check(pyobj_dict)) { + if (virPyDictToTypedParams(pyobj_dict, ¶ms, &nparams, + virPyDomainSetIOThreadParams, + VIR_N_ELEMENTS(virPyDomainSetIOThreadPa= rams)) < 0) { + return NULL; + } + } + + dom =3D (virDomainPtr) PyvirDomain_Get(pyobj_dom); + + LIBVIRT_BEGIN_ALLOW_THREADS; + c_retval =3D virDomainSetIOThreadParams(dom, iothread_val, + params, nparams, flags); + LIBVIRT_END_ALLOW_THREADS; + + virTypedParamsFree(params, nparams); + + return libvirt_intWrap(c_retval); +} +#endif /* LIBVIR_CHECK_VERSION(4, 10, 0) */ + /************************************************************************ * * * Global error handler at the Python level * @@ -9975,6 +10023,9 @@ static PyMethodDef libvirtMethods[] =3D { {(char *) "virDomainGetIOThreadInfo", libvirt_virDomainGetIOThreadInfo= , METH_VARARGS, NULL}, {(char *) "virDomainPinIOThread", libvirt_virDomainPinIOThread, METH_V= ARARGS, NULL}, #endif /* LIBVIR_CHECK_VERSION(1, 2, 14) */ +#if LIBVIR_CHECK_VERSION(4, 10, 4) + {(char *) "virDomainSetIOThreadParams", libvirt_virDomainSetIOThreadPa= rams, METH_VARARGS, NULL}, +#endif /* LIBVIR_CHECK_VERSION(4, 10, 0) */ {(char *) "virConnectListStoragePools", libvirt_virConnectListStorageP= ools, METH_VARARGS, NULL}, {(char *) "virConnectListDefinedStoragePools", libvirt_virConnectListD= efinedStoragePools, METH_VARARGS, NULL}, #if LIBVIR_CHECK_VERSION(0, 10, 2) --=20 2.17.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list