From nobody Wed May 14 19:07:04 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; dmarc=fail(p=none dis=none) header.from=virtuozzo.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1517908436893601.04255187193; Tue, 6 Feb 2018 01:13:56 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6CEAF49012; Tue, 6 Feb 2018 09:13:55 +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 0F56C60BE0; Tue, 6 Feb 2018 09:13:55 +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 B7B9818033D9; Tue, 6 Feb 2018 09:13:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w169DpmY023602 for ; Tue, 6 Feb 2018 04:13:51 -0500 Received: by smtp.corp.redhat.com (Postfix) id BB685510F2; Tue, 6 Feb 2018 09:13:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9599060462 for ; Tue, 6 Feb 2018 09:13:50 +0000 (UTC) Received: from new-relay.sw.ru (new-relay.sw.ru [195.214.232.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91219686BC for ; Tue, 6 Feb 2018 09:13:48 +0000 (UTC) Received: from msk-vpn.virtuozzo.com ([195.214.232.6] helo=dim-vz7.qa.sw.ru) by new-relay.sw.ru with esmtp (Exim 4.89) (envelope-from ) id 1eizJy-0006tL-EA for libvir-list@redhat.com; Tue, 06 Feb 2018 12:13:46 +0300 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Tue, 6 Feb 2018 12:09:11 +0300 Message-Id: <1517908151-337420-7-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1517908151-337420-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1517908151-337420-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.27]); Tue, 06 Feb 2018 09:13:49 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 06 Feb 2018 09:13:49 +0000 (UTC) for IP:'195.214.232.40' DOMAIN:'new-relay.sw.ru' HELO:'new-relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 195.214.232.40 new-relay.sw.ru 195.214.232.40 new-relay.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.27 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 06 Feb 2018 09:13:56 +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 ee09b7e..0e85dff 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 */ virPortAllocatorRangePtr reservedGraphicsPorts; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortAllocatorRangePtr migrationPorts; =20 /* Immutable pointer, lockless APIs*/ diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h index 1640fa9..ff9f65e 100644 --- a/src/qemu/qemu_conf.h +++ b/src/qemu/qemu_conf.h @@ -266,13 +266,13 @@ struct _virQEMUDriver { /* Immutable pointer. Unsafe APIs. XXX */ virHashTablePtr sharedDevices; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortAllocatorRangePtr remotePorts; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortAllocatorRangePtr webSocketPorts; =20 - /* Immutable pointer, self-locking APIs */ + /* Immutable pointer, immutable object */ virPortAllocatorRangePtr migrationPorts; =20 /* Immutable pointer, lockless APIs*/ diff --git a/src/util/virportallocator.c b/src/util/virportallocator.c index 8620372..25200fb 100644 --- a/src/util/virportallocator.c +++ b/src/util/virportallocator.c @@ -213,7 +213,7 @@ virPortAllocatorGet(void) } =20 int -virPortAllocatorAcquire(virPortAllocatorRangePtr range, +virPortAllocatorAcquire(const virPortAllocatorRange *range, unsigned short *port) { int ret =3D -1; diff --git a/src/util/virportallocator.h b/src/util/virportallocator.h index 11696b7..de0209c 100644 --- a/src/util/virportallocator.h +++ b/src/util/virportallocator.h @@ -35,7 +35,7 @@ virPortAllocatorRangeNew(const char *name, =20 void virPortAllocatorRangeFree(virPortAllocatorRangePtr range); =20 -int virPortAllocatorAcquire(virPortAllocatorRangePtr range, +int virPortAllocatorAcquire(const virPortAllocatorRange *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