From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40316 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OLcgd-0005J2-C8 for qemu-devel@nongnu.org; Mon, 07 Jun 2010 09:48:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OLcgc-0002hc-88 for qemu-devel@nongnu.org; Mon, 07 Jun 2010 09:48:19 -0400 Received: from mail-yw0-f184.google.com ([209.85.211.184]:35287) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OLcgc-0002hK-5g for qemu-devel@nongnu.org; Mon, 07 Jun 2010 09:48:18 -0400 Received: by ywh14 with SMTP id 14so2937883ywh.25 for ; Mon, 07 Jun 2010 06:48:17 -0700 (PDT) Message-ID: <4C0CF89A.9030202@codemonkey.ws> Date: Mon, 07 Jun 2010 08: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> In-Reply-To: <4C0CF67B.8080601@redhat.com> 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: Avi Kivity Cc: lcapitulino@redhat.com, Miguel Di Ciurcio Filho , qemu-devel@nongnu.org, armbru@redhat.com On 06/07/2010 08:39 AM, Avi Kivity wrote: > On 06/07/2010 03:57 PM, Miguel Di Ciurcio Filho wrote: >> On Sun, Jun 6, 2010 at 12:50 PM, Avi Kivity wrote: >>>> +Each json-object contain the following: >>>> + >>>> +- "device": device name (json-string) >>>> +- "vlan": only present if the device is attached to a VLAN (json-int) >>>> +- "info": json-object containing the following: >>>> + - "model": type of the device (json-string) >>>> + - Possible values: "tap", "socket", "xen", "slirp", >>>> "dump", >>>> + "vde", "ne2k_pci", "i82551", >>>> "i82557b", >>>> + "i82559er", "rtl8139", "e1000", >>>> "pcnet", >>>> + "virtio", "dp83932", "lan9118", >>>> "mcf_fec", >>>> + "xilinx-ethlite", "lance", >>>> "stellaris", >>>> + "smc91c111", "ne2k_isa", >>>> "mv88w8618", >>>> + "mipsnet", "fseth", "dp83932", "usb" >>>> >>> This casts the vlan model into concrete. I thought we wanted to >>> move away >>> from it? Instead have separate entries for host and guest devices. >> The vlan attribute is optional. In this case, it is a vlan inside the >> context of the VM. I've searched the archives and I've found some >> references about the confusion about real VLANs (802.1Q) and QEMU's >> vlans. Correct me if I'm wrong, but I suppose they are completely >> different animals. > > Right. I'm talking about the qemu internal vlans. > >> When you say separate entries for host and guest devices, you mean >> something like this: >> >> $ 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. Regards, Anthony Liguori >> $ qemu -net tap,ifname=tap0 -net nic,model=e1000 >> >> This glues the two devices into a vlan inside the VM. >> >> Do you mean that this second model should be deprecated? > > I think it is. It doesn't play well with acceleration technologies > like vhost that want a 1:1 relationship. >