From nobody Mon Feb 9 08:29:56 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621524983; cv=none; d=zohomail.com; s=zohoarc; b=YMg/q741bxQIYJQgn9kYmvHU3d77s3krPl8jMy0rr1ioLeSkuvHFsvgSWwFNvSQ+3Rk7q/rbAdzNir9WXYrNd8PieKbME1wfeZrIHTIbMSuqCMVT0ezcl8PtDOe04b0+GYsQB+fV1MI3DRD178nWBwzJI3hZjOgXPKgaq7rOpYc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621524983; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=b4ie9n1v8Za8zYa5wNnoCibFRsN3BOBlVuvDfzEeaqE=; b=KlVysUkYJrigHaMOYKnc8pk0VV0mL9LG0OjyWbNUfusQ6E+pk5rGRCJRj39Nw3CZLcOIFfGd6VtaD7DsvoYWXc4VHtfZB5eL5ss8mLBbK2pQA87ml7o86DIuPmdIVysNeo0u/XlYrOQiUHaaA4qWaYWiTdYvTYgRc0VKXJy9g5s= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1621524983798559.9709421686737; Thu, 20 May 2021 08:36:23 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-109-4D7XyBKaNkaIIXkwnhbHyQ-1; Thu, 20 May 2021 11:36:19 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86024593C3; Thu, 20 May 2021 15:36:13 +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 50B9760C03; Thu, 20 May 2021 15:36:13 +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 1579C55355; Thu, 20 May 2021 15:36:13 +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 14KFPV4P018226 for ; Thu, 20 May 2021 11:25:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id DC451687F0; Thu, 20 May 2021 15:25:31 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.244]) by smtp.corp.redhat.com (Postfix) with ESMTP id 60A25687EC for ; Thu, 20 May 2021 15:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621524982; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=b4ie9n1v8Za8zYa5wNnoCibFRsN3BOBlVuvDfzEeaqE=; b=e8GvBYm49v2q7x2OrD1ID2Kdj9Rc35F6NGnUnLN++O9DwrF3iUwGKwZO3VUTkZSL43/rgd goAIfVK9QZ0/6bJ1tMO1ZO5GB2BKfeap/dTbefD1l32Ouln3DPHMluH40qFSDaD9N0N9W7 uXQHTCVj4sFsPHji3qHvo0CwOo1IYeA= X-MC-Unique: 4D7XyBKaNkaIIXkwnhbHyQ-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/4] numa_conf: Rename virDomainNumaDistance to virNumaDistance Date: Thu, 20 May 2021 17:24:54 +0200 Message-Id: <2b70d8e3350616177b191287e06142298bb62fbc.1621524173.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" There's nothing domain specific about NUMA distances. Rename the virDomainNumaDistance structure to just virNumaDistance. Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/conf/numa_conf.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c index 537e515b5a..fa39c1ccc0 100644 --- a/src/conf/numa_conf.c +++ b/src/conf/numa_conf.c @@ -82,7 +82,7 @@ VIR_ENUM_IMPL(virDomainMemoryLatency, "write" ); =20 -typedef struct _virDomainNumaDistance virDomainNumaDistance; +typedef struct _virNumaDistance virNumaDistance; =20 typedef struct _virDomainNumaCache virDomainNumaCache; =20 @@ -106,7 +106,7 @@ struct _virDomainNuma { virDomainMemoryAccess memAccess; /* shared memory access configura= tion */ virTristateBool discard; /* discard-data for memory-backend-file */ =20 - struct _virDomainNumaDistance { + struct _virNumaDistance { unsigned int value; /* locality value for node i->j or j->i */ unsigned int cellid; } *distances; /* remote node distances */ @@ -759,8 +759,8 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def, } =20 for (i =3D 0; i < sibling; i++) { - virDomainNumaDistance *ldist; - virDomainNumaDistance *rdist; + virNumaDistance *ldist; + virNumaDistance *rdist; unsigned int sibling_id, sibling_value; =20 if (virXMLPropUInt(nodes[i], "id", 10, VIR_XML_PROP_REQUIRED, @@ -799,7 +799,7 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def, /* Apply the local / remote distance */ ldist =3D def->mem_nodes[cur_cell].distances; if (!ldist) { - ldist =3D g_new0(virDomainNumaDistance, ndistances); + ldist =3D g_new0(virNumaDistance, ndistances); ldist[cur_cell].value =3D LOCAL_DISTANCE; ldist[cur_cell].cellid =3D cur_cell; def->mem_nodes[cur_cell].ndistances =3D ndistances; @@ -812,7 +812,7 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNuma *def, /* Apply symmetry if none given */ rdist =3D def->mem_nodes[sibling_id].distances; if (!rdist) { - rdist =3D g_new0(virDomainNumaDistance, ndistances); + rdist =3D g_new0(virNumaDistance, ndistances); rdist[sibling_id].value =3D LOCAL_DISTANCE; rdist[sibling_id].cellid =3D sibling_id; def->mem_nodes[sibling_id].ndistances =3D ndistances; @@ -1133,7 +1133,7 @@ virDomainNumaDefFormatXML(virBuffer *buf, virTristateBoolTypeToString(discard)); =20 if (def->mem_nodes[i].ndistances) { - virDomainNumaDistance *distances =3D def->mem_nodes[i].distanc= es; + virNumaDistance *distances =3D def->mem_nodes[i].distances; =20 virBufferAddLit(&childBuf, "\n"); virBufferAdjustIndent(&childBuf, 2); @@ -1501,7 +1501,7 @@ virDomainNumaGetNodeDistance(virDomainNuma *numa, size_t node, size_t cellid) { - virDomainNumaDistance *distances =3D NULL; + virNumaDistance *distances =3D NULL; =20 if (node < numa->nmem_nodes) distances =3D numa->mem_nodes[node].distances; @@ -1526,7 +1526,7 @@ virDomainNumaSetNodeDistance(virDomainNuma *numa, size_t cellid, unsigned int value) { - virDomainNumaDistance *distances; + virNumaDistance *distances; =20 if (node >=3D numa->nmem_nodes) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -1579,7 +1579,7 @@ virDomainNumaSetNodeDistanceCount(virDomainNuma *numa, size_t node, size_t ndistances) { - virDomainNumaDistance *distances; + virNumaDistance *distances; =20 distances =3D numa->mem_nodes[node].distances; if (distances) { @@ -1589,7 +1589,7 @@ virDomainNumaSetNodeDistanceCount(virDomainNuma *numa, return 0; } =20 - distances =3D g_new0(struct _virDomainNumaDistance, ndistances); + distances =3D g_new0(virNumaDistance, ndistances); =20 numa->mem_nodes[node].distances =3D distances; numa->mem_nodes[node].ndistances =3D ndistances; --=20 2.26.3