qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Introducing QMP query-netdevs command
@ 2020-03-04 13:06 Alexey Kirillov
  2020-03-04 13:06 ` [PATCH v2 1/4] qapi: net: Add " Alexey Kirillov
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Alexey Kirillov @ 2020-03-04 13:06 UTC (permalink / raw)
  To: Eric Blake, Thomas Huth, Markus Armbruster
  Cc: Peter Maydell, Dmitry Fleytman, Michael S. Tsirkin, Jason Wang,
	qemu-devel, Vincenzo Maffione, Gerd Hoffmann, Edgar E. Iglesias,
	Sven Schnelle, Rob Herring, Stefano Stabellini, Paul Durrant,
	Joel Stanley, Anthony Perard, Samuel Thibault, Aleksandar Rikalo,
	David Gibson, Laurent Vivier, Jiri Pirko, yc-core, Stefan Weil,
	Alistair Francis, Beniamino Galvani, qemu-arm, Peter Chubb,
	Cédric Le Goater, xen-devel, Giuseppe Lettieri, Luigi Rizzo,
	Richard Henderson, Andrew Jeffery, Michael Walle, qemu-ppc,
	Aleksandar Markovic, Alexey Kirillov, Paolo Bonzini

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



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-06-23 10:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-04 13:06 [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 15:57   ` Laurent Vivier
2020-03-05 14:25     ` Alexey Kirillov
2020-03-05 12:02   ` Markus Armbruster
2020-03-05 14:26     ` 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 ` [PATCH v2 3/4] hmp: Use QMP query-netdevs in hmp_info_network Alexey Kirillov
2020-03-04 13:06 ` [PATCH v2 4/4] net: Remove field info_str of NetClientState Alexey Kirillov
2020-03-04 15:41   ` Laurent Vivier

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).