From: Eric Blake <eblake@redhat.com>
To: Alexey Kirillov <lekiravi@yandex-team.ru>,
Jason Wang <jasowang@redhat.com>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
Markus Armbruster <armbru@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
qemu-devel@nongnu.org, Vincenzo Maffione <v.maffione@gmail.com>,
yc-core@yandex-team.ru,
Giuseppe Lettieri <g.lettieri@iet.unipi.it>,
Luigi Rizzo <rizzo@iet.unipi.it>
Subject: Re: [PATCH 1/2] qapi: net: Add query-netdevs command
Date: Wed, 13 Nov 2019 15:31:07 -0600 [thread overview]
Message-ID: <92284c15-1019-01b8-80ed-a443a5f15972@redhat.com> (raw)
In-Reply-To: <20191113212516.13606-2-lekiravi@yandex-team.ru>
On 11/13/19 3:25 PM, Alexey Kirillov wrote:
> Add a qmp command that provides information about currently attached
> network devices and their configuration.
>
> Signed-off-by: Alexey Kirillov <lekiravi@yandex-team.ru>
> ---
> +++ b/qapi/net.json
> @@ -754,3 +754,88 @@
> ##
> { 'event': 'FAILOVER_NEGOTIATED',
> 'data': {'device-id': 'str'} }
> +
> +##
> +# @NetdevInfo:
> +#
> +# Configuration of a network device.
> +#
> +# @id: Device identifier.
> +#
> +# @type: Specify the driver used for interpreting remaining arguments.
> +#
> +# @peer: Connected network device.
> +#
> +# @queues_count: Number of queues.
Unless there is a strong reason otherwise, this should be 'queues-count'.
> +#
> +# @hub: hubid of hub, if connected to.
> +#
> +# Since: 4.2
> +##
> +{ 'union': 'NetdevInfo',
> + 'base': { 'id': 'str',
> + 'type': 'NetClientDriver',
> + '*peer': 'str',
> + 'queues_count': 'int',
> + '*hub': 'int' },
> + 'discriminator': 'type',
> + 'data': {
> + 'nic': 'NetLegacyNicOptions',
> + 'user': 'NetdevUserOptions',
> + 'tap': 'NetdevTapOptions',
> + 'l2tpv3': 'NetdevL2TPv3Options',
> + 'socket': 'NetdevSocketOptions',
> + 'vde': 'NetdevVdeOptions',
> + 'bridge': 'NetdevBridgeOptions',
> + 'hubport': 'NetdevHubPortOptions',
> + 'netmap': 'NetdevNetmapOptions',
> + 'vhost-user': 'NetdevVhostUserOptions' } }
> +
> +##
> +# @x-query-netdevs:
What are the reasons for the x- prefix? Are we planning on changing
this interface down the road? If so, what changes might we make?
> +#
> +# Get a list of @NetdevInfo for all virtual network devices.
> +#
> +# Returns: a list of @NetdevInfo describing each virtual network device.
> +#
> +# Since: 4.2
This is a new feature; as such, it's too late to make it into 4.2;
you'll want to change this to 5.0.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2019-11-13 21:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-13 21:25 [PATCH 0/2] Introducing QMP query-netdevs command Alexey Kirillov
2019-11-13 21:25 ` [PATCH 1/2] qapi: net: Add " Alexey Kirillov
2019-11-13 21:31 ` Eric Blake [this message]
2019-11-13 21:25 ` [PATCH 2/2] tests: Add tests for " Alexey Kirillov
2019-11-14 11:28 ` Thomas Huth
2019-11-13 21:32 ` [PATCH 0/2] Introducing QMP " Eric Blake
2019-11-13 21:48 ` Alexey Kirillov
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=92284c15-1019-01b8-80ed-a443a5f15972@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=g.lettieri@iet.unipi.it \
--cc=jan.kiszka@siemens.com \
--cc=jasowang@redhat.com \
--cc=lekiravi@yandex-team.ru \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rizzo@iet.unipi.it \
--cc=samuel.thibault@ens-lyon.org \
--cc=v.maffione@gmail.com \
--cc=yc-core@yandex-team.ru \
/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).