From patchwork Fri May 3 14:08:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 53250 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5B8C5A6A; Fri, 3 May 2019 16:09:10 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 174095A4A for ; Fri, 3 May 2019 16:09:08 +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:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,426,1549958400"; d="scan'208";a="147884554" 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:06 -0700 From: Bruce Richardson To: david.hunt@intel.com Cc: dev@dpdk.org, Bruce Richardson Date: Fri, 3 May 2019 15:08:57 +0100 Message-Id: <20190503140901.59064-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [dpdk-dev] [RFC PATCH 0/4] allow vm_power_manager to build using pkg-config 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" The vm_power_manager builds using meson as part of a DPDK build, but did not support building using make and the libdpdk.pc file. Unfortunately, adding this support was not as easy as for other examples, as the vm_power_manager example was depending on a non-public header file in the power library. Since this header is needed to write real applications, like the example, this patchset makes the header public. A second, more minor, complication was that the build selected at compile-time which of two C files to include in the app using DPDK build-time variables. Since these vars are not available when building outside the DPDK build-system we need to change this to always compiling both files, and using macros to select the correct set of functions to use. [In this case, merging the files into one was also considered, and would work fine, it just wouldn't scale as well as keeping the files separate if solutions for other architectures were added later]. Bruce Richardson (4): power: make channel commands header public power: add namespace prefix to public header elements examples/vm_power_manager: always compile all C files examples/vm_power_manager: support build using pkg-config examples/vm_power_manager/Makefile | 85 ++++++++++++++----- examples/vm_power_manager/channel_manager.c | 2 +- examples/vm_power_manager/channel_monitor.c | 73 ++++++++-------- examples/vm_power_manager/channel_monitor.h | 10 +-- examples/vm_power_manager/guest_cli/main.c | 2 +- .../guest_cli/vm_power_cli_guest.c | 10 +-- .../guest_cli/vm_power_cli_guest.h | 4 +- examples/vm_power_manager/main.c | 2 +- examples/vm_power_manager/meson.build | 16 ++-- examples/vm_power_manager/oob_monitor_nop.c | 4 + examples/vm_power_manager/oob_monitor_x86.c | 4 + examples/vm_power_manager/vm_power_cli.c | 1 - lib/librte_power/Makefile | 4 +- lib/librte_power/channel_commands.h | 85 ------------------- lib/librte_power/guest_channel.c | 8 +- lib/librte_power/guest_channel.h | 6 +- lib/librte_power/meson.build | 4 +- lib/librte_power/power_kvm_vm.c | 16 ++-- lib/librte_power/rte_channel_commands.h | 85 +++++++++++++++++++ 19 files changed, 235 insertions(+), 186 deletions(-) delete mode 100644 lib/librte_power/channel_commands.h create mode 100644 lib/librte_power/rte_channel_commands.h