qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Jason Wang" <jasowang@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Jan Kiszka" <jan.kiszka@siemens.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v4 1/2] slirp: Add "query-usernet" QMP command
Date: Thu, 3 May 2018 09:25:14 +0800	[thread overview]
Message-ID: <20180503012514.GD15438@lemon.usersys.redhat.com> (raw)
In-Reply-To: <60f2d927-9846-7da2-7067-62f0167a2b58@redhat.com>

On Wed, 05/02 14:41, Eric Blake wrote:
> On 05/02/2018 02:30 AM, Fam Zheng wrote:
> > HMP "info usernet" has been available but it isn't ideal for programmed
> > use cases. This closes the gap in QMP by adding a counterpart
> > "query-usernet" command. It is basically translated from
> > the HMP slirp_connection_info() loop, which now calls the QMP
> > implementation and prints the data, just like other HMP info_* commands.
> > 
> > The TCPS_* macros are now defined as a QAPI enum.
> > 
> > Signed-off-by: Fam Zheng <famz@redhat.com>
> > ---
> 
> > +##
> > +# @UsernetInfo:
> > +#
> > +# SLIRP usernet information.
> > +#
> > +# Since: 2.13
> > +##
> > +{ 'struct': 'UsernetInfo',
> > +  'data': {
> > +    'id':              'str',
> > +    'hub':             'int',
> > +    'connections':     ['UsernetConnection']
> > +} }
> > +
> > +##
> > +# @query-usernet:
> > +#
> > +# Return SLIRP network information.
> > +#
> > +# Since: 2.13
> > +#
> > +# Example:
> > +#
> > +# -> { "execute": "query-usernet", "arguments": { } }
> > +# <- { "return": [
> > +#         {
> > +#             "promiscuous": true,
> > +#             "name": "vnet0"
> 
> That example looks wrong; I'm expecting 'id', 'hub', and another array
> 'connections'.

Copy-pasto. Will fix.

Fam

> 
> > +#         }
> > +#       ]
> > +#    }
> > +#
> > +##
> > +{ 'command': 'query-usernet',
> > +  'returns': ['UsernetInfo'] }
> 
> Other than the botched example, the qapi additions look okay to me.
> 
> -- 
> Eric Blake, Principal Software Engineer
> Red Hat, Inc.           +1-919-301-3266
> Virtualization:  qemu.org | libvirt.org

  reply	other threads:[~2018-05-03  1:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-02  7:30 [Qemu-devel] [PATCH v4 0/2] slirp: Add query-usernet QMP command Fam Zheng
2018-05-02  7:30 ` [Qemu-devel] [PATCH v4 1/2] slirp: Add "query-usernet" " Fam Zheng
2018-05-02 19:41   ` Eric Blake
2018-05-03  1:25     ` Fam Zheng [this message]
2018-05-02  7:30 ` [Qemu-devel] [PATCH v4 2/2] tests: Use query-usernet instead of 'info usernet' Fam Zheng

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=20180503012514.GD15438@lemon.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=jan.kiszka@siemens.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=samuel.thibault@ens-lyon.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).