mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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>
This commit is contained in:
parent
ed357cef18
commit
f886271410
@ -1688,11 +1688,11 @@ int
|
|||||||
qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon,
|
qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon,
|
||||||
const char *netdev,
|
const char *netdev,
|
||||||
bool gid_status,
|
bool gid_status,
|
||||||
uint64_t subnet_prefix,
|
unsigned long long subnet_prefix,
|
||||||
uint64_t interface_id)
|
unsigned long long interface_id)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
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);
|
netdev, gid_status, subnet_prefix, interface_id);
|
||||||
|
|
||||||
QEMU_MONITOR_CALLBACK(mon, ret, domainRdmaGidStatusChanged, mon->vm,
|
QEMU_MONITOR_CALLBACK(mon, ret, domainRdmaGidStatusChanged, mon->vm,
|
||||||
|
@ -294,8 +294,8 @@ typedef int (*qemuMonitorDomainRdmaGidStatusChangedCallback)(qemuMonitorPtr mon,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *netdev,
|
const char *netdev,
|
||||||
bool gid_status,
|
bool gid_status,
|
||||||
uint64_t subnet_prefix,
|
unsigned long long subnet_prefix,
|
||||||
uint64_t interface_id,
|
unsigned long long interface_id,
|
||||||
void *opaque);
|
void *opaque);
|
||||||
|
|
||||||
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
|
typedef struct _qemuMonitorCallbacks qemuMonitorCallbacks;
|
||||||
@ -466,9 +466,11 @@ int qemuMonitorEmitPRManagerStatusChanged(qemuMonitorPtr mon,
|
|||||||
const char *prManager,
|
const char *prManager,
|
||||||
bool connected);
|
bool connected);
|
||||||
|
|
||||||
int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon, const char *netdev,
|
int qemuMonitorEmitRdmaGidStatusChanged(qemuMonitorPtr mon,
|
||||||
bool gid_status, uint64_t subnet_prefix,
|
const char *netdev,
|
||||||
uint64_t interface_id);
|
bool gid_status,
|
||||||
|
unsigned long long subnet_prefix,
|
||||||
|
unsigned long long interface_id);
|
||||||
|
|
||||||
int qemuMonitorStartCPUs(qemuMonitorPtr mon);
|
int qemuMonitorStartCPUs(qemuMonitorPtr mon);
|
||||||
int qemuMonitorStopCPUs(qemuMonitorPtr mon);
|
int qemuMonitorStopCPUs(qemuMonitorPtr mon);
|
||||||
|
@ -1720,8 +1720,8 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
virDomainObjPtr vm,
|
virDomainObjPtr vm,
|
||||||
const char *netdev,
|
const char *netdev,
|
||||||
bool gid_status,
|
bool gid_status,
|
||||||
uint64_t subnet_prefix,
|
unsigned long long subnet_prefix,
|
||||||
uint64_t interface_id,
|
unsigned long long interface_id,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
virQEMUDriverPtr driver = opaque;
|
virQEMUDriverPtr driver = opaque;
|
||||||
@ -1731,7 +1731,7 @@ qemuProcessHandleRdmaGidStatusChanged(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
virObjectLock(vm);
|
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);
|
netdev, gid_status, subnet_prefix, interface_id);
|
||||||
|
|
||||||
if (VIR_ALLOC(info) < 0 ||
|
if (VIR_ALLOC(info) < 0 ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user