libvirt/src/conf
Daniel P. Berrangé 68dc579f43 conf: rewrite filtering for capabilities lookup
The virCapabilitiesDomainDataLookupInternal() is given a list of
parameters representing the desired domain characteristics. It then has
to look throught the capabilities to identify an acceptable match.

The virCapsDomainDataCompare() method is used for filtering out
candidates which don't match the desired criteria. It is called
primarily from the innermost loops and as such is doing many repeated
checks. For example if architcture and os type were checked at the top
level loop the two inner loops could be avoided entirely. If emulator
and domain type were checked in the 2nd level loop the 3rd level loop
can be avoided too.

This change thus removes the virCapsDomainDataCompare() method and puts
suitable checks at the start of each loop to ensure it executes the
minimal number of loop iterations possible. The code becomes clearer to
understand as a nice side-effect.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-08-10 12:06:04 +01:00
..
capabilities.c conf: rewrite filtering for capabilities lookup 2018-08-10 12:06:04 +01:00
capabilities.h capabilities: Extend capabilities with iommu_support 2018-06-05 08:33:13 +02:00
cpu_conf.c
cpu_conf.h
device_conf.c
device_conf.h
domain_addr.c domain_addr: make virDomainUSBAddressPortFormat static 2018-07-04 07:17:22 +02:00
domain_addr.h domain_addr: make virDomainUSBAddressPortFormat static 2018-07-04 07:17:22 +02:00
domain_audit.c audit: Share virtType fallback logic 2018-07-27 15:41:21 -04:00
domain_audit.h
domain_capabilities.c conf: Fix formatting of <sev> element in domain capabilities XML 2018-06-15 10:49:13 +02:00
domain_capabilities.h conf: Expose SEV feature in domain capabilities 2018-06-12 09:52:00 +02:00
domain_conf.c conf: introduce initiator IQN support for domain disks 2018-08-08 17:33:12 +02:00
domain_conf.h conf: don't use virDomainVirtType in struct field 2018-07-26 15:50:31 +01:00
domain_event.c
domain_event.h
domain_nwfilter.c domain_nwfilter: Return early if net has no name in virDomainConfNWFilterTeardownImpl 2018-07-09 16:01:50 +02:00
domain_nwfilter.h nwfilter: convert virt drivers to use public API for nwfilter bindings 2018-06-26 18:17:23 +01:00
interface_conf.c
interface_conf.h
Makefile.inc.am conf: introduce a virNWFilterBindingObjListPtr struct 2018-06-26 11:22:07 +01:00
netdev_bandwidth_conf.c
netdev_bandwidth_conf.h
netdev_vlan_conf.c
netdev_vlan_conf.h
netdev_vport_profile_conf.c src: Make virStr*cpy*() functions return an int 2018-07-23 14:27:30 +02:00
netdev_vport_profile_conf.h
network_conf.c network: Use 'switch' control statement with virNetworkForwardType enum 2018-07-25 14:33:52 +02:00
network_conf.h
network_event.c
network_event.h
networkcommon_conf.c
networkcommon_conf.h
node_device_conf.c
node_device_conf.h
node_device_event.c
node_device_event.h
numa_conf.c conf: Introduce memoryBacking/discard 2018-05-14 09:42:20 +02:00
numa_conf.h conf: Introduce memoryBacking/discard 2018-05-14 09:42:20 +02:00
nwfilter_conf.c src: Make virStr*cpy*() functions return an int 2018-07-23 14:27:30 +02:00
nwfilter_conf.h nwfilter: remove virt driver callback layer for rebuilding filters 2018-06-26 18:17:20 +01:00
nwfilter_ipaddrmap.c
nwfilter_ipaddrmap.h
nwfilter_params.c
nwfilter_params.h conf: add missing virxml.h include for nwfilter_params.h 2018-06-26 11:22:07 +01:00
object_event_private.h
object_event.c events: move NULL check to EventStateQueueRemote 2018-06-12 07:28:35 +02:00
object_event.h events: Remove ATTRIBUTE_NONNULL for virObjectEventStateQueue[Remote] 2018-06-18 17:03:51 -04:00
secret_conf.c
secret_conf.h
secret_event.c
secret_event.h
snapshot_conf.c conf: Replace SKIP_OSTYPE_CHECKS with SKIP_VALIDATE 2018-07-26 10:13:00 -04:00
snapshot_conf.h
storage_adapter_conf.c
storage_adapter_conf.h
storage_conf.c conf: use virStorageSourceInitiator functions 2018-08-08 17:33:12 +02:00
storage_conf.h conf: rename and move virStoragePoolSourceInitiatorAttr 2018-08-08 17:33:12 +02:00
storage_event.c
storage_event.h
virchrdev.c
virchrdev.h
virdomainobjlist.c conf: Replace SKIP_OSTYPE_CHECKS with SKIP_VALIDATE 2018-07-26 10:13:00 -04:00
virdomainobjlist.h
virinterfaceobj.c test: Implement virConnectListAllInterfaces 2018-07-19 09:47:01 -04:00
virinterfaceobj.h test: Implement virConnectListAllInterfaces 2018-07-19 09:47:01 -04:00
virnetworkobj.c network: Use 'switch' control statement with virNetworkForwardType enum 2018-07-25 14:33:52 +02:00
virnetworkobj.h
virnodedeviceobj.c conf: nodedev: Don't refresh host caps in testdriver 2018-07-17 14:06:12 -04:00
virnodedeviceobj.h conf: nodedev: Don't refresh host caps in testdriver 2018-07-17 14:06:12 -04:00
virnwfilterbindingdef.c conf: add support for parsing/formatting virNWFilterBindingDefPtr 2018-06-26 11:22:07 +01:00
virnwfilterbindingdef.h conf: add support for parsing/formatting virNWFilterBindingDefPtr 2018-06-26 11:22:07 +01:00
virnwfilterbindingobj.c conf: introduce a virNWFilterBindingObjListPtr struct 2018-06-26 11:22:07 +01:00
virnwfilterbindingobj.h conf: introduce a virNWFilterBindingObjPtr struct 2018-06-26 11:22:07 +01:00
virnwfilterbindingobjlist.c conf: introduce a virNWFilterBindingObjListPtr struct 2018-06-26 11:22:07 +01:00
virnwfilterbindingobjlist.h conf: introduce a virNWFilterBindingObjListPtr struct 2018-06-26 11:22:07 +01:00
virnwfilterobj.c nwfilter: remove virt driver callback layer for rebuilding filters 2018-06-26 18:17:20 +01:00
virnwfilterobj.h nwfilter: keep track of active filter bindings 2018-06-26 18:17:13 +01:00
virsavecookie.c
virsavecookie.h
virsecretobj.c
virsecretobj.h
virstorageobj.c storage: Introduce iscsi_direct pool type 2018-08-06 12:23:55 +02:00
virstorageobj.h