From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39095 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQlGb-0002YN-DN for qemu-devel@nongnu.org; Mon, 21 Jun 2010 13:58:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQlGZ-0004tj-3x for qemu-devel@nongnu.org; Mon, 21 Jun 2010 13:58:41 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:52048) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQlGY-0004tT-W6 for qemu-devel@nongnu.org; Mon, 21 Jun 2010 13:58:39 -0400 Received: by wyb36 with SMTP id 36so3158383wyb.4 for ; Mon, 21 Jun 2010 10:58:36 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20100621114259.13e615ee@redhat.com> References: <1276878387-9489-1-git-send-email-miguel.filho@gmail.com> <20100621114259.13e615ee@redhat.com> Date: Mon, 21 Jun 2010 14:58:36 -0300 Message-ID: From: Miguel Di Ciurcio Filho Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: armbru@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, avi@redhat.com On Mon, Jun 21, 2010 at 11:42 AM, Luiz Capitulino wrote: >> +- "info": json-object containing the configuration information about th= e device. >> + =A0 =A0 =A0 =A0- When "type" is "tap", the following values might be a= vailable: >> + =A0 =A0 =A0 =A0 =A0 =A0- "fd": available if connected to an already op= ened TAP interface >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0(json-int, optional) >> + =A0 =A0 =A0 =A0 =A0 =A0- "script": path to an script used to configure= the interface, if >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0the value is "no" then no script is used. (= json-string, only >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0present if "fd" is not present) > > =A0What if the script is called "no"? Better not to include the key in th= is case. Actually, it can't be named "no". Because if the name is "no", qemu does not run any script. net/tap.c:net_tap_init():391 and net/tap.c:net_init_tap:():462. $ qemu -netdev type=3Dtap,script=3Dno,downscript=3Dno.... But, returning "no" is really not a good idea, indeed. If scripts were disabled in the command line, "script" and "downscript" should not exist. >> + =A0 =A0 =A0 =A0 =A0 =A0- "downscript": path to an script used to decon= figure the interface, >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0if the value is "no" then no script is used= . (json-string, only >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0present if "fd" is not present) > > =A0Same as above. > >> + =A0 =A0 =A0 =A0 =A0 =A0- "ifname": name of the attached host interface= (json-string, only >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0present if "fd" is not present) >> + =A0 =A0 =A0 =A0 =A0 =A0- "vhost": vhost acceleration status, true if e= nabled, false >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0otherwise (json-boolean) >> + =A0 =A0 =A0 =A0 =A0 =A0- "vnet_hdr": true if the IFF_VNET_HDR flag mus= t be set, false >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0otherwise (json-boolean) > > =A0Why is vnet_hdr important? Because of this (quoting the command line docs): "use vnet_hdr=3Doff to avoid enabling the IFF_VNET_HDR tap flag use vnet_hdr=3Don to make the lack of IFF_VNET_HDR support an error conditi= on" So if "vnet_hdr" is true, it means that the VM is effectively using the fea= ture. > >> + =A0 =A0 =A0 =A0 =A0 =A0- "vhostfd": positive number if the device is c= onnected to an >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0already opened vhost net device, -1 otherwi= se (json-int) > > =A0Making the key option is better, IMO. > Indeed, same case as "script" and "downscript". Regards, Miguel