From patchwork Fri Aug 14 16:23:21 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Liguori X-Patchwork-Id: 31424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 5672AB70B0 for ; Sat, 15 Aug 2009 02:24:32 +1000 (EST) Received: from localhost ([127.0.0.1]:59433 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbzZr-0001oC-U9 for incoming@patchwork.ozlabs.org; Fri, 14 Aug 2009 12:24:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbzYw-0001HJ-R1 for qemu-devel@nongnu.org; Fri, 14 Aug 2009 12:23:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbzYr-0001Fb-V6 for qemu-devel@nongnu.org; Fri, 14 Aug 2009 12:23:30 -0400 Received: from [199.232.76.173] (port=59540 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbzYr-0001FV-Qz for qemu-devel@nongnu.org; Fri, 14 Aug 2009 12:23:25 -0400 Received: from e2.ny.us.ibm.com ([32.97.182.142]:49921) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MbzYr-0005lt-Ee for qemu-devel@nongnu.org; Fri, 14 Aug 2009 12:23:25 -0400 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e2.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id n7EGHU8d014092 for ; Fri, 14 Aug 2009 12:17:30 -0400 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n7EGNNun220264 for ; Fri, 14 Aug 2009 12:23:23 -0400 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n7EGNMER013270 for ; Fri, 14 Aug 2009 12:23:22 -0400 Received: from localhost.localdomain (sig-9-48-50-97.mts.ibm.com [9.48.50.97]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n7EGNMdk013228; Fri, 14 Aug 2009 12:23:22 -0400 From: Anthony Liguori To: qemu-devel@nongnu.org Date: Fri, 14 Aug 2009 11:23:21 -0500 Message-Id: <1250267001-4431-1-git-send-email-aliguori@us.ibm.com> X-Mailer: git-send-email 1.6.0.6 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Cc: Anthony Liguori Subject: [Qemu-devel] [PATCH 1/1] Make the e1000 the default network adapter for the pc target. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The ne2k is an ancient card that performs pretty terribly under QEMU. In many modern OSes, there is no longer drivers available for the ne2k. Switch the default network adapter to e1000. This card is more widely suppported and performs rather well under QEMU. There may be very old OSes that had a ne2k driver but not an e1000 driver but I think this is likely the exception. I think the average user is better served with an e1000 vs ne2k. Signed-off-by: Anthony Liguori --- hw/pc.c | 4 ++-- qemu-options.hx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 5664d1b..11b8618 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -1264,7 +1264,7 @@ static void pc_init1(ram_addr_t ram_size, continue; if (model == NULL) - model = "ne2k_pci"; + model = "e1000"; snprintf(nic_oprom, sizeof(nic_oprom), "pxe-%s.bin", model); oprom_area_size += load_option_rom(nic_oprom, 0xc0000 + oprom_area_size, @@ -1347,7 +1347,7 @@ static void pc_init1(ram_addr_t ram_size, if (!pci_enabled || (nd->model && strcmp(nd->model, "ne2k_isa") == 0)) pc_init_ne2k_isa(nd, isa_irq); else - pci_nic_init(nd, "ne2k_pci", NULL); + pci_nic_init(nd, "e1000", NULL); } piix4_acpi_system_hot_add_init(); diff --git a/qemu-options.hx b/qemu-options.hx index 03abb5c..e3bd314 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -828,7 +828,7 @@ DEF("net", HAS_ARG, QEMU_OPTION_net, STEXI @item -net nic[,vlan=@var{n}][,macaddr=@var{mac}][,model=@var{type}][,name=@var{name}][,addr=@var{addr}][,vectors=@var{v}] Create a new Network Interface Card and connect it to VLAN @var{n} (@var{n} -= 0 is the default). The NIC is an ne2k_pci by default on the PC += 0 is the default). The NIC is an e1000 by default on the PC target. Optionally, the MAC address can be changed to @var{mac}, the device address set to @var{addr} (PCI cards only), and a @var{name} can be assigned for use in monitor commands.