From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40985 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLdcl-0000qA-08 for qemu-devel@nongnu.org; Mon, 07 Jun 2010 10:48:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLdcf-0006DR-OG for qemu-devel@nongnu.org; Mon, 07 Jun 2010 10:48:20 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:63933) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLdcf-0006DK-LP for qemu-devel@nongnu.org; Mon, 07 Jun 2010 10:48:17 -0400 Received: by iwn41 with SMTP id 41so3569813iwn.4 for ; Mon, 07 Jun 2010 07:48:16 -0700 (PDT) Message-ID: <4C0D06AA.4080208@codemonkey.ws> Date: Mon, 07 Jun 2010 09:48:10 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1275660360-12137-1-git-send-email-miguel.filho@gmail.com> <4C0BC3C4.6010207@redhat.com> <4C0CF67B.8080601@redhat.com> <4C0CF89A.9030202@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC] QMP: Introduce query-netdevices documentation List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Miguel Di Ciurcio Filho Cc: armbru@redhat.com, lcapitulino@redhat.com, Avi Kivity , qemu-devel@nongnu.org On 06/07/2010 09:41 AM, Miguel Di Ciurcio Filho wrote: > On Mon, Jun 7, 2010 at 10:48 AM, Anthony Liguori wrote: > >>>> $ qemu -netdev tap,id=tap0 -device e1000,netdev=tap0 >>>> >>>> This makes a 1:1 relation. So clearly tap0 is a host device, e1000.0 >>>> will be a guest device, and they are connected. >>>> >>> Yes. I'd want separate queries for each, or perhaps a single query that >>> returns >>> >>> { 'hostdev': some-object-with-host-device-properties-only, 'nic': >>> some-object-that-describes-the-guest-nic } >>> >> We need a query-netdev and then info qdm already provides the guest nic >> properties. Just filter out devices that have a netdev property. >> >> > How about this small draft: > > Possible values for "type": tap, user, vde and socket. The 'info' > object contains all the parameters available via -netdev type,args. > > Notice: vlan is still there, unless the support for it is removed, IMHO. > 'id' is missing. Really, s/device/id/ is probably the right thing to do. vlan's are a totally separate concept. info netdev shouldn't return vlan devices IMHO. We should have a separate info vlan command that shows the vlan topology. Regards, Anthony Liguori > -> { "execute": "query-netdev" } > <- { > "return": [ > { > "device": "tap.0", > "vlan": 0, > "type": "tap", > "info": { > "script": "/etc/qemu-ifup", > "downscript": "/etc/qemu-ifdown", > "ifname": "tap0", > }, > { > "device": "user.0", > "type": "user", > "info": { > "net": "10.0.2.0", > "netmask": "255.255.255.0" > }, > }, >