qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 3/4] e1000e: Rename "disable_vnet_hdr" property to "


From: Eduardo Habkost
Subject: [Qemu-devel] [PATCH 3/4] e1000e: Rename "disable_vnet_hdr" property to "vnet"
Date: Wed, 26 Oct 2016 17:21:57 -0200

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.

Signed-off-by: Eduardo Habkost <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]