From: Wenchao Xia <wenchaoqemu@gmail.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH V5 05/28] qapi: define events in qapi schema
Date: Wed, 07 May 2014 20:48:24 +0800 [thread overview]
Message-ID: <536A2B98.90702@gmail.com> (raw)
In-Reply-To: <53626181.2000505@redhat.com>
于 2014/5/1 23:00, Eric Blake 写道:
> On 04/30/2014 10:26 PM, Wenchao Xia wrote:
>> Some old type defines for spice and vnc are changed to let new
>> event defines use them instead of redefine. Note that define of
>> BlockErrorAction is moved from block.h to qapi schema, and it is
>> not merged with BlockdevOnError. In schema NIC_RX_FILTER_CHANGED's
>> param 'name' is changed as optional one, since in caller it is
>> optional.
>>
>> Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com>
>> ---
>
> This is a big patch. See my comments on 7/28; do you have to do ALL of
> the qapi conversion here, or can you split it so that you are adding
> qapi one event at a time, in the same patch as that event also uses the
> generated code?
>
> Is the code motion of BlockErrorAction something that can be split into
> its own patch, to make the review focus easier? (Code motion and
> renaming fallout being separated from new additions is always easier
> than having both in one commit)
>
OK, adjust it in next version.
>> +++ b/docs/qmp/qmp-events.txt
>> @@ -1,39 +1,14 @@
>> - QEMU Machine Protocol Events
>> - ============================
>> + QEMU Machine Protocol Events Examples
>> + =====================================
>>
>> BALLOON_CHANGE
>> --------------
>> -
>> -Emitted when the guest changes the actual BALLOON level. This
>> -value is equivalent to the 'actual' field return by the
>> -'query-balloon' command
>> -
>> -Data:
>> -
>> -- "actual": actual level of the guest memory balloon in bytes (json-number)
>> -
>> -Example:
>> -
>> { "event": "BALLOON_CHANGE",
>> "data": { "actual": 944766976 },
>> "timestamp": { "seconds": 1267020223, "microseconds": 435656 } }
>
> I'm wondering if we still need this file, or if (by the end of the
> conversion to qapi) we can just drop it. Showing only an example usage,
> when the qapi already documents everything, isn't adding much value from
> my perspective. On the other hand, if you are able to rebase this patch
> to do one event at a time, then keep this file around until the end of
> the series. Then, for each event converted, you remove one chunk of
> this file, add one chunk to the schema.json file, and update all places
> to generate that new event, all in a single commit, where it becomes
> much easier to track that the conversion for that event was correct
> (here, there are so many events converted from .txt to .json at once
> that it is harder to correlate that the conversion of each event was
> correct).
>
>
>> +# @VncBasicInfo
>> +#
>> +# The basic information for vnc network connection
>> #
>> -# @host: The host name of the client. QEMU tries to resolve this to a DNS name
>> -# when possible.
>> +# @host: IP address
>> #
>> -# @family: 'ipv6' if the client is connected via IPv6 and TCP
>> -# 'ipv4' if the client is connected via IPv4 and TCP
>> -# 'unix' if the client is connected via a unix domain socket
>> -# 'unknown' otherwise
>> +# @service: port number
>> #
>> -# @service: The service name of the client's port. This may depends on the
>> -# host system's service database so symbolic names should not be
>> -# relied on.
>
> Why are you reducing the information about @service? At least you got
> rid of the typo (s/depends/depend/).
>
It is VncBasicInfo so it may indicate the server's port. Maybe:
# @service: The service name of vnc port. This may depends on the
# host system's service database so symbolic names should not be
# relied on.
>
>> +##
>> +# @VncClientInfo:
>> +#
>> +# Information about a connected VNC client.
>> #
>> # @x509_dname: #optional If x509 authentication is in use, the Distinguished
>> # Name of the client.
>> @@ -1180,8 +1217,8 @@
>> # Since: 0.14.0
>> ##
>> { 'type': 'VncClientInfo',
>> - 'data': {'host': 'str', 'family': 'str', 'service': 'str',
>> - '*x509_dname': 'str', '*sasl_username': 'str'} }
>> + 'base': 'VncBasicInfo',
>> + 'data': { '*x509_dname' : 'str', '*sasl_username': 'str' } }
>
> All this work on refactoring the existing vnc QMP types should be its
> own patch, prior to any patch that introduces an event that also uses
> the shared types created by your refactoring.
>
refactor it later.
>> +
>> +##
>> +# Event defines
>> +##
>
> If Lluís' series goes in first, it might make sense to have all of the
> event descriptions in their own file which gets included from the main
> qemu-schema.json.
>
How about define them in qemu-events.json?
next prev parent reply other threads:[~2014-05-07 12:49 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-01 4:26 [Qemu-devel] [PATCH V5 00/28] add direct support of event in qapi schema Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 01/28] os-posix: include sys/time.h Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 02/28] qapi: add event helper functions Wenchao Xia
2014-05-01 14:20 ` Eric Blake
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 03/28] qapi script: add event support Wenchao Xia
2014-05-01 22:05 ` Eric Blake
2014-05-02 7:54 ` Markus Armbruster
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 04/28] test: add test cases for qapi event Wenchao Xia
2014-05-01 14:38 ` Eric Blake
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 05/28] qapi: define events in qapi schema Wenchao Xia
2014-05-01 15:00 ` Eric Blake
2014-05-07 12:48 ` Wenchao Xia [this message]
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 06/28] monitor: change event functions as an implemention of new emit method Wenchao Xia
2014-05-01 22:09 ` Eric Blake
2014-05-07 12:53 ` Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 07/28] qapi event: convert SHUTDOWN Wenchao Xia
2014-05-01 14:44 ` Eric Blake
2014-05-07 12:55 ` Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 08/28] qapi event: convert POWERDOWN Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 09/28] qapi event: convert RESET Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 10/28] qapi event: convert STOP Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 11/28] qapi event: convert RESUME Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 12/28] qapi event: convert SUSPEND Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 13/28] qapi event: convert SUSPEND_DISK Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 14/28] qapi event: convert WAKEUP Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 15/28] qapi event: convert RTC_CHANGE Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 16/28] qapi event: convert WATCHDOG Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 17/28] qapi event: convert DEVICE_DELETED Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 18/28] qapi event: convert DEVICE_TRAY_MOVED Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 19/28] qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 20/28] qapi event: convert BLOCK_IMAGE_CORRUPTED Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 21/28] qapi event: convert other BLOCK_JOB events Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 22/28] qapi event: convert NIC_RX_FILTER_CHANGED Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 23/28] qapi event: convert VNC events Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 24/28] qapi event: convert SPICE events Wenchao Xia
2014-05-01 4:26 ` [Qemu-devel] [PATCH V5 25/28] qapi event: convert BALLOON_CHANGE Wenchao Xia
2014-05-01 4:27 ` [Qemu-devel] [PATCH V5 26/28] qapi event: convert GUEST_PANICKED Wenchao Xia
2014-05-01 4:27 ` [Qemu-devel] [PATCH V5 27/28] qapi event: convert QUORUM events Wenchao Xia
2014-05-01 4:27 ` [Qemu-devel] [PATCH V5 28/28] qapi event: clean up Wenchao Xia
2014-05-01 22:15 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=536A2B98.90702@gmail.com \
--to=wenchaoqemu@gmail.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).