qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 00/15] QAPI Round 1 (core code generator) (v


From: Anthony Liguori
Subject: Re: [Qemu-devel] Re: [PATCH 00/15] QAPI Round 1 (core code generator) (v2)
Date: Wed, 16 Mar 2011 11:06:25 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8

On 03/16/2011 10:00 AM, Luiz Capitulino wrote:
On Wed, 16 Mar 2011 15:49:59 +0100
Paolo Bonzini<address@hidden>  wrote:

On 03/16/2011 03:34 PM, Luiz Capitulino wrote:
+##
+# @put_event:
+#
+# Disconnect a signal.  This command is used to disconnect from a signal based
+# on the handle returned by a signal accessor.
+#
+# @tag: the handle returned by a signal accessor.
+#
+# Returns: Nothing on success.
+#          If @tag is not a valid handle, InvalidParameterValue
+#
+# Since: 0.15.0

The name 'signal' (at least today) doesn't make sense on the wire protocol,
'put_event' probably doesn't make sense in the C library, nor does 'event'.

Another detail is that, event extension is more important than command
extension, because it's probably going to happen. I think it would be very
bad to add new events just because we wanted to add a new field.
What if events were always passed a single struct, with the first field
being a bitmask saying which (or how many) fields have been filled?

It is quite ugly to work that way when calling functions, but it's not
too bad when you are writing the callees.  And it's the code generator
that writes the function calls in the case of libqmp...
I was also wondering if it's possible to only make the most recent version
available in the wire protocol and all existing ones in libqmp.

I don't quite follow.

libqmp works with all previous versions of QMP. New functions will return a CommandNotFound error.

In fact, you can run test-libqmp -p /0.14 and it will run the regressions against the QMP server shipped in 0.14[1]. This is why I used version prefixes :-)

[1] test-libqmp right now doesn't have a way to select which method you use for connecting to the QMP server and right now assumes a unix socket at a well known location. It doesn't add the right parameter to QEMU to launch this way because in my tree, this is all implicit so you need to patch test-libqmp to explicitly add that qmp socket.

Regards,

Anthony Liguori



reply via email to

[Prev in Thread] Current Thread [Next in Thread]