[dpdk-dev,08/10] Build system integration for VM Power Management(Guest and Host)
diff mbox

Message ID 1411410879-28872-9-git-send-email-alan.carew@intel.com
State Superseded, archived
Headers show

Commit Message

Alan Carew Sept. 22, 2014, 6:34 p.m. UTC
Add CONFIG_RTE_LIBRTE_POWER_VM to config/common_linuxapp, default=n
As both host and guest side rely on the same API(librte_power) but different
implementations, it requires the following configurations:
Host: CONFIG_RTE_LIBRTE_POWER_VM=n and Add CONFIG_RTE_LIBRTE_POWER=y
Guest: CONFIG_RTE_LIBRTE_POWER_VM=y and Add CONFIG_RTE_LIBRTE_POWER=n

When building for either the resulting library is called rte_power.

Signed-off-by: Alan Carew <alan.carew@intel.com>
---
 config/common_linuxapp | 6 ++++++
 lib/Makefile           | 1 +
 mk/rte.app.mk          | 4 ++++
 3 files changed, 11 insertions(+)

Patch
diff mbox

diff --git a/config/common_linuxapp b/config/common_linuxapp
index 5bee910..fbecad3 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -332,6 +332,12 @@  CONFIG_RTE_LIBRTE_POWER_DEBUG=n
 CONFIG_RTE_MAX_LCORE_FREQS=64
 
 #
+# Compile librte_power_vm
+#
+CONFIG_RTE_LIBRTE_POWER_VM=n
+CONFIG_RTE_LIBRTE_POWER_VM_DEBUG=n
+
+#
 # Compile librte_net
 #
 CONFIG_RTE_LIBRTE_NET=y
diff --git a/lib/Makefile b/lib/Makefile
index 10c5bb3..d291459 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -56,6 +56,7 @@  DIRS-$(CONFIG_RTE_LIBRTE_ACL) += librte_acl
 DIRS-$(CONFIG_RTE_LIBRTE_NET) += librte_net
 DIRS-$(CONFIG_RTE_LIBRTE_IP_FRAG) += librte_ip_frag
 DIRS-$(CONFIG_RTE_LIBRTE_POWER) += librte_power
+DIRS-$(CONFIG_RTE_LIBRTE_POWER_VM) += librte_power_vm
 DIRS-$(CONFIG_RTE_LIBRTE_METER) += librte_meter
 DIRS-$(CONFIG_RTE_LIBRTE_SCHED) += librte_sched
 DIRS-$(CONFIG_RTE_LIBRTE_KVARGS) += librte_kvargs
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 34dff2a..ce8c684 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -105,6 +105,10 @@  ifeq ($(CONFIG_RTE_LIBRTE_POWER),y)
 LDLIBS += -lrte_power
 endif
 
+ifeq ($(CONFIG_RTE_LIBRTE_POWER_VM),y)
+LDLIBS += -lrte_power
+endif
+
 ifeq ($(CONFIG_RTE_LIBRTE_ACL),y)
 LDLIBS += -lrte_acl
 endif