All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Kirillov <lekiravi@yandex-team.ru>
To: Eric Blake <eblake@redhat.com>, Thomas Huth <huth@tuxfamily.org>,
	Markus Armbruster <armbru@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	qemu-devel@nongnu.org, "Vincenzo Maffione" <v.maffione@gmail.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Sven Schnelle" <svens@stackframe.org>,
	"Rob Herring" <robh@kernel.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Paul Durrant" <paul@xen.org>, "Joel Stanley" <joel@jms.id.au>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Aleksandar Rikalo" <aleksandar.rikalo@rt-rk.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Jiri Pirko" <jiri@resnulli.us>,
	yc-core@yandex-team.ru, "Stefan Weil" <sw@weilnetz.de>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Beniamino Galvani" <b.galvani@gmail.com>,
	qemu-arm@nongnu.org, "Peter Chubb" <peter.chubb@nicta.com.au>,
	"Cédric Le Goater" <clg@kaod.org>,
	xen-devel@lists.xenproject.org,
	"Giuseppe Lettieri" <g.lettieri@iet.unipi.it>,
	"Luigi Rizzo" <rizzo@iet.unipi.it>,
	"Richard Henderson" <rth@twiddle.net>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Michael Walle" <michael@walle.cc>,
	qemu-ppc@nongnu.org,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Alexey Kirillov" <lekiravi@yandex-team.ru>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH v2 0/4] Introducing QMP query-netdevs command
Date: Wed,  4 Mar 2020 16:06:52 +0300	[thread overview]
Message-ID: <20200304130656.16859-1-lekiravi@yandex-team.ru> (raw)

This patch series introduces a new QMP command "query-netdevs" to get
information about currently attached network devices.
Also, since the "info_str" field of "NetClientState" is now deprecated,
it has been completely removed.
The HMP command "info network" now also uses the new QMP command inside.

Usage example:

-> { "execute": "query-netdevs" }
<- { "return": [
         {
             "peer": "netdev0",
             "netdev": "netdev0",
             "perm-mac": "52:54:00:12:34:56"
             "model": "virtio-net-pci",
             "macaddr": "52:54:00:12:34:56",
             "queues-count": 1,
             "type": "nic",
             "id": "net0"
         },
         {
             "peer": "net0",
             "ipv6": true,
             "ipv4": true,
             "host": "10.0.2.2",
             "queues-count": 1,
             "ipv6-dns": "fec0::3",
             "ipv6-prefix": "fec0::",
             "net": "10.0.2.0/255.255.255.0",
             "ipv6-host": "fec0::2",
             "type": "user",
             "dns": "10.0.2.3",
             "hostfwd": [
                 {
                     "str": "tcp::20004-:22"
                 }
             ],
             "ipv6-prefixlen": 64,
             "id": "netdev0",
             "restrict": false
         }
     ]
   }

v2->v1:
- Rewrite HMP "info network" to get information from results of QMP command.
- Remove obsolete field "info_str" from "NetClientState".

