[virt-tools-list] [vhostmd virtio PATCH v3 0/6] Add virtio transport

Michael Trapp Michael.Trapp at sap.com
Mon Nov 12 15:12:08 UTC 2018


Add virtio serial channels as transport method for VM and host metrics.

A serial port at the VM side provides access to host metrics and
metrics of the reading VM, access to metrics of other VMs is not supported.
Virtio transport can be activated in the vhostmd transport configuration.
The required QEMU setup and the virtio configuration options are documented
in the vhostmd README.

virtio.c, which is the main part of this change, contains the virtio channel
related implementation of the transport. Connection handling and I/O is
executed in an additional thread and separates collecting metrics from serving
requests. Basic concept of vhostmd/virtio interaction is doumented in the patch.


Notes on V3
- moved corrections into separate patches
- fixed '-Wall -Werror' issues, built on openSUSE Tumbleweed, gcc 8.2.1
- configured + built with --enable-debug
- split the I/O loop function
- adjusted logging in virtio code to vhostmd style
- added function for access to volatile variable
- valgrind + custom tests on SLES11SP3

Michael Trapp (6):
  Initialize allocated buffer
  Fix update_interval behaviour
  Extend vu_buffer struct
  Add virtio functions
  Activate virtio support in vhostmd
  Add virtio support to vm-dump-metrics

 README                       |  84 +++-
 include/util.h               |   5 +
 include/virtio.h             |  50 ++
 libmetrics/Makefile.am       |  17 +-
 libmetrics/libmetrics.h      |   6 +
 libmetrics/libserialclient.c | 172 +++++++
 libmetrics/libserialclient.h |  30 ++
 vhostmd.changes              |   5 +
 vhostmd.dtd                  |   6 +-
 vhostmd.xml                  |   6 +
 vhostmd/Makefile.am          |   4 +-
 vhostmd/util.c               |   2 +
 vhostmd/vhostmd.c            |  71 ++-
 vhostmd/virtio.c             | 900 +++++++++++++++++++++++++++++++++++
 vm-dump-metrics/main.c       |  29 +-
 15 files changed, 1366 insertions(+), 21 deletions(-)
 create mode 100644 include/virtio.h
 create mode 100644 libmetrics/libserialclient.c
 create mode 100644 libmetrics/libserialclient.h
 create mode 100644 vhostmd/virtio.c

-- 
2.17.1 (Apple Git-112)




More information about the virt-tools-list mailing list