DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check
Date: Mon, 11 Apr 2016 12:32:52 +0200	[thread overview]
Message-ID: <1460370772-17663-1-git-send-email-thomas.monjalon@6wind.com> (raw)
In-Reply-To: <1460369173-30343-1-git-send-email-yong.liu@intel.com>

From: Marvin Liu <yong.liu@intel.com>

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 <yong.liu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 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

  reply	other threads:[~2016-04-11 10:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-11  3:45 [dpdk-dev] [PATCH] examples/vm_power_manager: fix build with libvirt version < 0.9.3 Marvin Liu
2016-04-11  7:24 ` Thomas Monjalon
2016-04-11  8:48   ` Liu, Yong
2016-04-11  8:50 ` [dpdk-dev] [PATCH v2] " Marvin Liu
2016-04-11  9:26   ` Thomas Monjalon
2016-04-11  9:32     ` Thomas Monjalon
2016-04-11  9:46     ` Liu, Yong
2016-04-11 10:06 ` [dpdk-dev] [PATCH v3] " Marvin Liu
2016-04-11 10:32   ` Thomas Monjalon [this message]
2016-04-11 10:37     ` [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check Bruce Richardson
2016-04-11 10:43     ` [dpdk-dev] [PATCH v5] " Thomas Monjalon
2016-04-11 12:30       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460370772-17663-1-git-send-email-thomas.monjalon@6wind.com \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=yong.liu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).