Skip to content

Commit

Permalink
power: fix build with libvirt
Browse files Browse the repository at this point in the history
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: 6f987b5 ("power: refactor core power management")

Signed-off-by: David Marchand <[email protected]>
  • Loading branch information
david-marchand committed Nov 12, 2024
1 parent 49a841e commit b462f27
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions drivers/power/kvm_vm/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ sources = files(
'guest_channel.c',
'kvm_vm.c',
)
headers = files('rte_power_guest_channel.h')

deps += ['power']
File renamed without changes.
8 changes: 8 additions & 0 deletions drivers/power/kvm_vm/version.map
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
DPDK_25 {
global:

rte_power_guest_channel_receive_msg;
rte_power_guest_channel_send_msg;

local: *;
};
1 change: 1 addition & 0 deletions examples/vm_power_manager/channel_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions examples/vm_power_manager/channel_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define CHANNEL_MONITOR_H_

#include <rte_power_cpufreq.h>
#include <rte_power_guest_channel.h>

#include "channel_manager.h"

Expand Down
1 change: 1 addition & 0 deletions examples/vm_power_manager/guest_cli/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion examples/vm_power_manager/guest_cli/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 1 addition & 0 deletions examples/vm_power_manager/guest_cli/vm_power_cli_guest.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion examples/vm_power_manager/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
1 change: 0 additions & 1 deletion lib/power/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
1 change: 0 additions & 1 deletion lib/power/rte_power_cpufreq.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <rte_common.h>
#include <rte_log.h>
#include <rte_power_guest_channel.h>

#include "power_cpufreq.h"

Expand Down
2 changes: 0 additions & 2 deletions lib/power/version.map
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b462f27

Please sign in to comment.