Alexey Kirillov (4):
  qapi: net: Add query-netdevs command
  tests: Add tests for query-netdevs command
  hmp: Use QMP query-netdevs in hmp_info_network
  net: Remove field info_str of NetClientState

 hw/net/allwinner_emac.c          |   2 +-
 hw/net/dp8393x.c                 |   2 +-
 hw/net/e1000.c                   |   4 +-
 hw/net/e1000e.c                  |   2 +-
 hw/net/e1000e_core.c             |   2 +-
 hw/net/e1000x_common.c           |   2 +-
 hw/net/eepro100.c                |   5 +-
 hw/net/etraxfs_eth.c             |   2 +-
 hw/net/fsl_etsec/etsec.c         |   2 +-
 hw/net/ftgmac100.c               |   2 +-
 hw/net/i82596.c                  |   6 +-
 hw/net/imx_fec.c                 |   2 +-
 hw/net/lan9118.c                 |   4 +-
 hw/net/mcf_fec.c                 |   2 +-
 hw/net/milkymist-minimac2.c      |   2 +-
 hw/net/mipsnet.c                 |   2 +-
 hw/net/ne2000-isa.c              |   2 +-
 hw/net/ne2000-pci.c              |   2 +-
 hw/net/pcnet.c                   |   2 +-
 hw/net/rocker/rocker_fp.c        |   4 +-
 hw/net/rtl8139.c                 |   6 +-
 hw/net/smc91c111.c               |   2 +-
 hw/net/spapr_llan.c              |   6 +-
 hw/net/stellaris_enet.c          |   2 +-
 hw/net/sungem.c                  |   4 +-
 hw/net/sunhme.c                  |   2 +-
 hw/net/tulip.c                   |   2 +-
 hw/net/virtio-net.c              |   8 +-
 hw/net/vmxnet3.c                 |   4 +-
 hw/net/xen_nic.c                 |   4 -
 hw/net/xgmac.c                   |   2 +-
 hw/net/xilinx_axienet.c          |   2 +-
 hw/net/xilinx_ethlite.c          |   2 +-
 hw/usb/dev-network.c             |   2 +-
 include/net/net.h                |   7 +-
 net/clients.h                    |   1 +
 net/hub.c                        |  12 +-
 net/hub.h                        |   2 +-
 net/l2tpv3.c                     |  20 ++-
 net/net.c                        | 272 +++++++++++++++++++++++++++++--
 net/netmap.c                     |  13 ++
 net/slirp.c                      | 128 ++++++++++++++-
 net/socket.c                     |  93 ++++++++---
 net/tap-win32.c                  |   9 +
 net/tap.c                        | 107 ++++++++++--
 net/vde.c                        |  40 ++++-
 net/vhost-user.c                 |  20 ++-
 qapi/net.json                    |  89 ++++++++++
 tests/qtest/Makefile.include     |   2 +
 tests/qtest/test-query-netdevs.c | 120 ++++++++++++++
 50 files changed, 917 insertions(+), 119 deletions(-)
 create mode 100644 tests/qtest/test-query-netdevs.c

-- 
2.17.1



WARNING: multiple messages have this Message-ID (diff)
From: Alexey Kirillov <lekiravi@yandex-team.ru>
To: Eric Blake <eblake@redhat.com>, Thomas Huth <huth@tuxfamily.org>,
	Markus Armbruster <armbru@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"Dmitry Fleytman" <dmitry.fleytman@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	qemu-devel@nongnu.org, "Vincenzo Maffione" <v.maffione@gmail.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Sven Schnelle" <svens@stackframe.org>,
	"Rob Herring" <robh@kernel.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Paul Durrant" <paul@xen.org>, "Joel Stanley" <joel@jms.id.au>,
	"Anthony Perard" <anthony.perard@citrix.com>,
	"Samuel Thibault" <samuel.thibault@ens-lyon.org>,
	"Aleksandar Rikalo" <aleksandar.rikalo@rt-rk.com>,
	"David Gibson" <david@gibson.dropbear.id.au>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Jiri Pirko" <jiri@resnulli.us>,
	yc-core@yandex-team.ru, "Stefan Weil" <sw@weilnetz.de>,
	"Alistair Francis" <alistair@alistair23.me>,
	"Beniamino Galvani" <b.galvani@gmail.com>,
	qemu-arm@nongnu.org, "Peter Chubb" <peter.chubb@nicta.com.au>,
	"Cédric Le Goater" <clg@kaod.org>,
	xen-devel@lists.xenproject.org,
	"Giuseppe Lettieri" <g.lettieri@iet.unipi.it>,
	"Luigi Rizzo" <rizzo@iet.unipi.it>,
	"Richard Henderson" <rth@twiddle.net>,
	"Andrew Jeffery" <andrew@aj.id.au>,
	"Michael Walle" <michael@walle.cc>,
	qemu-ppc@nongnu.org,
	"Aleksandar Markovic" <amarkovic@wavecomp.com>,
	"Alexey Kirillov" <lekiravi@yandex-team.ru>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [Xen-devel] [PATCH v2 0/4] Introducing QMP query-netdevs command
