From patchwork Mon Apr 11 10:06:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marvin Liu X-Patchwork-Id: 12009 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7F2A84AAD; Mon, 11 Apr 2016 12:06:26 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 13A1847D0 for ; Mon, 11 Apr 2016 12:06:24 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP; 11 Apr 2016 03:06:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,462,1455004800"; d="scan'208";a="942610891" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 11 Apr 2016 03:06:23 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u3BA6LCJ009257; Mon, 11 Apr 2016 18:06:21 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u3BA6JON030384; Mon, 11 Apr 2016 18:06:21 +0800 Received: (from yliu84x@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u3BA6JSN030380; Mon, 11 Apr 2016 18:06:19 +0800 From: Marvin Liu To: dev@dpdk.org Cc: Marvin Liu Date: Mon, 11 Apr 2016 18:06:13 +0800 Message-Id: <1460369173-30343-1-git-send-email-yong.liu@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1460346357-26592-1-git-send-email-yong.liu@intel.com> References: <1460346357-26592-1-git-send-email-yong.liu@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v3] examples/vm_power_manager: fix build with libvirt version < 0.9.3 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 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