mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
conf: new function virDomainDefHasVDPANet()
This function returns true if the domain has any interfaces that are type='vdpa'. Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
This commit is contained in:
parent
0c30e7221c
commit
43d8d16161
@ -32442,6 +32442,20 @@ virDomainDefHasMdevHostdev(const virDomainDef *def)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool
|
||||||
|
virDomainDefHasVDPANet(const virDomainDef *def)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
for (i = 0; i < def->nnets; i++) {
|
||||||
|
if (virDomainNetGetActualType(def->nets[i]) == VIR_DOMAIN_NET_TYPE_VDPA)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
virDomainDefHasOldStyleUEFI(const virDomainDef *def)
|
virDomainDefHasOldStyleUEFI(const virDomainDef *def)
|
||||||
{
|
{
|
||||||
|
@ -4061,6 +4061,9 @@ virDomainDefHasVFIOHostdev(const virDomainDef *def);
|
|||||||
bool
|
bool
|
||||||
virDomainDefHasMdevHostdev(const virDomainDef *def);
|
virDomainDefHasMdevHostdev(const virDomainDef *def);
|
||||||
|
|
||||||
|
bool
|
||||||
|
virDomainDefHasVDPANet(const virDomainDef *def);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
virDomainDefHasOldStyleUEFI(const virDomainDef *def);
|
virDomainDefHasOldStyleUEFI(const virDomainDef *def);
|
||||||
|
|
||||||
|
@ -332,6 +332,7 @@ virDomainDefHasOldStyleROUEFI;
|
|||||||
virDomainDefHasOldStyleUEFI;
|
virDomainDefHasOldStyleUEFI;
|
||||||
virDomainDefHasUSB;
|
virDomainDefHasUSB;
|
||||||
virDomainDefHasVcpusOffline;
|
virDomainDefHasVcpusOffline;
|
||||||
|
virDomainDefHasVDPANet;
|
||||||
virDomainDefHasVFIOHostdev;
|
virDomainDefHasVFIOHostdev;
|
||||||
virDomainDefLifecycleActionAllowed;
|
virDomainDefLifecycleActionAllowed;
|
||||||
virDomainDefMaybeAddController;
|
virDomainDefMaybeAddController;
|
||||||
|
Loading…
Reference in New Issue
Block a user