From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 311C911A2 for ; Mon, 11 Apr 2016 12:32:58 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id n3so98273598wmn.0 for ; Mon, 11 Apr 2016 03:32:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OlpJCZ1pMIaIdcFD10zEc0Hrx0ZoR3oYDP1H1duvNjU=; b=m6S41jsS2tZqhDBpeXBUQK7fIr7+dBrYP9ix4qoP7d90YbtJO7dMe464LGwNHvTh7F SDq8ixSfBa0nlez0GUPApAcHbvYLu1t9KcYEHRAJCYnns6WZNUqW1PgTvFU8wX57i3oh nUkOjLNSu9uKbqJmMrZshW8GXbJUx8MwLg0QAtRxBeYmuhR2WgLO/iKpwzypP8LS90fn ++Kd+nuF41HUYjelky3JUxqgQ0jMX9IwIuLcg6AWnMtobgNqiQckqZcYAHxvrgFNIWHl KfNSS0EHpO1u2HvXw0m2x2kpbW90a+VRZlpqfxyWFrMxJP9Y8c3HIrMn1XAY5UbdSUg6 c/ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OlpJCZ1pMIaIdcFD10zEc0Hrx0ZoR3oYDP1H1duvNjU=; b=iqgzexiTQdscAJppORF5dywfC2NWqy73NIiohAc7QnMoUcHBVG1GIZ/WAEQZaWpO2Z OMixyJ/u9siU80F2n0k7eXauIVzMko+88QynR+jC+Viph6nx9DKpRg3QDCV8YBWTwpGs C22vQcI0dbav3m23V2s4s1ttRxGRphBlh5RYSEUz/UQN3A+0GXQMic9pLzdbKpI38Amq /qsMG99w+5wpV6uuoxk8ltZ4a7Nb8X6fF5amefL7cS9fFWZVnSoHIlmN36uoTOJbxJi+ yOnZWeGbb429+rn1BPPPbOrvrBUh6pHJW97GvK/ZuEjlBkBQYaTsoft1vKDn03F/tn6+ umuQ== X-Gm-Message-State: AOPr4FWmypXatWfxvamE0zBJ7CUe7tyb0yufnw3Bg1MSx0P/D1KMNGYWVKg6Wf4GCiaBiiP+ X-Received: by 10.28.91.199 with SMTP id p190mr8824954wmb.47.1460370777986; Mon, 11 Apr 2016 03:32:57 -0700 (PDT) Received: from XPS13.localdomain (245.111.75.86.rev.sfr.net. [86.75.111.245]) by smtp.gmail.com with ESMTPSA id m6sm27011649wje.21.2016.04.11.03.32.56 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 11 Apr 2016 03:32:57 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Cc: Marvin Liu Date: Mon, 11 Apr 2016 12:32:52 +0200 Message-Id: <1460370772-17663-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1460369173-30343-1-git-send-email-yong.liu@intel.com> References: <1460369173-30343-1-git-send-email-yong.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check 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: , X-List-Received-Date: Mon, 11 Apr 2016 10:32:58 -0000 From: Marvin Liu vm_power_manager utilize libvirt API virDomainGetVcpuPinInfo to retrieve domU vcpu information. This API is implemented from version 0.9.3. Suse11 SP3 32bit default libvirt version is 0.8.8. examples/vm_power_manager/channel_manager.c: channel_manager.c:117:3: error: implicit declaration of function ‘virDomainGetVcpuPinInfo’ Check and skip it from examples or raise an error when trying to compile without libvirt or with a too old libvirt. Fixes: e8ae9b662 ("examples/vm_power: channel manager and monitor in host") Signed-off-by: Marvin Liu Signed-off-by: Thomas Monjalon --- examples/Makefile | 4 ++++ examples/vm_power_manager/Makefile | 6 ++++++ 2 files changed, 10 insertions(+) v4: mix v2 and v3 to skip in examples list but raise an error if trying to compile directly diff --git a/examples/Makefile b/examples/Makefile index a8bc381..fcf1eb7 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 +$(info vm_power_manager requires libvirt >= 0.9.3) +endif include $(RTE_SDK)/mk/rte.extsubdir.mk diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile index 113dbc4..59a9641 100644 --- a/examples/vm_power_manager/Makefile +++ b/examples/vm_power_manager/Makefile @@ -29,6 +29,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +ifneq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0) +$(error vm_power_manager requires libvirt >= 0.9.3) +else + ifeq ($(RTE_SDK),) $(error "Please define RTE_SDK environment variable") endif @@ -57,3 +61,5 @@ CFLAGS_main.o += -Wno-return-type endif include $(RTE_SDK)/mk/rte.extapp.mk + +endif # libvirt check -- 2.7.0