[RFC,0/4] allow vm_power_manager to build using pkg-config

Message ID 20190503140901.59064-1-bruce.richardson@intel.com
Headers show
Series
  • allow vm_power_manager to build using pkg-config
Related show

Message

Bruce Richardson May 3, 2019, 2:08 p.m.
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