summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2019-01-09 11:27:15 +0100
committerMichal Privoznik <mprivozn@redhat.com>2019-01-09 11:31:58 +0100
commitf886271410cf8b64ce92d0f727efe1b9a922c8c7 (patch)
tree5186d459b05588101d3a58c36f4752318b3afa93
parented357cef18b21c26f15e342b712a7de3f28f9471 (diff)
downloadlibvirt-f886271410cf8b64ce92d0f727efe1b9a922c8c7.tar.gz
qemu: Use ULL instead of uint64_t for RDMA GID event
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 <mprivozn@redhat.com>
-rw-r--r--src/qemu/qemu_monitor.c6
-rw-r--r--src/qemu/qemu_monitor.h12
-rw-r--r--src/qemu/qemu_process.c6
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 = -1;
- VIR_DEBUG("netdev=%s, gid_status=%d, subnet_prefix=0x%lx, interface_id=0x%lx",
+ VIR_DEBUG("netdev=%s, gid_status=%d, subnet_prefix=0x%llx, interface_id=0x%llx",
netdev, gid_status, subnet_prefix, interface_id);
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 (*qemuMonitorDomainRdmaGidStatusChangedCallback)(qemuMonitorPtr mon,
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);
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
@@ -466,9 +466,11 @@ int qemuMonitorEmitPRManagerStatusChanged(qemuMonitorPtr mon,
const char *prManager,
bool connected);
-int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, const char *netdev,
- bool gid_status, uint64_t subnet_prefix,
- uint64_t interface_id);
+int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon,
+ const char *netdev,
+ bool gid_status,
+ unsigned long long subnet_prefix,
+ unsigned long long interface_id);
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 = opaque;
@@ -1731,7 +1731,7 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
virObjectLock(vm);
- VIR_DEBUG("netdev=%s,gid_status=%d,subnet_prefix=0x%lx,interface_id=0x%lx",
+ VIR_DEBUG("netdev=%s,gid_status=%d,subnet_prefix=0x%llx,interface_id=0x%llx",
netdev, gid_status, subnet_prefix, interface_id);
if (VIR_ALLOC(info) < 0 ||