From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 37AA2A0AC5 for ; Fri, 3 May 2019 16:09:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 77E005B2A; Fri, 3 May 2019 16:09:13 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id AD9635B20 for ; Fri, 3 May 2019 16:09:11 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 May 2019 07:09:11 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,426,1549958400"; d="scan'208";a="147884564" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.222.236]) by orsmga003.jf.intel.com with ESMTP; 03 May 2019 07:09:09 -0700 From: Bruce Richardson To: david.hunt@intel.com Cc: dev@dpdk.org, Bruce Richardson Date: Fri, 3 May 2019 15:08:58 +0100 Message-Id: <20190503140901.59064-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190503140901.59064-1-bruce.richardson@intel.com> References: <20190503140901.59064-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [RFC PATCH 1/4] power: make channel commands header public X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190503140858.MpJU_Z4xNckzmIQDd3KVqoayVuuqg0GWJT4X55LLKog@z> 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 --- 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 #include #include +#include #include #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 #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 #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 +#include #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 - /** * 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 #include +#include #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