qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: peter.maydell@linaro.org
Cc: groug@kaod.org, lvivier@redhat.com, surajjs@au1.ibm.com,
	qemu-devel@nongnu.org, qemu-ppc@nongnu.org,
	Thomas Huth <thuth@redhat.com>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: [Qemu-devel] [PULL 6/9] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth"
Date: Thu, 15 Mar 2018 15:19:00 +1100	[thread overview]
Message-ID: <20180315041903.10046-7-david@gibson.dropbear.id.au> (raw)
In-Reply-To: <20180315041903.10046-1-david@gibson.dropbear.id.au>

From: Thomas Huth <thuth@redhat.com>

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 <thuth@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 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 *machine)
         NICInfo *nd = &nd_table[i];
 
         if (!nd->model) {
-            nd->model = g_strdup("ibmveth");
+            nd->model = g_strdup("spapr-vlan");
         }
 
-        if (strcmp(nd->model, "ibmveth") == 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);
-- 
2.14.3

  parent reply	other threads:[~2018-03-15  4:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15  4:18 [Qemu-devel] [PULL 0/9] ppc-for-2.12 queue 20180315 David Gibson
2018-03-15  4:18 ` [Qemu-devel] [PULL 1/9] sii3112: Remove unneeded exit function David Gibson
2018-03-15  4:18 ` [Qemu-devel] [PULL 2/9] tests/boot-serial: Check the 40p machine, too David Gibson
2018-03-15  4:18 ` [Qemu-devel] [PULL 3/9] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices David Gibson
2018-03-15  4:18 ` [Qemu-devel] [PULL 4/9] hw/misc/macio: Mark the macio devices with user_creatable = false David Gibson
2018-03-15  4:18 ` [Qemu-devel] [PULL 5/9] PPC e500: Fix gap between u-boot and kernel David Gibson
2018-03-15  4:19 ` David Gibson [this message]
2018-03-15  4:19 ` [Qemu-devel] [PULL 7/9] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...) David Gibson
2018-03-15  4:19 ` [Qemu-devel] [PULL 8/9] tests/boot-serial: Test the sam460ex board David Gibson
2018-03-15  4:19 ` [Qemu-devel] [PULL 9/9] target/ppc: fix tlbsync to check privilege level depending on GTSE David Gibson
2018-03-16 17:25 ` [Qemu-devel] [PULL 0/9] ppc-for-2.12 queue 20180315 Peter Maydell
2018-03-17  4:02   ` David Gibson
2018-03-17 10:08     ` Peter Maydell
2018-03-17 11:22       ` [Qemu-devel] [Qemu-ppc] " BALATON Zoltan
2018-03-17 11:30         ` BALATON Zoltan
2018-03-19  0:21           ` David Gibson
2018-03-19  7:11           ` Thomas Huth
2018-03-19  0:21       ` [Qemu-devel] " David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180315041903.10046-7-david@gibson.dropbear.id.au \
    --to=david@gibson.dropbear.id.au \
    --cc=groug@kaod.org \
    --cc=lvivier@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=surajjs@au1.ibm.com \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).