[dpdk-dev] [PATCH v3] examples/vm_power_manager: fix build with libvirt version < 0.9.3

Marvin Liu yong.liu at intel.com
Mon Apr 11 12:06:13 CEST 2016


vm_power_manager utilize libvirt API virDomainGetVcpuPinInfo for
retrieve domU vcpu information. This API implemented from version 0.9.3.
Suse11 SP3 32bit default libvirt version is 0.8.8, so there'll be build
error. Add judgement in sample Makefile to alarm unsupport environment.

examples/vm_power_manager/channel_manager.c: In function
‘update_pcpus_mask’:
channel_manager.c:117:3: error: implicit declaration of function
‘virDomainGetVcpuPinInfo’

Fixes: 8db653ff7889 ("vm power management application")

Signed-off-by: Marvin Liu <yong.liu at intel.com>

diff --git a/examples/Makefile b/examples/Makefile
index a8bc381..027ee57 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -87,6 +87,10 @@ DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost
 DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen
 DIRS-y += vmdq
 DIRS-y += vmdq_dcb
+ifeq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
 DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager
+else
+$(warning "vm_power_manager requires libvirt version >= 0.9.3")
+endif
 
 include $(RTE_SDK)/mk/rte.extsubdir.mk
-- 
1.9.3



More information about the dev mailing list