Date: Wed,  4 Mar 2020 16:06:52 +0300	[thread overview]
Message-ID: <20200304130656.16859-1-lekiravi@yandex-team.ru> (raw)

This patch series introduces a new QMP command "query-netdevs" to get
information about currently attached network devices.
Also, since the "info_str" field of "NetClientState" is now deprecated,
it has been completely removed.
The HMP command "info network" now also uses the new QMP command inside.

Usage example:

-> { "execute": "query-netdevs" }
<- { "return": [
         {
             "peer": "netdev0",
             "netdev": "netdev0",
             "perm-mac": "52:54:00:12:34:56"
             "model": "virtio-net-pci",
             "macaddr": "52:54:00:12:34:56",
             "queues-count": 1,
             "type": "nic",
             "id": "net0"
         },
         {
             "peer": "net0",
             "ipv6": true,
             "ipv4": true,
             "host": "10.0.2.2",
             "queues-count": 1,
             "ipv6-dns": "fec0::3",
             "ipv6-prefix": "fec0::",
             "net": "10.0.2.0/255.255.255.0",
             "ipv6-host": "fec0::2",
             "type": "user",
             "dns": "10.0.2.3",
             "hostfwd": [
                 {
                     "str": "tcp::20004-:22"
                 }
             ],
             "ipv6-prefixlen": 64,
             "id": "netdev0",
             "restrict": false
         }
     ]
   }

v2->v1:
- Rewrite HMP "info network" to get information from results of QMP command.
- Remove obsolete field "info_str" from "NetClientState".

Alexey Kirillov (4):
  qapi: net: Add query-netdevs command
  tests: Add tests for query-netdevs command
  hmp: Use QMP query-netdevs in hmp_info_network
  net: Remove field info_str of NetClientState

 hw/net/allwinner_emac.c          |   2 +-
 hw/net/dp8393x.c                 |   2 +-
 hw/net/e1000.c                   |   4 +-
 hw/net/e1000e.c                  |   2 +-
 hw/net/e1000e_core.c             |   2 +-
 hw/net/e1000x_common.c           |   2 +-
 hw/net/eepro100.c                |   5 +-
 hw/net/etraxfs_eth.c             |   2 +-
 hw/net/fsl_etsec/etsec.c         |   2 +-
 hw/net/ftgmac100.c               |   2 +-
 hw/net/i82596.c                  |   6 +-
 hw/net/imx_fec.c                 |   2 +-
 hw/net/lan9118.c                 |   4 +-
 hw/net/mcf_fec.c                 |   2 +-
 hw/net/milkymist-minimac2.c      |   2 +-
 hw/net/mipsnet.c                 |   2 +-
 hw/net/ne2000-isa.c              |   2 +-
 hw/net/ne2000-pci.c              |   2 +-
 hw/net/pcnet.c                   |   2 +-
 hw/net/rocker/rocker_fp.c        |   4 +-
 hw/net/rtl8139.c                 |   6 +-
 hw/net/smc91c111.c               |   2 +-
 hw/net/spapr_llan.c              |   6 +-
 hw/net/stellaris_enet.c          |   2 +-
 hw/net/sungem.c                  |   4 +-
 hw/net/sunhme.c                  |   2 +-
 hw/net/tulip.c                   |   2 +-
 hw/net/virtio-net.c              |   8 +-
 hw/net/vmxnet3.c                 |   4 +-
 hw/net/xen_nic.c                 |   4 -
 hw/net/xgmac.c                   |   2 +-
 hw/net/xilinx_axienet.c          |   2 +-
 hw/net/xilinx_ethlite.c          |   2 +-
 hw/usb/dev-network.c             |   2 +-
 include/net/net.h                |   7 +-
 net/clients.h                    |   1 +
 net/hub.c                        |  12 +-
 net/hub.h                        |   2 +-
 net/l2tpv3.c                     |  20 ++-
 net/net.c                        | 272 +++++++++++++++++++++++++++++--
 net/netmap.c                     |  13 ++
 net/slirp.c                      | 128 ++++++++++++++-
 net/socket.c                     |  93 ++++++++---
 net/tap-win32.c                  |   9 +
 net/tap.c                        | 107 ++++++++++--
 net/vde.c                        |  40 ++++-
 net/vhost-user.c                 |  20 ++-
 qapi/net.json                    |  89 ++++++++++
 tests/qtest/Makefile.include     |   2 +
 tests/qtest/test-query-netdevs.c | 120 ++++++++++++++
 50 files changed, 917 insertions(+), 119 deletions(-)
 create mode 100644 tests/qtest/test-query-netdevs.c

