[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 6/8] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 6/8] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth" |
Date: |
Mon, 19 Mar 2018 11:35:22 +1100 |
From: Thomas Huth <address@hidden>
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 <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
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 032d03423f..fba76abee2 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
- [Qemu-ppc] [PULL 0/8] ppc-for-2.12 queue 20180319, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 6/8] hw/ppc/spapr: Allow "spapr-vlan" as NIC model name beside "ibmveth",
David Gibson <=
- [Qemu-ppc] [PULL 3/8] hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 4/8] hw/misc/macio: Mark the macio devices with user_creatable = false, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 2/8] tests/boot-serial: Check the 40p machine, too, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 7/8] ppc440_pcix: Change some error_report to qemu_log_mask(LOG_UNIMP, ...), David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 8/8] target/ppc: fix tlbsync to check privilege level depending on GTSE, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 5/8] PPC e500: Fix gap between u-boot and kernel, David Gibson, 2018/03/18
- [Qemu-ppc] [PULL 1/8] sii3112: Remove unneeded exit function, David Gibson, 2018/03/18
- Re: [Qemu-ppc] [PULL 0/8] ppc-for-2.12 queue 20180319, Peter Maydell, 2018/03/19