On Mon, Jun 21, 2010 at 11:42 AM, Luiz Capitulino <lcapitul...@redhat.com> wrote: >> +- "info": json-object containing the configuration information about the >> device. >> + - When "type" is "tap", the following values might be available: >> + - "fd": available if connected to an already opened TAP >> interface >> + (json-int, optional) >> + - "script": path to an script used to configure the interface, >> if >> + the value is "no" then no script is used. (json-string, only >> + present if "fd" is not present) > > What if the script is called "no"? Better not to include the key in this > 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=tap,script=no,downscript=no.... But, returning "no" is really not a good idea, indeed. If scripts were disabled in the command line, "script" and "downscript" should not exist. >> + - "downscript": path to an script used to deconfigure the >> interface, >> + if the value is "no" then no script is used. (json-string, >> only >> + present if "fd" is not present) > > Same as above. > >> + - "ifname": name of the attached host interface (json-string, >> only >> + present if "fd" is not present) >> + - "vhost": vhost acceleration status, true if enabled, false >> + otherwise (json-boolean) >> + - "vnet_hdr": true if the IFF_VNET_HDR flag must be set, false >> + otherwise (json-boolean) > > Why is vnet_hdr important? Because of this (quoting the command line docs): "use vnet_hdr=off to avoid enabling the IFF_VNET_HDR tap flag use vnet_hdr=on to make the lack of IFF_VNET_HDR support an error condition" So if "vnet_hdr" is true, it means that the VM is effectively using the feature. > >> + - "vhostfd": positive number if the device is connected to an >> + already opened vhost net device, -1 otherwise (json-int) > > Making the key option is better, IMO. > Indeed, same case as "script" and "downscript". Regards, Miguel