Skip to content

Convert qemu-socket to use QAPI exclusively

Daniel P. Berrange qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 3 repliesIn review
  2. v25 patches 8 repliesSuperseded
  3. v15 patches 3 repliesSuperseded

Changes in v3 from the cover letter

- Removed misleading/obsolete text from commit message
- Expanded comment about logic we're applying to getaddrinfo

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5sockets: remove use of QemuOpts from header fileinclude/qemu/sockets.h util/qemu-sockets.c+11 -200 replies
2/5sockets: remove use of QemuOpts from socket_listenutil/qemu-sockets.c+97 -571 reply
3/5sockets: remove use of QemuOpts from socket_connectutil/qemu-sockets.c+36 -551 reply
4/5sockets: remove use of QemuOpts from socket_dgraminclude/qemu/sockets.h util/qemu-sockets.c+24 -761 reply
5/5vnc: distiguish between ipv4/ipv6 omitted vs set to offui/vnc.c+12 -60 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchEric Blake
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 0/5] Convert qemu-socket to use QAPI exclusively

An updated posting of:

v2: https://lists.gnu.org/archive/html/qemu-devel/2015-11/msg03927.html
v1: https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg04950.html

All the callers of the qemu-sockets module now use the APIs which take a QAPI SocketAddress.

Thus we now have the fun situation with VNC & Chardevs that they use QemuOpts to parse the CLI args, then convert to a SocketAddress, pass it into qemu-sockets which converts it back into a QemuOpts instance.

This series rips out all usage of QemuOpts from qemu-sockets so that the code exclusively uses QAPI SocketAddress objects. Now when parsing CLI args, we just convert from QemuOpts to SocketAddress and use that directly, and when using the monitor there's no conversion at all, we have SocketAddress all the way.

This conversion also fixes a bug in the code where use of ipv4=off and ipv6=off at the same time, resulted in using PF_UNSPEC and so was in effective equivalent to using ipv4=on and ipv6=on. We now report an explicit error for the ipv4=off + ipv6=off scenario, since it is an invalid request to make.

Finally, the VNC code is fixed to honour the distinction between ipv4/ipv6 being omitted vs set to 'off'.

Changed in v3:

- Removed misleading/obsolete text from commit message
- Expanded comment about logic we're applying to getaddrinfo

Changed in v2:
- Optimization suggested by Paolo
- Removed accidental debug g_printerr()s
- Resolved conflicts with QAPI generator changes that renamed various struct fields

Daniel P. Berrange (5):
sockets: remove use of QemuOpts from header file
sockets: remove use of QemuOpts from socket_listen
sockets: remove use of QemuOpts from socket_connect
sockets: remove use of QemuOpts from socket_dgram
vnc: distiguish between ipv4/ipv6 omitted vs set to off

 include/qemu/sockets.h |  10 --
 ui/vnc.c               |  18 ++-
 util/qemu-sockets.c    | 344 ++++++++++++++++++++++---------------------------
 3 files changed, 169 insertions(+), 203 deletions(-)
Signature · 1 line
2.5.0