All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org, Luiz Capitulino <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] QMP: Spec: Private Extensions support
Date: Fri, 05 Mar 2010 20:00:25 +0100	[thread overview]
Message-ID: <m3d3zi8ugm.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <4B7DB6FC.7040900@codemonkey.ws> (Anthony Liguori's message of "Thu, 18 Feb 2010 15:54:04 -0600")

Anthony asked me to take a stab at rewriting his draft to something more
along the lines of what I'm thinking.  Here goes.  I put some remarks
[in brackets].

FYI, I'll be out of town until Wednesday.


6. Downstream extension of QMP
------------------------------

We recommend that downstream consumers of QEMU do *not* modify QMP.
Management tools should be able to support both upstream and downstream
versions of QMP without special logic, and downstream extensions are
inherently at odds with that.

However, we recognize that it is sometimes impossible for downstreams to
avoid modifying QMP.  Both upstream and downstream need to take care to
preserve long-term compatibility and interoperability.

To help with that, QMP reserves JSON object member names beginning with
'__' (double underscore) for downstream use ("downstream names").  This
means upstream will never use any downstream names for its commands,
arguments, errors, asynchronous events, and so forth.

Any new names downstream wishes to add must begin with '__'.  To ensure
compatibility with other downstreams, it is strongly recommended that
you prefix the commands with '__RFQDN_' where RFQDN is a valid, reverse
fully qualified domain name which you control.  For example, a qemu-kvm
specific monitor command would be:

    (qemu) __org.linux-kvm_enable_irqchip

Downstream must not change the server greeting (section 2.2) other than
to offer additional capabilities.  But see below for why even that is
discouraged.

Section '5 Compatibility Considerations' applies to downstream as well
as to upstream, obviously.  [That section needs work!]  It follows that
downstream must behave exactly like upstream for any input not
containing members with downstream names ("downstream members"), except
it may add members with downstream names to its output.

Thus, a client should not be able to distinguish downstream from
upstream as long as it doesn't send input with downstream members, and
properly ignores any downstream members in the output it receives.

[I fully support everything up to this point.  I have some reservations
on the rest, and I doubt it'll be all that useful, but I don't really
mind having it, at least not in this form.]

Advice on downstream modifications:
[I made a honest effort at capturing Anthony's intentions here,
my apologies if I screwed it up.]

1. Introducing new commands is okay.  If you want to extend an existing
   command, consider introducing a new one with the new behaviour
   instead.  [FIXME Could use a rationale: why is extending bad?  Make
   sure to cover errors, because that's needed for 3.]

2. Introducing new asynchronous messages is okay.  If you want to extend
   an existing message, consider adding a new one instead.  [FIXME Could
   use a rationale: why is extending bad?]

3. Introducing new errors for use in new commands is okay.  Adding new
   errors to existing commands counts as extension, so 1. applies.

4. New capabilities are strongly discouraged.  Capabilities are for
   evolving the basic protocol, and multiple diverging basic protocol
   dialects are most undesirable.

  parent reply	other threads:[~2010-03-05 19:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 20:24 [Qemu-devel] [PATCH] QMP: Spec: Private Extensions support Luiz Capitulino
2010-02-18 21:54 ` Anthony Liguori
2010-02-19 12:04   ` Luiz Capitulino
2010-02-19 13:04   ` Markus Armbruster
2010-02-19 14:01     ` Anthony Liguori
2010-02-22 13:06       ` Markus Armbruster
2010-03-05 19:00   ` Markus Armbruster [this message]
2010-03-18 12:36     ` Luiz Capitulino
2010-05-06 15:52     ` Markus Armbruster
2010-05-06 17:49       ` Anthony Liguori
2010-05-07  9:49         ` [Qemu-devel] [PATCH] QMP: Add "Downstream extension of QMP" to spec Markus Armbruster
2010-05-07 19:54           ` [Qemu-devel] " Luiz Capitulino
2010-05-10  7:16             ` [Qemu-devel] [PATCH v2] " Markus Armbruster
2010-05-11 20:01               ` [Qemu-devel] " Luiz Capitulino

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=m3d3zi8ugm.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=lcapitulino@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.