[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH v2] QMP: Introduce the documentation for query-n
From: |
Miguel Di Ciurcio Filho |
Subject: |
[Qemu-devel] Re: [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev |
Date: |
Mon, 21 Jun 2010 14:58:36 -0300 |
On Mon, Jun 21, 2010 at 11:42 AM, Luiz Capitulino
<address@hidden> 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
- Re: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev, (continued)
Re: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev, Miguel Di Ciurcio Filho, 2010/06/18
Re: [Qemu-devel] [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev, Markus Armbruster, 2010/06/21
[Qemu-devel] Re: [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev, Luiz Capitulino, 2010/06/21
[Qemu-devel] Re: [PATCH v2] QMP: Introduce the documentation for query-netdev and info netdev,
Miguel Di Ciurcio Filho <=