From: Bruce Richardson <bruce.richardson@intel.com>
To: david.hunt@intel.com
Cc: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-dev] [RFC PATCH 1/4] power: make channel commands header public
Date: Fri, 3 May 2019 15:08:58 +0100 [thread overview]
Message-ID: <20190503140901.59064-2-bruce.richardson@intel.com> (raw)
Message-ID: <20190503140858.MpJU_Z4xNckzmIQDd3KVqoayVuuqg0GWJT4X55LLKog@z> (raw)
In-Reply-To: <20190503140901.59064-1-bruce.richardson@intel.com>
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%)
diff --git a/examples/vm_power_manager/Makefile b/examples/vm_power_manager/Makefile
index 2fdb991d7..d93f900f7 100644
--- a/examples/vm_power_manager/Makefile
+++ b/examples/vm_power_manager/Makefile
@@ -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
diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 084681747..755ac0425 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -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"
diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 4a287109b..9ae90c63f 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -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"
diff --git a/examples/vm_power_manager/channel_monitor.h b/examples/vm_power_manager/channel_monitor.h
index 7362a80d2..a8bc9a4f1 100644
--- a/examples/vm_power_manager/channel_monitor.h
+++ b/examples/vm_power_manager/channel_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;
diff --git a/examples/vm_power_manager/vm_power_cli.c b/examples/vm_power_manager/vm_power_cli.c
index 89b000d92..a67387cef 100644
--- a/examples/vm_power_manager/vm_power_cli.c
+++ b/examples/vm_power_manager/vm_power_cli.c
@@ -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;
diff --git a/lib/librte_power/Makefile b/lib/librte_power/Makefile
index ab771528f..f192cb334 100644
--- a/lib/librte_power/Makefile
+++ b/lib/librte_power/Makefile
@@ -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
diff --git a/lib/librte_power/guest_channel.c b/lib/librte_power/guest_channel.c
index c17ea46b4..bb35fecec 100644
--- a/lib/librte_power/guest_channel.c
+++ b/lib/librte_power/guest_channel.c
@@ -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
diff --git a/lib/librte_power/guest_channel.h b/lib/librte_power/guest_channel.h
index 373d39898..6219063d3 100644
--- a/lib/librte_power/guest_channel.h
+++ b/lib/librte_power/guest_channel.h
@@ -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
diff --git a/lib/librte_power/meson.build b/lib/librte_power/meson.build
index cc6c30075..237f9d59c 100644
--- a/lib/librte_power/meson.build
+++ b/lib/librte_power/meson.build
@@ -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']
diff --git a/lib/librte_power/power_kvm_vm.c b/lib/librte_power/power_kvm_vm.c
index 277ebbeae..1c60551a4 100644
--- a/lib/librte_power/power_kvm_vm.c
+++ b/lib/librte_power/power_kvm_vm.c
@@ -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"
diff --git a/lib/librte_power/channel_commands.h b/lib/librte_power/rte_channel_commands.h
similarity index 100%
rename from lib/librte_power/channel_commands.h
rename to lib/librte_power/rte_channel_commands.h
--
2.20.1
next prev parent reply other threads:[~2019-05-03 14:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 14:08 [dpdk-dev] [RFC PATCH 0/4] allow vm_power_manager to build using pkg-config Bruce Richardson
2019-05-03 14:08 ` Bruce Richardson
2019-05-03 14:08 ` Bruce Richardson [this message]
2019-05-03 14:08 ` [dpdk-dev] [RFC PATCH 1/4] power: make channel commands header public Bruce Richardson
2019-05-03 14:08 ` [dpdk-dev] [RFC PATCH 2/4] power: add namespace prefix to public header elements Bruce Richardson
2019-05-03 14:08 ` Bruce Richardson
2019-05-03 14:09 ` [dpdk-dev] [RFC PATCH 3/4] examples/vm_power_manager: always compile all C files Bruce Richardson
2019-05-03 14:09 ` Bruce Richardson
2019-05-03 14:09 ` [dpdk-dev] [RFC PATCH 4/4] examples/vm_power_manager: support build using pkg-config Bruce Richardson
2019-05-03 14:09 ` Bruce Richardson
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=20190503140901.59064-2-bruce.richardson@intel.com \
--to=bruce.richardson@intel.com \
--cc=david.hunt@intel.com \
--cc=dev@dpdk.org \
/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).