From nobody Sat Oct 25 13:21:43 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 15210878652351022.731603566375; Wed, 14 Mar 2018 21:24:25 -0700 (PDT) Received: from localhost ([::1]:49660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKRE-00035M-CO for importer@patchew.org; Thu, 15 Mar 2018 00:24:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ewKMJ-00074S-JL for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ewKMI-00043q-A1 for qemu-devel@nongnu.org; Thu, 15 Mar 2018 00:19:19 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:34955) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ewKMH-000428-U9; Thu, 15 Mar 2018 00:19:18 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 401wMc5cXVz9sVX; Thu, 15 Mar 2018 15:19:08 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1521087548; bh=YMYmOzhfiM3kS+euaarYGXfjyaKr28ubyRHzEJof7OY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gcBhSjQ7Tu8p1FImHsKnB7ijklcY63nfEFNhIbtHg5uKFE99HJUiRY7pwiAGWYGqU uHkYXx+u60db1fXELiwjti8olZXKwsXjrn8FEGyFYk4YKHSw93E3IRxoPTaNjcwM2Z lrzn24xMwKtF6EHWer1cCdc9I0mGhM3G9OtLQmXY= From: David Gibson To: peter.maydell@linaro.org Date: Thu, 15 Mar 2018 15:19:00 +1100 Message-Id: <20180315041903.10046-7-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au> References: <20180315041903.10046-1-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2401:3900:2:1::2 Subject: [Qemu-devel] [PULL 6/9] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth" 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: , Cc: lvivier@redhat.com, Thomas Huth , surajjs@au1.ibm.com, qemu-devel@nongnu.org, groug@kaod.org, qemu-ppc@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Thomas Huth With the new "--nic" command line parameter option, the "old" way of specifying a NIC model via the nd_table[] is becoming more prominent again. But for the pseries "spapr-vlan" device, there is a confusing discrepancy between the model name that is used for "--device" (i.e. "spapr-vlan") and the model name that has to be used for "--net nic" or the new "--nic" parameter (i.e. "ibmveth"). Since "spapr-vlan" is the "real" name of the device, let's allow "spapr-vlan" to be used as model name for the nd_table[] entries, too. Signed-off-by: Thomas Huth Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 7e1c858566..dfa9e43601 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2607,10 +2607,11 @@ static void spapr_machine_init(MachineState *machin= e) NICInfo *nd =3D &nd_table[i]; =20 if (!nd->model) { - nd->model =3D g_strdup("ibmveth"); + nd->model =3D g_strdup("spapr-vlan"); } =20 - if (strcmp(nd->model, "ibmveth") =3D=3D 0) { + if (g_str_equal(nd->model, "spapr-vlan") || + g_str_equal(nd->model, "ibmveth")) { spapr_vlan_create(spapr->vio_bus, nd); } else { pci_nic_init_nofail(&nd_table[i], phb->bus, nd->model, NULL); --=20 2.14.3