All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] power: fix build with libvirt
@ 2024-11-12 10:34 David Marchand
  2024-11-12 10:34 ` [PATCH 2/2] ci: install libvirt David Marchand
  2024-11-12 14:01 ` [PATCH v2 1/2] power: fix build with libvirt David Marchand
  0 siblings, 2 replies; 6+ messages in thread
From: David Marchand @ 2024-11-12 10:34 UTC (permalink / raw)
  To: dev; +Cc: thomas, Anatoly Burakov, David Hunt, Sivaprasad Tummala,
	Huisong Li

Following moving rte_power_guest* API from the power library to the
kvm_vm driver, the symbols are not exposed anymore, since the library
hosting them is the kvm_vm driver binary.

Finish this cleanup by hosting the rte_power_guest_channel.h header in
the driver, then version the symbols and add corresponding build
dependencies in the vm_power_manager example.

Fixes: 6f987b594fa6 ("power: refactor core power management")

Signed-off-by: David Marchand <david.marchand@redhat.com>
---
 drivers/power/kvm_vm/meson.build                          | 1 +
 .../power/kvm_vm}/rte_power_guest_channel.h               | 0
 drivers/power/kvm_vm/version.map                          | 8 ++++++++
 examples/vm_power_manager/guest_cli/meson.build           | 2 +-
 examples/vm_power_manager/guest_cli/vm_power_cli_guest.c  | 1 +
 examples/vm_power_manager/meson.build                     | 2 +-
 lib/power/meson.build                                     | 1 -
 lib/power/rte_power_cpufreq.h                             | 1 -
 lib/power/version.map                                     | 2 --
 9 files changed, 12 insertions(+), 6 deletions(-)
 rename {lib/power => drivers/power/kvm_vm}/rte_power_guest_channel.h (100%)
 create mode 100644 drivers/power/kvm_vm/version.map

diff --git a/drivers/power/kvm_vm/meson.build b/drivers/power/kvm_vm/meson.build
index fe11179ab3..e921c012e9 100644
--- a/drivers/power/kvm_vm/meson.build
+++ b/drivers/power/kvm_vm/meson.build
@@ -10,5 +10,6 @@ sources = files(
         'guest_channel.c',
         'kvm_vm.c',
 )
+headers = files('rte_power_guest_channel.h')
 
 deps += ['power']
diff --git a/lib/power/rte_power_guest_channel.h b/drivers/power/kvm_vm/rte_power_guest_channel.h
similarity index 100%
rename from lib/power/rte_power_guest_channel.h
rename to drivers/power/kvm_vm/rte_power_guest_channel.h
diff --git a/drivers/power/kvm_vm/version.map b/drivers/power/kvm_vm/version.map
new file mode 100644
index 0000000000..ffa676624b
--- /dev/null
+++ b/drivers/power/kvm_vm/version.map
@@ -0,0 +1,8 @@
+DPDK_25 {
+	global:
+
+	rte_power_guest_channel_receive_msg;
+	rte_power_guest_channel_send_msg;
+
+	local: *;
+};
diff --git a/examples/vm_power_manager/guest_cli/meson.build b/examples/vm_power_manager/guest_cli/meson.build
index a69f809e3b..bc3916a170 100644
--- a/examples/vm_power_manager/guest_cli/meson.build
+++ b/examples/vm_power_manager/guest_cli/meson.build
@@ -6,7 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-deps += ['power']
+deps += ['power', 'power/kvm_vm']
 
 sources = files(
         'main.c',
diff --git a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
index 803b6d1f82..14d1f3dd95 100644
--- a/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
+++ b/examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
@@ -19,6 +19,7 @@
 #include <rte_ethdev.h>
 
 #include <rte_power_cpufreq.h>
+#include <rte_power_guest_channel.h>
 
 #include "vm_power_cli_guest.h"
 
diff --git a/examples/vm_power_manager/meson.build b/examples/vm_power_manager/meson.build
index b866d8fd54..1903b68ed9 100644
--- a/examples/vm_power_manager/meson.build
+++ b/examples/vm_power_manager/meson.build
@@ -6,7 +6,7 @@
 # To build this example as a standalone application with an already-installed
 # DPDK instance, use 'make'
 
-deps += ['power']
+deps += ['power', 'power/kvm_vm']
 
 if dpdk_conf.has('RTE_NET_BNXT')
     deps += ['net_bnxt']
diff --git a/lib/power/meson.build b/lib/power/meson.build
index cd7c83b6e9..b3a7bc7b2e 100644
--- a/lib/power/meson.build
+++ b/lib/power/meson.build
@@ -22,7 +22,6 @@ headers = files(
         'power_cpufreq.h',
         'power_uncore_ops.h',
         'rte_power_cpufreq.h',
-        'rte_power_guest_channel.h',
         'rte_power_pmd_mgmt.h',
         'rte_power_qos.h',
         'rte_power_uncore.h',
diff --git a/lib/power/rte_power_cpufreq.h b/lib/power/rte_power_cpufreq.h
index 73f9820bdf..82d274214b 100644
--- a/lib/power/rte_power_cpufreq.h
+++ b/lib/power/rte_power_cpufreq.h
@@ -13,7 +13,6 @@
 
 #include <rte_common.h>
 #include <rte_log.h>
-#include <rte_power_guest_channel.h>
 
 #include "power_cpufreq.h"
 
diff --git a/lib/power/version.map b/lib/power/version.map
index 920c8e79b3..9a36046a64 100644
--- a/lib/power/version.map
+++ b/lib/power/version.map
@@ -16,8 +16,6 @@ DPDK_25 {
 	rte_power_get_env;
 	rte_power_get_freq;
 	rte_power_get_uncore_freq;
-	rte_power_guest_channel_receive_msg;
-	rte_power_guest_channel_send_msg;
 	rte_power_init;
 	rte_power_pmd_mgmt_get_emptypoll_max;
 	rte_power_pmd_mgmt_get_pause_duration;
-- 
2.47.0


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

end of thread, other threads:[~2024-11-14 13:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-12 10:34 [PATCH 1/2] power: fix build with libvirt David Marchand
2024-11-12 10:34 ` [PATCH 2/2] ci: install libvirt David Marchand
2024-11-12 14:01 ` [PATCH v2 1/2] power: fix build with libvirt David Marchand
2024-11-12 14:01   ` [PATCH v2 2/2] ci: install libvirt David Marchand
2024-11-14 13:51     ` Aaron Conole
2024-11-12 14:23   ` [PATCH v2 1/2] power: fix build with libvirt David Marchand

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.