Received: from [140.186.70.92] (port=59346 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQcHn-0000pn-1Y for qemu-devel@nongnu.org; Mon, 21 Jun 2010 04:23:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQcHl-00008M-4J for qemu-devel@nongnu.org; Mon, 21 Jun 2010 04:23:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48983) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQcHk-000089-QN for qemu-devel@nongnu.org; Mon, 21 Jun 2010 04:23:17 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev References: <1276878387-9489-1-git-send-email-miguel.filho@gmail.com> <4C1BD6FA.7020502@codemonkey.ws> Date: Mon, 21 Jun 2010 10:23:11 +0200 In-Reply-To: <4C1BD6FA.7020502@codemonkey.ws> (Anthony Liguori's message of "Fri, 18 Jun 2010 15:28:42 -0500") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Miguel Di Ciurcio Filho , avi@redhat.com, lcapitulino@redhat.com Anthony Liguori writes: > On 06/18/2010 11:26 AM, Miguel Di Ciurcio Filho wrote: >> These commands show the information about active backend network devices. >> >> Signed-off-by: Miguel Di Ciurcio Filho >> --- >> qemu-monitor.hx | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 files changed, 105 insertions(+), 0 deletions(-) >> >> diff --git a/qemu-monitor.hx b/qemu-monitor.hx >> index 9f62b94..8fc5ed6 100644 >> --- a/qemu-monitor.hx >> +++ b/qemu-monitor.hx >> @@ -1674,6 +1674,111 @@ show the various VLANs and the associated devices >> ETEXI >> >> STEXI >> +@item info netdev >> +show information about the current backend network devices >> +ETEXI >> +SQMP >> +query-netdev >> +------------ >> + >> +Each device is represented by a json-object. The returned value is a json-array >> +of all devices. >> + >> +Each json-object contains the following: >> + >> +- "id": the device's ID, must be unique (json-string) >> +- "type": device type (json-string) >> + - Possible values: "tap", "user", "vde", "socket" >> +- "vlan": QEMU's internal vlan identification. Only present if the device is >> + attached to a VLAN (json-int, optional) >> +- "peer": ID of the frontend device when on a 1:1 relationship (json-string, >> + optional) >> > > I think we should only return items with a valid peer property and > drop anything attached to vlans. The current info network already > provides vlan information. Not quite. Not having a valid peer doesn't imply connection to VLAN. I also think we should keep VLAN-stuff as separate as possible, to ease the transition away from it. In implementation terms, I'd like query-netdev to cover the members of non_vlan_clients that are not guest devices (info->type != NET_CLIENT_TYPE_NIC). Member vlan should be ignored (it should always be null). Member peer points to the guest device, and may be null (no guest device attached).