From patchwork Wed Oct 26 19:21:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 9398075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9F02160231 for ; Wed, 26 Oct 2016 19:26:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69BF229C2C for ; Wed, 26 Oct 2016 19:26:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E87C29C43; Wed, 26 Oct 2016 19:26:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EF2FE29C2C for ; Wed, 26 Oct 2016 19:26:32 +0000 (UTC) Received: from localhost ([::1]:37057 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzTqK-0002j2-3V for patchwork-qemu-devel@patchwork.kernel.org; Wed, 26 Oct 2016 15:26:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35198) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzTmA-0008Fq-U4 for qemu-devel@nongnu.org; Wed, 26 Oct 2016 15:22:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzTm7-0007ae-3p for qemu-devel@nongnu.org; Wed, 26 Oct 2016 15:22:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37716) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzTm6-0007aI-UZ for qemu-devel@nongnu.org; Wed, 26 Oct 2016 15:22:11 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4098B121A8E; Wed, 26 Oct 2016 19:22:10 +0000 (UTC) Received: from localhost (ovpn-116-163.phx2.redhat.com [10.3.116.163]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u9QJM9Jo021799; Wed, 26 Oct 2016 15:22:09 -0400 From: Eduardo Habkost To: qemu-devel@nongnu.org, Dmitry Fleytman , Jason Wang Date: Wed, 26 Oct 2016 17:21:57 -0200 Message-Id: <1477509718-6969-4-git-send-email-ehabkost@redhat.com> In-Reply-To: <1477509718-6969-1-git-send-email-ehabkost@redhat.com> References: <1477509718-6969-1-git-send-email-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 26 Oct 2016 19:22:10 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/4] e1000e: Rename "disable_vnet_hdr" property to "vnet" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Dmitry Fleytman --- 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(),