From: Jason Wang <jasowang@redhat.com>
To: Alexey Kirillov <lekiravi@yandex-team.ru>,
Markus Armbruster <armbru@redhat.com>,
Thomas Huth <thuth@redhat.com>, Eric Blake <eblake@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Samuel Thibault <samuel.thibault@ens-lyon.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
Stefan Weil <sw@weilnetz.de>, Paul Durrant <paul@xen.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Vincenzo Maffione <v.maffione@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
"yc-core@yandex-team.ru" <yc-core@yandex-team.ru>,
Michael Roth <michael.roth@amd.com>,
Anthony Perard <anthony.perard@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Giuseppe Lettieri <g.lettieri@iet.unipi.it>,
Luigi Rizzo <rizzo@iet.unipi.it>
Subject: Re: [PATCH v7 0/5] Introducing QMP query-netdev command
Date: Mon, 15 Mar 2021 16:19:00 +0800 [thread overview]
Message-ID: <583ade39-fd95-b5af-6d8f-c2126e341cbe@redhat.com> (raw)
In-Reply-To: <32641615544652@mail.yandex-team.ru>
在 2021/3/12 下午6:29, Alexey Kirillov 写道:
> ping
>
> Patchew page: https://patchew.org/QEMU/20210303095910.78277-1-lekiravi@yandex-team.ru
Applied.
Thanks
>
> 03.03.2021, 13:01, "Alexey Kirillov" <lekiravi@yandex-team.ru>:
>> This patch series introduces a new QMP command "query-netdev" to get
>> information about currently attached backend network devices (netdevs).
>>
>> Also, since the "info_str" field of "NetClientState" is now deprecated,
>> we no longer use it for netdevs, only for NIC/hubports.
>>
>> The HMP command "info network" now also uses QAPI structure inside.
>>
>> Usage example:
>>
>> -> { "execute": "query-netdev" }
>> <- { "return": [
>> {
>> "listen": "127.0.0.1:90",
>> "type": "socket",
>> "peer-id": "hub0port1",
>> "id": "__org.qemu.net1"
>> },
>> {
>> "script": "/etc/qemu-ifup",
>> "downscript": "/etc/qemu-ifdown",
>> "ifname": "tap0",
>> "type": "tap",
>> "peer-id": "net5",
>> "vnet_hdr": true,
>> "id": "tap0"
>> },
>> {
>> "ipv6": true,
>> "ipv4": true,
>> "host": "10.0.2.2",
>> "ipv6-dns": "fec0::3",
>> "ipv6-prefix": "fec0::",
>> "net": "10.0.2.0/255.255.255.0",
>> "ipv6-host": "fec0::2",
>> "type": "user",
>> "peer-id": "net0",
>> "dns": "10.0.2.3",
>> "hostfwd": [
>> {
>> "str": "tcp::20004-:22"
>> }
>> ],
>> "ipv6-prefixlen": 64,
>> "id": "netdev0",
>> "restrict": false
>> }
>> ]
>> }
>>
>> v6->v7:
>> - Use macroses QAPI_LIST_PREPEND and QAPI_LIST_APPEND for lists.
>> - Reorder NetBackend entries in alphabetical order.
>>
>> v5->v6:
>> - Add QAPI visitor to generate info_str replacement directly from NetdevInfo.
>> - Make info_str dynamically allocated.
>> - Make commit messages more meaningful.
>>
>> v4->v5:
>> - Enable qtest of query-netdevs for AVR and RX archs.
>> - Bump "Since" version in QAPI to 6.0.
>>
>> v3->v4:
>> - Rename "query-netdevs" to "query-netdev".
>> - Copy netdev drivers to new QAPI enum "NetBackend".
>>
>> v2->v3:
>> - Remove NIC and hubports from query-netdevs.
>> - Remove several fields from NetdevInfo since they are unnecessary.
>> - Rename field @peer to @peer-id.
>> - Add support of vhost-vdpa.
>> - Keep "info_str" for NIC/hubports, but remove it for netdevs.
>>
>> v1->v2:
>> - Rewrite HMP "info network" to get information from results of QMP command.
>> - Remove obsolete field "info_str" from "NetClientState".
>>
>> Alexey Kirillov (5):
>> qapi: net: Add query-netdev command
>> tests: Add tests for query-netdev command
>> net: Move NetClientState.info_str to dynamic allocations
>> hmp: Use QAPI NetdevInfo in hmp_info_network
>> net: Do not fill legacy info_str for backends
>>
>> hw/net/xen_nic.c | 5 +-
>> include/net/net.h | 5 +-
>> include/qapi/hmp-output-visitor.h | 30 +++++
>> net/l2tpv3.c | 8 +-
>> net/net.c | 73 +++++++++--
>> net/netmap.c | 7 ++
>> net/slirp.c | 124 ++++++++++++++++++-
>> net/socket.c | 92 ++++++++++----
>> net/tap-win32.c | 10 +-
>> net/tap.c | 107 +++++++++++++++--
>> net/vde.c | 25 +++-
>> net/vhost-user.c | 20 +++-
>> net/vhost-vdpa.c | 15 ++-
>> qapi/hmp-output-visitor.c | 193 ++++++++++++++++++++++++++++++
>> qapi/meson.build | 1 +
>> qapi/net.json | 80 +++++++++++++
>> tests/qtest/meson.build | 3 +
>> tests/qtest/test-query-netdev.c | 120 +++++++++++++++++++
>> 18 files changed, 856 insertions(+), 62 deletions(-)
>> create mode 100644 include/qapi/hmp-output-visitor.h
>> create mode 100644 qapi/hmp-output-visitor.c
>> create mode 100644 tests/qtest/test-query-netdev.c
>>
>> --
>> 2.25.1
>
> --
> Alexey Kirillov
> Yandex.Cloud
>
>
prev parent reply other threads:[~2021-03-15 8:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-03 9:59 [PATCH v7 0/5] Introducing QMP query-netdev command Alexey Kirillov
2021-03-03 9:59 ` [PATCH v7 1/5] qapi: net: Add " Alexey Kirillov
2021-03-03 9:59 ` [PATCH v7 2/5] tests: Add tests for " Alexey Kirillov
2021-03-03 9:59 ` [PATCH v7 3/5] net: Move NetClientState.info_str to dynamic allocations Alexey Kirillov
2021-03-03 9:59 ` [PATCH v7 4/5] hmp: Use QAPI NetdevInfo in hmp_info_network Alexey Kirillov
2021-03-03 9:59 ` [PATCH v7 5/5] net: Do not fill legacy info_str for backends Alexey Kirillov
2021-03-12 10:29 ` [PATCH v7 0/5] Introducing QMP query-netdev command Alexey Kirillov
2021-03-15 8:19 ` Jason Wang [this message]
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=583ade39-fd95-b5af-6d8f-c2126e341cbe@redhat.com \
--to=jasowang@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=g.lettieri@iet.unipi.it \
--cc=lekiravi@yandex-team.ru \
--cc=lvivier@redhat.com \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rizzo@iet.unipi.it \
--cc=samuel.thibault@ens-lyon.org \
--cc=sstabellini@kernel.org \
--cc=sw@weilnetz.de \
--cc=thuth@redhat.com \
--cc=v.maffione@gmail.com \
--cc=xen-devel@lists.xenproject.org \
--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).