-- 
2.17.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2020-03-04 13:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-04 13:06 Alexey Kirillov [this message]
2020-03-04 13:06 ` [Xen-devel] [PATCH v2 0/4] Introducing QMP query-netdevs command Alexey Kirillov
2020-03-04 13:06 ` [PATCH v2 1/4] qapi: net: Add " Alexey Kirillov
2020-03-04 13:06   ` [Xen-devel] " Alexey Kirillov
2020-03-04 15:57   ` Laurent Vivier
2020-03-04 15:57     ` [Xen-devel] " Laurent Vivier
2020-03-05 14:25     ` Alexey Kirillov
2020-03-05 14:25       ` [Xen-devel] " Alexey Kirillov
2020-03-05 12:02   ` Markus Armbruster
2020-03-05 12:02     ` [Xen-devel] " Markus Armbruster
2020-03-05 14:26     ` Alexey Kirillov
2020-03-05 14:26       ` [Xen-devel] " Alexey Kirillov
2020-06-23  9:59       ` Alexey Kirillov
2020-06-23  9:59         ` Alexey Kirillov
2020-03-04 13:06 ` [PATCH v2 2/4] tests: Add tests for " Alexey Kirillov
2020-03-04 13:06   ` [Xen-devel] " Alexey Kirillov
2020-03-04 13:06 ` [PATCH v2 3/4] hmp: Use QMP query-netdevs in hmp_info_network Alexey Kirillov
2020-03-04 13:06   ` [Xen-devel] " Alexey Kirillov
2020-03-04 13:06 ` [PATCH v2 4/4] net: Remove field info_str of NetClientState Alexey Kirillov
2020-03-04 13:06   ` [Xen-devel] " Alexey Kirillov
2020-03-04 15:41   ` Laurent Vivier
2020-03-04 15:41     ` [Xen-devel] " Laurent Vivier

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=20200304130656.16859-1-lekiravi@yandex-team.ru \
    --to=lekiravi@yandex-team.ru \
    --cc=aleksandar.rikalo@rt-rk.com \
    --cc=alistair@alistair23.me \
    --cc=amarkovic@wavecomp.com \
    --cc=andrew@aj.id.au \
    --cc=anthony.perard@citrix.com \
    --cc=armbru@redhat.com \
    --cc=b.galvani@gmail.com \
    --cc=clg@kaod.org \
    --cc=david@gibson.dropbear.id.au \
    --cc=dmitry.fleytman@gmail.com \
    --cc=eblake@redhat.com \
    --cc=edgar.iglesias@gmail.com \
    --cc=g.lettieri@iet.unipi.it \
    --cc=huth@tuxfamily.org \
    --cc=jasowang@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=joel@jms.id.au \
    --cc=kraxel@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=michael@walle.cc \
    --cc=mst@redhat.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.chubb@nicta.com.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rizzo@iet.unipi.it \
    --cc=robh@kernel.org \
    --cc=rth@twiddle.net \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=sstabellini@kernel.org \
    --cc=svens@stackframe.org \
    --cc=sw@weilnetz.de \
    --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 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.