From nobody Thu May 15 01:35:18 2025 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513751830515488.64143165652126; Tue, 19 Dec 2017 22:37:10 -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 EB52E4E90E; Wed, 20 Dec 2017 06:37: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 CAA4517DF1; Wed, 20 Dec 2017 06:37:08 +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 95EC74A468; Wed, 20 Dec 2017 06:37:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBK6adBB016325 for ; Wed, 20 Dec 2017 01:36:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id B491817B46; Wed, 20 Dec 2017 06:36:39 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AC85717C1A for ; Wed, 20 Dec 2017 06:36:36 +0000 (UTC) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5164356D0 for ; Wed, 20 Dec 2017 06:36:34 +0000 (UTC) Received: from dim-vz7.qa.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id vBJ9IkWk001510 for ; Tue, 19 Dec 2017 12:18:47 +0300 (MSK) From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Wed, 20 Dec 2017 09:35:38 +0300 Message-Id: <1513751738-772066-7-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1513751738-772066-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1513751738-772066-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Greylist: Sender passed SPF test, ACL 227 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 20 Dec 2017 06:36:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 20 Dec 2017 06:36:35 +0000 (UTC) for IP:'195.214.232.25' DOMAIN:'mailhub.sw.ru' HELO:'relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 195.214.232.25 mailhub.sw.ru 195.214.232.25 mailhub.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/6] port allocator: make port range constant object 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 20 Dec 2017 06:37:09 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- src/libxl/libxl_conf.h | 4 ++-- src/qemu/qemu_conf.h | 6 +++--- src/util/virportallocator.c | 2 +- src/util/virportallocator.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libxl/libxl_conf.h b/src/libxl/libxl_conf.h index 3ba8710..457dabd 100644 --- a/src/libxl/libxl_conf.h +++ b/src/libxl/libxl_conf.h @@ -130,10 +130,10 @@ struct _libxlDriverPrivate { /* Immutable pointer, self-locking APIs */ virObjectEventStatePtr domainEventState; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortRangePtr reservedGraphicsPorts; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortRangePtr migrationPorts; =20 /* Immutable pointer, lockless APIs*/ diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index e8c8bd6..b0854ce 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -263,13 +263,13 @@ struct _virQEMUDriver { /* Immutable pointer. Unsafe APIs. XXX */ virHashTablePtr sharedDevices; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortRangePtr remotePorts; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortRangePtr webSocketPorts; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortRangePtr migrationPorts; =20 /* Immutable pointer, lockless APIs*/ diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c index 565715c..3ca3f44 100644 --- a/src/util/virportallocator.c +++ b/src/util/virportallocator.c @@ -207,7 +207,7 @@ static virPortAllocatorPtr virPortAllocatorGet(void) return virPortAllocatorInstance; } =20 -int virPortAllocatorAcquire(virPortRangePtr range, +int virPortAllocatorAcquire(const virPortRange *range, unsigned short *port) { int ret =3D -1; diff --git a/src/util/virportallocator.h b/src/util/virportallocator.h index 3bc3ef2..71a924a 100644 --- a/src/util/virportallocator.h +++ b/src/util/virportallocator.h @@ -34,7 +34,7 @@ virPortRangePtr virPortRangeNew(const char *name, =20 void virPortRangeFree(virPortRangePtr range); =20 -int virPortAllocatorAcquire(virPortRangePtr range, +int virPortAllocatorAcquire(const virPortRange *range, unsigned short *port); =20 int virPortAllocatorRelease(unsigned short port); --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list