From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: "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: Wed, 2 May 2018 14:41:34 -0500 [thread overview]
Message-ID: <60f2d927-9846-7da2-7067-62f0167a2b58@redhat.com> (raw)
In-Reply-To: <20180502073034.15141-2-famz@redhat.com>
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'.
> +# }
> +# ]
> +# }
> +#
> +##
> +{ '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
next prev parent reply other threads:[~2018-05-02 19:41 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 [this message]
2018-05-03 1:25 ` Fam Zheng
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=60f2d927-9846-7da2-7067-62f0167a2b58@redhat.com \
--to=eblake@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--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).