mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +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
|
||||
virDomainDefHasOldStyleUEFI(const virDomainDef *def)
|
||||
{
|
||||
|
@ -4061,6 +4061,9 @@ virDomainDefHasVFIOHostdev(const virDomainDef *def);
|
||||
bool
|
||||
virDomainDefHasMdevHostdev(const virDomainDef *def);
|
||||
|
||||
bool
|
||||
virDomainDefHasVDPANet(const virDomainDef *def);
|
||||
|
||||
bool
|
||||
virDomainDefHasOldStyleUEFI(const virDomainDef *def);
|
||||
|
||||
|
@ -332,6 +332,7 @@ virDomainDefHasOldStyleROUEFI;
|
||||
virDomainDefHasOldStyleUEFI;
|
||||
virDomainDefHasUSB;
|
||||
virDomainDefHasVcpusOffline;
|
||||
virDomainDefHasVDPANet;
|
||||
virDomainDefHasVFIOHostdev;
|
||||
virDomainDefLifecycleActionAllowed;
|
||||
virDomainDefMaybeAddController;
|
||||
|
Loading…
Reference in New Issue
Block a user