DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: thomas@monjalon.net, Anatoly Burakov <anatoly.burakov@intel.com>,
	David Hunt <david.hunt@intel.com>,
	Sivaprasad Tummala <sivaprasad.tummala@amd.com>,
	Huisong Li <lihuisong@huawei.com>
Subject: [PATCH v2 1/2] power: fix build with libvirt
Date: Tue, 12 Nov 2024 15:01:05 +0100	[thread overview]
Message-ID: <20241112140107.1916734-1-david.marchand@redhat.com> (raw)
In-Reply-To: <20241112103454.1543861-1-david.marchand@redhat.com>

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>
---
Changes since v1:
- fix meson dependency,
- add missing header include,

---
 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/channel_monitor.c               | 1 +
 examples/vm_power_manager/channel_monitor.h               | 1 +
 examples/vm_power_manager/guest_cli/main.c                | 1 +
 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 --
 12 files changed, 15 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/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index d4e0d685c1..800f733a26 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -32,6 +32,7 @@
 #include <rte_pmd_i40e.h>
 #endif
 #include <rte_power_cpufreq.h>
+#include <rte_power_guest_channel.h>
 
 #include <libvirt/libvirt.h>
 #include "channel_monitor.h"
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index a9a257abd3..fff6348ca4 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_monitor.h
@@ -6,6 +6,7 @@
 #define CHANNEL_MONITOR_H_
 
 #include <rte_power_cpufreq.h>
+#include <rte_power_guest_channel.h>
 
 #include "channel_manager.h"
 
diff --git a/examples/vm_power_manager/guest_cli/main.c b/examples/vm_power_manager/guest_cli/main.c
index 6246cbd6b4..40d4cb6d49 100644
--- a/examples/vm_power_manager/guest_cli/main.c
+++ b/examples/vm_power_manager/guest_cli/main.c
@@ -10,6 +10,7 @@
 
 #include <rte_lcore.h>
 #include <rte_power_cpufreq.h>
+#include <rte_power_guest_channel.h>
 #include <rte_debug.h>
 #include <rte_eal.h>
 #include <rte_log.h>
diff --git a/examples/vm_power_manager/guest_cli/meson.build b/examples/vm_power_manager/guest_cli/meson.build
index a69f809e3b..00bc32526d 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..dcf23198eb 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


  parent reply	other threads:[~2024-11-12 14:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-12 10:34 [PATCH " David Marchand
2024-11-12 10:34 ` [PATCH 2/2] ci: install libvirt David Marchand
2024-11-12 14:01 ` David Marchand [this message]
2024-11-12 14:01   ` [PATCH v2 " 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

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=20241112140107.1916734-1-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=anatoly.burakov@intel.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=lihuisong@huawei.com \
    --cc=sivaprasad.tummala@amd.com \
    --cc=thomas@monjalon.net \
    /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).