From nobody Fri Apr 26 04:14:37 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 1547036406697285.3438277392845; Wed, 9 Jan 2019 04:20:06 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 196E68AE44; Wed, 9 Jan 2019 12:20:02 +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 67B2B10A1832; Wed, 9 Jan 2019 12:20:01 +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 7E8EAC584; Wed, 9 Jan 2019 12:19:59 +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 x09CJw2H023993 for ; Wed, 9 Jan 2019 07:19:58 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2A805608DD; Wed, 9 Jan 2019 12:19:58 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id A32B5608DA for ; Wed, 9 Jan 2019 12:19:54 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Wed, 9 Jan 2019 13:19:52 +0100 Message-Id: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Use ULL instead of uint64_t for RDMA GID event 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.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 09 Jan 2019 12:20:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" In the previous commit we are using uint64_t for storing subnet prefix and interface id that qemu reports in RDMA_GID_STATUS_CHANGED event. We also report them in some debug messages. This poses a problem because uint64_t can be UL or ULL depending on the host architecture and hence we wouldn't know which format to use. Switch to ULL which is big enough and doesn't suffer from the issue. Signed-off-by: Michal Privoznik --- Pushed under build breaker and trivial rules. src/qemu/qemu_monitor.c | 6 +++--- src/qemu/qemu_monitor.h | 12 +++++++----- src/qemu/qemu_process.c | 6 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 419ea66a6a..7ce5bd668e 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1688,11 +1688,11 @@ int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, const char *netdev, bool gid_status, - uint64_t subnet_prefix, - uint64_t interface_id) + unsigned long long subnet_prefix, + unsigned long long interface_id) { int ret =3D -1; - VIR_DEBUG("netdev=3D%s, gid_status=3D%d, subnet_prefix=3D0x%lx, interf= ace_id=3D0x%lx", + VIR_DEBUG("netdev=3D%s, gid_status=3D%d, subnet_prefix=3D0x%llx, inter= face_id=3D0x%llx", netdev, gid_status, subnet_prefix, interface_id); =20 QEMU_MONITOR_CALLBACK(mon, ret, domainRdmaGidStatusChanged, mon->vm, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 93804233db..8fcac8850f 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -294,8 +294,8 @@ typedef int (*qemuMonitorDomainRdmaGidStatusChangedCall= back)(qemuMonitorPtr mon, virDomainObjP= tr vm, const char *n= etdev, bool gid_stat= us, - uint64_t subn= et_prefix, - uint64_t inte= rface_id, + unsigned long= long subnet_prefix, + unsigned long= long interface_id, void *opaque); =20 typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks; @@ -466,9 +466,11 @@ int qemuMonitorEmitPRManagerStatusChanged(qemuMonitorP= tr mon, const char *prManager, bool connected); =20 -int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, const char *ne= tdev, - bool gid_status, uint64_t subnet_p= refix, - uint64_t interface_id); +int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, + const char *netdev, + bool gid_status, + unsigned long long subnet_prefix, + unsigned long long interface_id); =20 int qemuMonitorStartCPUs(qemuMonitorPtr mon); int qemuMonitorStopCPUs(qemuMonitorPtr mon); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 83a054663f..aad6c12552 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1720,8 +1720,8 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr = mon ATTRIBUTE_UNUSED, virDomainObjPtr vm, const char *netdev, bool gid_status, - uint64_t subnet_prefix, - uint64_t interface_id, + unsigned long long subnet_prefix, + unsigned long long interface_id, void *opaque) { virQEMUDriverPtr driver =3D opaque; @@ -1731,7 +1731,7 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr = mon ATTRIBUTE_UNUSED, =20 virObjectLock(vm); =20 - VIR_DEBUG("netdev=3D%s,gid_status=3D%d,subnet_prefix=3D0x%lx,interface= _id=3D0x%lx", + VIR_DEBUG("netdev=3D%s,gid_status=3D%d,subnet_prefix=3D0x%llx,interfac= e_id=3D0x%llx", netdev, gid_status, subnet_prefix, interface_id); =20 if (VIR_ALLOC(info) < 0 || --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list