DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/vm_power_manager: fix build with libvirt version < 0.9.3
@ 2016-04-11  3:45 Marvin Liu
  2016-04-11  7:24 ` Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Marvin Liu @ 2016-04-11  3:45 UTC (permalink / raw)
  To: dev; +Cc: Marvin Liu

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 skip 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: 2e099bc5d104 ("fix split of compiler and linker options")

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

diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 113dbc4..49a6b9b 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -33,9 +33,19 @@ ifeq ($(RTE_SDK),)
 $(error "Please define RTE_SDK environment variable")
 endif
 
+LIBVIRT_COMMON = libvirt-common.h
+LIBVIRT_HEADER = libvirt.h
+INCLUDE_PATH = /usr/include/libvirt/
+
+HEADER_FILE = $(shell if [ -f $(INCLUDE_PATH)$(LIBVIRT_COMMON) ]; then echo $(LIBVIRT_COMMON);else echo $(LIBVIRT_HEADER); fi;)
+LIBVIRT_INCLUDE = $(INCLUDE_PATH)$(HEADER_FILE)
+
+LIBVIR_VER = $(shell gawk '/LIBVIR_VERSION_NUMBER .*/{print $$3}' $(LIBVIRT_INCLUDE))
+
 # Default target, can be overridden by command line or environment
 RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
+ifeq ($(shell test $(LIBVIR_VER) -ge 00009003 && echo 1), 1)
 include $(RTE_SDK)/mk/rte.vars.mk
 
 # binary name
@@ -57,3 +67,10 @@ CFLAGS_main.o += -Wno-return-type
 endif
 
 include $(RTE_SDK)/mk/rte.extapp.mk
+
+else
+.PHONY: all clean
+all:
+$(warning "vm_power_manager required libvirt version >= 0.9.3, please update libvirt-devel first")
+clean:
+endif
-- 
1.9.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vm_power_manager: fix build with libvirt version < 0.9.3
  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 10:06 ` [dpdk-dev] [PATCH v3] " Marvin Liu
  2 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2016-04-11  7:24 UTC (permalink / raw)
  To: Marvin Liu; +Cc: dev

2016-04-11 11:45, Marvin Liu:
> 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 skip 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: 2e099bc5d104 ("fix split of compiler and linker options")

I think the issue has always been there:
Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in host")

> +LIBVIRT_COMMON = libvirt-common.h
> +LIBVIRT_HEADER = libvirt.h
> +INCLUDE_PATH = /usr/include/libvirt/

You cannot assume it will be installed in this directory.
Please check the version with the standard pkg-config:
	pkg-config --atleast-version=0.9.3 libvirt
It can work even in cross compilation environment thanks to PKG_CONFIG_PATH.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/vm_power_manager: fix build with libvirt version < 0.9.3
  2016-04-11  7:24 ` Thomas Monjalon
@ 2016-04-11  8:48   ` Liu, Yong
  0 siblings, 0 replies; 12+ messages in thread
From: Liu, Yong @ 2016-04-11  8:48 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

