[1/4] power: make guest channel headers public
Checks
Commit Message
The channel commands header file contains definitions that are used by the
example application for power management, and so need to be made public.
Similarly the guest_channel.h header is used by the guest_cli example
utility, so needs to be public also. Without this change, the example
apps, or any end-user apps based on them, can not be compiled outside the
main DPDK build.
Fixes: 210c383e247b ("power: packet format for vm power management")
Fixes: cd0d5547e873 ("power: vm communication channels in guest")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/vm_power_manager/channel_manager.c | 1 -
examples/vm_power_manager/channel_monitor.c | 1 -
examples/vm_power_manager/channel_monitor.h | 2 +-
examples/vm_power_manager/guest_cli/main.c | 1 +
examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 2 +-
examples/vm_power_manager/guest_cli/vm_power_cli_guest.h | 2 +-
examples/vm_power_manager/vm_power_cli.c | 1 -
lib/librte_power/guest_channel.c | 3 +--
lib/librte_power/meson.build | 4 +++-
lib/librte_power/power_kvm_vm.c | 3 +--
.../{channel_commands.h => rte_power_channel_commands.h} | 0
.../{guest_channel.h => rte_power_guest_channel.h} | 2 +-
12 files changed, 10 insertions(+), 12 deletions(-)
rename lib/librte_power/{channel_commands.h => rte_power_channel_commands.h} (100%)
rename lib/librte_power/{guest_channel.h => rte_power_guest_channel.h} (98%)
Comments
On Fri, Aug 14, 2020 at 12:00:42PM +0100, Bruce Richardson wrote:
> The channel commands header file contains definitions that are used by the
> example application for power management, and so need to be made public.
> Similarly the guest_channel.h header is used by the guest_cli example
> utility, so needs to be public also. Without this change, the example
> apps, or any end-user apps based on them, can not be compiled outside the
> main DPDK build.
>
> Fixes: 210c383e247b ("power: packet format for vm power management")
> Fixes: cd0d5547e873 ("power: vm communication channels in guest")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> examples/vm_power_manager/channel_manager.c | 1 -
> examples/vm_power_manager/channel_monitor.c | 1 -
> examples/vm_power_manager/channel_monitor.h | 2 +-
> examples/vm_power_manager/guest_cli/main.c | 1 +
> examples/vm_power_manager/guest_cli/vm_power_cli_guest.c | 2 +-
> examples/vm_power_manager/guest_cli/vm_power_cli_guest.h | 2 +-
> examples/vm_power_manager/vm_power_cli.c | 1 -
> lib/librte_power/guest_channel.c | 3 +--
> lib/librte_power/meson.build | 4 +++-
> lib/librte_power/power_kvm_vm.c | 3 +--
> .../{channel_commands.h => rte_power_channel_commands.h} | 0
> .../{guest_channel.h => rte_power_guest_channel.h} | 2 +-
> 12 files changed, 10 insertions(+), 12 deletions(-)
> rename lib/librte_power/{channel_commands.h => rte_power_channel_commands.h} (100%)
> rename lib/librte_power/{guest_channel.h => rte_power_guest_channel.h} (98%)
>
Note, this patch does not include the makefile changes, as the work was
done when testing with the makefile removal patchset applied, and make
support is being removed in this release.
@@ -27,7 +27,6 @@
#include <libvirt/libvirt.h>
#include "channel_manager.h"
-#include "channel_commands.h"
#include "channel_monitor.h"
#include "power_manager.h"
@@ -35,7 +35,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"
@@ -6,7 +6,7 @@
#define CHANNEL_MONITOR_H_
#include "channel_manager.h"
-#include "channel_commands.h"
+#include "rte_power_channel_commands.h"
struct core_share {
unsigned int pcpu;
@@ -14,6 +14,7 @@
#include <rte_eal.h>
#include <rte_log.h>
+#include "rte_power_channel_commands.h"
#include "vm_power_cli_guest.h"
#include "parse.h"
@@ -19,7 +19,7 @@
#include <rte_ethdev.h>
#include <rte_power.h>
-#include <guest_channel.h>
+#include <rte_power_guest_channel.h>
#include "vm_power_cli_guest.h"
@@ -9,7 +9,7 @@
extern "C" {
#endif
-#include "channel_commands.h"
+struct channel_packet;
struct channel_packet *get_policy(void);
@@ -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;
@@ -16,8 +16,7 @@
#include <rte_log.h>
-#include "guest_channel.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.h"
#define RTE_LOGTYPE_GUEST_CHANNEL RTE_LOGTYPE_USER1
@@ -10,5 +10,7 @@ sources = files('rte_power.c', 'power_acpi_cpufreq.c',
'rte_power_empty_poll.c',
'power_pstate_cpufreq.c',
'power_common.c')
-headers = files('rte_power.h','rte_power_empty_poll.h')
+headers = files('rte_power.h','rte_power_empty_poll.h',
+ 'rte_power_guest_channel.h',
+ 'rte_power_channel_commands.h')
deps += ['timer']
@@ -6,8 +6,7 @@
#include <rte_log.h>
-#include "guest_channel.h"
-#include "channel_commands.h"
+#include "rte_power_guest_channel.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_power_channel_commands.h
similarity index 98%
rename from lib/librte_power/guest_channel.h
rename to lib/librte_power/rte_power_guest_channel.h
@@ -8,7 +8,7 @@
extern "C" {
#endif
-#include <channel_commands.h>
+#include <rte_power_channel_commands.h>
/**
* Check if any Virtio-Serial VM end-points exist in path.