From: Anthony Liguori <anthony@codemonkey.ws>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [RFC/RFA PATCH] qapi: detect extra members inside structs
Date: Mon, 19 Mar 2012 14:56:26 -0500 [thread overview]
Message-ID: <4F678F6A.3050804@codemonkey.ws> (raw)
In-Reply-To: <4F678E38.7050902@redhat.com>
On 03/19/2012 02:51 PM, Paolo Bonzini wrote:
> Il 19/03/2012 20:34, Anthony Liguori ha scritto:
>>>
>>> Is this acceptable or just wrong?
>>
>> This is a feature. The idea is that with QMP, old clients just ignore
>> extra members in a structure. I've never felt that comfortable with
>> this as a semantic but this is how QMP was designed.
>
> For old clients that could be fine. But what about old servers? :)
Same applies to old server. If a new client tries to use a new field, if the
old server refuses it, then the new client breaks.
There's no way in QMP to detect whether a server supports a new field. This is
why I proposed instituting a policy of never adding/removing fields to
structures and why I had advocating use a C version of libqapi in terms of
enforcing compatibility rules.
I'm not sure if the "server ignores unknown" fields thing is even reasonable to
rely upon so maybe we should just draw a line in the sane and make the change
you're suggesting...
Regards,
Anthony Liguori
>
> Perhaps we need an argument to the QMPInputVisitor constructor to
> control this.
>
>> If you don't allow this semantic, then it's impossible to ever add a
>> field to an existing type as that would break backwards compatibility.
>
> Paolo
next prev parent reply other threads:[~2012-03-19 19:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 19:29 [Qemu-devel] [RFC/RFA PATCH] qapi: detect extra members inside structs Paolo Bonzini
2012-03-19 19:34 ` Anthony Liguori
2012-03-19 19:51 ` Paolo Bonzini
2012-03-19 19:56 ` Anthony Liguori [this message]
2012-03-19 20:22 ` Eric Blake
2012-03-19 20:30 ` Anthony Liguori
2012-03-19 20:43 ` Luiz Capitulino
2012-03-19 22:29 ` Michael Roth
2012-03-19 22:38 ` Anthony Liguori
2012-03-19 23:45 ` Michael Roth
2012-03-20 0:49 ` Anthony Liguori
2012-03-20 12:15 ` Luiz Capitulino
2012-03-20 19:33 ` Anthony Liguori
2012-03-20 17:31 ` Paolo Bonzini
2012-03-20 0:28 ` Michael Roth
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=4F678F6A.3050804@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.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).