> On 26 Oct 2016, at 22:21 PM, Eduardo Habkost <ehabk...@redhat.com> wrote:
>
> The original commit that introduced e1000e (6f3fbe4e) mentioned a
> property called "vnet". The actual property name added by the
> patch is "disable_vnet_hdr". Rename the property so that:
>
> 1) we avoid confusing double-negatives like
> "disable_vnet_hdr=false";
> 2) we avoid underscores in property names.
>
> This breaks command-line compatibility, but I am assuming the
> property is not being used in production by anybody.
Reviewed-by: Dmitry Fleytman <dmi...@daynix.com>
Again, this patch is Ok in case command line compatibility is not an issue.
>
> Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
> ---
> hw/net/e1000e.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c
> index a932620..5a711a7 100644
> --- a/hw/net/e1000e.c
> +++ b/hw/net/e1000e.c
> @@ -66,7 +66,7 @@ typedef struct E1000EState {
> uint16_t subsys_ven;
> uint16_t subsys;
>
> - bool disable_vnet;
> + bool has_vnet;
>
> E1000ECore core;
>
> @@ -327,7 +327,7 @@ e1000e_init_net_peer(E1000EState *s, PCIDevice *pci_dev,
> uint8_t *macaddr)
> qemu_format_nic_info_str(qemu_get_queue(s->nic), macaddr);
>
> /* Setup virtio headers */
> - if (s->disable_vnet) {
> + if (!s->has_vnet) {
> s->core.has_vnet = false;
> trace_e1000e_cfg_support_virtio(false);
> return;
> @@ -626,7 +626,7 @@ static const VMStateDescription e1000e_vmstate = {
>
> static Property e1000e_properties[] = {
> DEFINE_NIC_PROPERTIES(E1000EState, conf),
> - DEFINE_PROP_BOOL("disable_vnet_hdr", E1000EState, disable_vnet, false),
> + DEFINE_PROP_BOOL("vnet", E1000EState, has_vnet, true),
> DEFINE_PROP_UINT16("subsys_ven", E1000EState, subsys_ven,
> PCI_VENDOR_ID_INTEL),
> DEFINE_PROP_UINT16("subsys", E1000EState, subsys, 0),
> DEFINE_PROP_END_OF_LIST(),
> --
> 2.7.4
>