Thanks Thomas,  I'll send v2 for it.

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, April 11, 2016 3:24 PM
> To: Liu, Yong
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] examples/vm_power_manager: fix build with
> libvirt version < 0.9.3
> 
> 2016-04-11 11:45, Marvin Liu:
> > 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 skip 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: 2e099bc5d104 ("fix split of compiler and linker options")
> 
> I think the issue has always been there:
> Fixes: e8ae9b662506 ("examples/vm_power: channel manager and monitor in
> host")
> 
> > +LIBVIRT_COMMON = libvirt-common.h
> > +LIBVIRT_HEADER = libvirt.h
> > +INCLUDE_PATH = /usr/include/libvirt/
> 
> You cannot assume it will be installed in this directory.
> Please check the version with the standard pkg-config:
> 	pkg-config --atleast-version=0.9.3 libvirt
> It can work even in cross compilation environment thanks to
> PKG_CONFIG_PATH.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3
  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:50 ` Marvin Liu
  2016-04-11  9:26   ` Thomas Monjalon
  2016-04-11 10:06 ` [dpdk-dev] [PATCH v3] " Marvin Liu
  2 siblings, 1 reply; 12+ messages in thread
From: Marvin Liu @ 2016-04-11  8:50 UTC (permalink / raw)
  To: dev; +Cc: Marvin Liu

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 skip 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: 2e099bc5d104 ("fix split of compiler and linker options")

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

diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 113dbc4..08e301f 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -36,6 +36,9 @@ endif
 # Default target, can be overridden by command line or environment
 RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
+# check libvirt version >= 0.9.3
+ifeq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
+
 include $(RTE_SDK)/mk/rte.vars.mk
 
 # binary name
@@ -57,3 +60,10 @@ CFLAGS_main.o += -Wno-return-type
 endif
 
 include $(RTE_SDK)/mk/rte.extapp.mk
+
+else
+.PHONY: all clean
+all:
+$(info "vm_power_manager required libvirt version >= 0.9.3, please update libvirt-devel first")
+clean:
+endif
-- 
1.9.3

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3
  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
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas Monjalon @ 2016-04-11  9:26 UTC (permalink / raw)
  To: Marvin Liu; +Cc: dev

2016-04-11 16:50, Marvin Liu:
> Fixes: 2e099bc5d104 ("fix split of compiler and linker options")

As commented earlier, I don't think it is the origin of the issue.

> +$(info "vm_power_manager required libvirt version >= 0.9.3, please update libvirt-devel first")

"required" should be "requires".
libvirt-devel is the name of the package on some distributions, but
it is not always the case. Moreover, the whole libvirt package must be
updated atomically, not only the headers. That's why I think it's better
to remove this part and just keep:
	"vm_power_manager requires libvirt version >= 0.9.3"

Other issue: it would better to use $(error to generate a compilation error.
But the example should not be skipped from examples/Makefile in this case.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3
  2016-04-11  9:26   ` Thomas Monjalon
@ 2016-04-11  9:32     ` Thomas Monjalon
  2016-04-11  9:46     ` Liu, Yong
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2016-04-11  9:32 UTC (permalink / raw)
  To: Marvin Liu; +Cc: dev

2016-04-11 11:26, Thomas Monjalon:
> 2016-04-11 16:50, Marvin Liu:
> > Fixes: 2e099bc5d104 ("fix split of compiler and linker options")
> 
> As commented earlier, I don't think it is the origin of the issue.
> 
> > +$(info "vm_power_manager required libvirt version >= 0.9.3, please update libvirt-devel first")
> 
> "required" should be "requires".
> libvirt-devel is the name of the package on some distributions, but
> it is not always the case. Moreover, the whole libvirt package must be
> updated atomically, not only the headers. That's why I think it's better
> to remove this part and just keep:
> 	"vm_power_manager requires libvirt version >= 0.9.3"
> 
> Other issue: it would better to use $(error to generate a compilation error.
> But the example should not be skipped from examples/Makefile in this case.

Sorry I mean the example *should be* skipped from examples/Makefile,
with the small message "vm_power_manager requires libvirt >= 0.9.3".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build with libvirt version < 0.9.3
  2016-04-11  9:26   ` Thomas Monjalon
  2016-04-11  9:32     ` Thomas Monjalon
@ 2016-04-11  9:46     ` Liu, Yong
  1 sibling, 0 replies; 12+ messages in thread
From: Liu, Yong @ 2016-04-11  9:46 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Monday, April 11, 2016 5:27 PM
> To: Liu, Yong
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v2] examples/vm_power_manager: fix build
> with libvirt version < 0.9.3
> 
> 2016-04-11 16:50, Marvin Liu:
> > Fixes: 2e099bc5d104 ("fix split of compiler and linker options")
> 
> As commented earlier, I don't think it is the origin of the issue.
> 
Yes, this issue existed from the original. 2e099bc5d104 is the first buildable version. I will change commit to original version. 

> > +$(info "vm_power_manager required libvirt version >= 0.9.3, please
> update libvirt-devel first")
> 
> "required" should be "requires".
> libvirt-devel is the name of the package on some distributions, but
> it is not always the case. Moreover, the whole libvirt package must be
> updated atomically, not only the headers. That's why I think it's better
> to remove this part and just keep:
> 	"vm_power_manager requires libvirt version >= 0.9.3"
> 
> Other issue: it would better to use $(error to generate a compilation
> error.
> But the example should not be skipped from examples/Makefile in this case.

Thanks, will generate error when libvirt not meet requirement.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v3] examples/vm_power_manager: fix build with libvirt version < 0.9.3
  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:50 ` [dpdk-dev] [PATCH v2] " Marvin Liu
@ 2016-04-11 10:06 ` Marvin Liu
  2016-04-11 10:32   ` [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check Thomas Monjalon
  2 siblings, 1 reply; 12+ messages in thread
From: Marvin Liu @ 2016-04-11 10:06 UTC (permalink / raw)
  To: dev; +Cc: Marvin Liu

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@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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check
  2016-04-11 10:06 ` [dpdk-dev] [PATCH v3] " Marvin Liu
@ 2016-04-11 10:32   ` Thomas Monjalon
  2016-04-11 10:37     ` Bruce Richardson
  2016-04-11 10:43     ` [dpdk-dev] [PATCH v5] " Thomas Monjalon
  0 siblings, 2 replies; 12+ messages in thread
From: Thomas Monjalon @ 2016-04-11 10:32 UTC (permalink / raw)
  To: dev; +Cc: Marvin Liu

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check
  2016-04-11 10:32   ` [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check Thomas Monjalon
@ 2016-04-11 10:37     ` Bruce Richardson
  2016-04-11 10:43     ` [dpdk-dev] [PATCH v5] " Thomas Monjalon
  1 sibling, 0 replies; 12+ messages in thread
From: Bruce Richardson @ 2016-04-11 10:37 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Marvin Liu

On Mon, Apr 11, 2016 at 12:32:52PM +0200, Thomas Monjalon wrote:
> 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
> 
Yes, that is the correct way to fix it, I believe.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [dpdk-dev] [PATCH v5] examples/vm_power_manager: fix libvirt dependency check
  2016-04-11 10:32   ` [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check Thomas Monjalon
  2016-04-11 10:37     ` Bruce Richardson
@ 2016-04-11 10:43     ` Thomas Monjalon
  2016-04-11 12:30       ` Thomas Monjalon
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2016-04-11 10:43 UTC (permalink / raw)
  To: dev; +Cc: Marvin Liu

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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
 examples/Makefile                  | 8 +++++++-
 examples/vm_power_manager/Makefile | 6 ++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

v5: do not warn if CONFIG_RTE_LIBRTE_POWER is disabled

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..b28b30e 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -87,6 +87,12 @@ DIRS-$(CONFIG_RTE_LIBRTE_VHOST) += vhost
 DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen
 DIRS-y += vmdq
 DIRS-y += vmdq_dcb
-DIRS-$(CONFIG_RTE_LIBRTE_POWER) += vm_power_manager
+ifeq ($(CONFIG_RTE_LIBRTE_POWER), y)
+ifeq ($(shell pkg-config --atleast-version=0.9.3 libvirt; echo $$?), 0)
+DIRS-y += vm_power_manager
+else
+$(info vm_power_manager requires libvirt >= 0.9.3)
+endif
+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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [dpdk-dev] [PATCH v5] examples/vm_power_manager: fix libvirt dependency check
  2016-04-11 10:43     ` [dpdk-dev] [PATCH v5] " Thomas Monjalon
@ 2016-04-11 12:30       ` Thomas Monjalon
  0 siblings, 0 replies; 12+ messages in thread
From: Thomas Monjalon @ 2016-04-11 12:30 UTC (permalink / raw)
  To: Marvin Liu; +Cc: dev

> 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>
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-04-11 12:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` [dpdk-dev] [PATCH v4] examples/vm_power_manager: fix libvirt dependency check Thomas Monjalon
2016-04-11 10:37     ` Bruce Richardson
2016-04-11 10:43     ` [dpdk-dev] [PATCH v5] " Thomas Monjalon
2016-04-11 12:30       ` Thomas Monjalon

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).