[RFC,1/4] power: make channel commands header public
Checks
Commit Message
The channel_commands.h header file is required by applications wanting to
use the power management capabilities - as evidenced by the fact that the
vm_power_manager example app needs to include it. Therefore we should make
the header file public.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/vm_power_manager/Makefile | 2 +-
examples/vm_power_manager/channel_manager.c | 2 +-
examples/vm_power_manager/channel_monitor.c | 1 -
examples/vm_power_manager/channel_monitor.h | 2 +-
examples/vm_power_manager/vm_power_cli.c | 1 -
lib/librte_power/Makefile | 4 +++-
lib/librte_power/guest_channel.c | 2 +-
lib/librte_power/guest_channel.h | 2 --
lib/librte_power/meson.build | 4 +++-
lib/librte_power/power_kvm_vm.c | 2 +-
.../{channel_commands.h => rte_channel_commands.h} | 0
11 files changed, 11 insertions(+), 11 deletions(-)
rename lib/librte_power/{channel_commands.h => rte_channel_commands.h} (100%)
@@ -26,7 +26,7 @@ else
SRCS-y += oob_monitor_nop.c
endif
-CFLAGS += -O3 -I$(RTE_SDK)/lib/librte_power/
+CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
LDLIBS += -lvirt
@@ -24,11 +24,11 @@
#include <rte_log.h>
#include <rte_atomic.h>
#include <rte_spinlock.h>
+#include <rte_channel_commands.h>
#include <libvirt/libvirt.h>
#include "channel_manager.h"
-#include "channel_commands.h"
#include "channel_monitor.h"
#include "power_manager.h"
@@ -32,7 +32,6 @@
#include <libvirt/libvirt.h>
#include "channel_monitor.h"
-#include "channel_commands.h"
#include "channel_manager.h"
#include "power_manager.h"
#include "oob_monitor.h"
@@ -5,8 +5,8 @@
#ifndef CHANNEL_MONITOR_H_
#define CHANNEL_MONITOR_H_
+#include <rte_channel_commands.h>
#include "channel_manager.h"
-#include "channel_commands.h"
struct core_share {
unsigned int pcpu;
@@ -21,7 +21,6 @@
#include "channel_manager.h"
#include "channel_monitor.h"
#include "power_manager.h"
-#include "channel_commands.h"
struct cmd_quit_result {
cmdline_fixed_string_t quit;
@@ -21,6 +21,8 @@ SRCS-$(CONFIG_RTE_LIBRTE_POWER) += rte_power_empty_poll.c
SRCS-$(CONFIG_RTE_LIBRTE_POWER) += power_pstate_cpufreq.c
# install this header file
-SYMLINK-$(CONFIG_RTE_LIBRTE_POWER)-include := rte_power.h rte_power_empty_poll.h
+SYMLINK-$(CONFIG_RTE_LIBRTE_POWER)-include := rte_power.h
+SYMLINK-$(CONFIG_RTE_LIBRTE_POWER)-include += rte_power_empty_poll.h
+SYMLINK-$(CONFIG_RTE_LIBRTE_POWER)-include += rte_channel_commands.h
include $(RTE_SDK)/mk/rte.lib.mk
@@ -13,9 +13,9 @@
#include <rte_log.h>
+#include <rte_channel_commands.h>
#include "guest_channel.h"
-#include "channel_commands.h"
#define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
@@ -8,8 +8,6 @@
extern "C" {
#endif
-#include <channel_commands.h>
-
/**
* Connect to the Virtio-Serial VM end-point located in path. It is
* thread safe for unique lcore_ids. This function must be only called once from
@@ -8,5 +8,7 @@ sources = files('rte_power.c', 'power_acpi_cpufreq.c',
'power_kvm_vm.c', 'guest_channel.c',
'rte_power_empty_poll.c',
'power_pstate_cpufreq.c')
-headers = files('rte_power.h','rte_power_empty_poll.h')
+headers = files('rte_power.h',
+ 'rte_power_empty_poll.h',
+ 'rte_channel_commands.h')
deps += ['timer']
@@ -5,9 +5,9 @@
#include <string.h>
#include <rte_log.h>
+#include <rte_channel_commands.h>
#include "guest_channel.h"
-#include "channel_commands.h"
#include "power_kvm_vm.h"
#include "power_common.h"
similarity index 100%
rename from lib/librte_power/channel_commands.h
rename to lib/librte_power/rte_channel_commands.h