WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Add a option for enabling ne2000 NIC device model

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Add a option for enabling ne2000 NIC device model
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Oct 2005 12:30:13 +0000
Delivery-date: Thu, 13 Oct 2005 12:28:00 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID c81c8a2821aa0cf8595e2372b9ea5d6bd1fb2b84
# Parent  d6e99066959acf9f25b5515a67a2d15a7946a510
Add a option for enabling ne2000 NIC device model

Signed-off-by: Yan Li <yanx.li@xxxxxxxxx>
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@xxxxxxxxx>
Signed-off-by: Edwin Zhai <edwin.zhai@xxxxxxxxx>

diff -r d6e99066959a -r c81c8a2821aa tools/examples/xmexample.vmx
--- a/tools/examples/xmexample.vmx      Wed Oct 12 16:01:38 2005
+++ b/tools/examples/xmexample.vmx      Wed Oct 12 16:04:11 2005
@@ -117,6 +117,11 @@
 #nographic=0
 
 
+#----------------------------------------------------------------------------
+# enable ne2000, default = 0(use pcnet)
+ne2000=0
+
+
 #-----------------------------------------------------------------------------
 #   enable audio support
 #enable-audio=1
diff -r d6e99066959a -r c81c8a2821aa tools/ioemu/hw/pc.c
--- a/tools/ioemu/hw/pc.c       Wed Oct 12 16:01:38 2005
+++ b/tools/ioemu/hw/pc.c       Wed Oct 12 16:04:11 2005
@@ -541,10 +541,10 @@
 
     if (pci_enabled) {
         for(i = 0; i < nb_nics; i++) {
-            if (nic_pcnet)
-                pci_pcnet_init(pci_bus, &nd_table[i]);
+            if (nic_ne2000)
+                pci_ne2000_init(pci_bus, &nd_table[i]);
             else
-                pci_ne2000_init(pci_bus, &nd_table[i]); 
+                pci_pcnet_init(pci_bus, &nd_table[i]); 
         }
         pci_piix3_ide_init(pci_bus, bs_table);
 #ifdef APIC_SUPPORT
diff -r d6e99066959a -r c81c8a2821aa tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Wed Oct 12 16:01:38 2005
+++ b/tools/ioemu/vl.c  Wed Oct 12 16:04:11 2005
@@ -125,7 +125,7 @@
 QEMUTimer *polling_timer;
 int vm_running;
 int audio_enabled = 0;
-int nic_pcnet = 1;
+int nic_ne2000 = 0;
 int vcpus = 1;
 int sb16_enabled = 1;
 int adlib_enabled = 1;
@@ -2130,7 +2130,7 @@
            "-prep           Simulate a PREP system (default is PowerMAC)\n"
            "-g WxH[xDEPTH]  Set the initial VGA graphic mode\n"
 #endif
-           "-nic-pcnet     simulate an AMD PC-Net PCI ethernet adaptor\n"
+           "-nic-ne2000     simulate an Realtek ne2k PCI ethernet adaptor\n"
            "\n"
            "Network options:\n"
            "-nics n         simulate 'n' network cards [default=1]\n"
@@ -2247,7 +2247,7 @@
     QEMU_OPTION_no_code_copy,
     QEMU_OPTION_vcpus,
     QEMU_OPTION_pci,
-    QEMU_OPTION_nic_pcnet,
+    QEMU_OPTION_nic_ne2000,
     QEMU_OPTION_isa,
     QEMU_OPTION_prep,
     QEMU_OPTION_k,
@@ -2334,7 +2334,7 @@
     
     /* temporary options */
     { "pci", 0, QEMU_OPTION_pci },
-    { "nic-pcnet", 0, QEMU_OPTION_nic_pcnet },
+    { "nic-ne2000", 0, QEMU_OPTION_nic_ne2000 },
     { "cirrusvga", 0, QEMU_OPTION_cirrusvga },
     { "vgaacc", HAS_ARG, QEMU_OPTION_vgaacc },
     { NULL },
@@ -2839,8 +2839,8 @@
             case QEMU_OPTION_pci:
                 pci_enabled = 1;
                 break;
-            case QEMU_OPTION_nic_pcnet:
-                nic_pcnet = 1;
+            case QEMU_OPTION_nic_ne2000:
+                nic_ne2000 = 1;
                 break;
             case QEMU_OPTION_isa:
                 pci_enabled = 0;
diff -r d6e99066959a -r c81c8a2821aa tools/ioemu/vl.h
--- a/tools/ioemu/vl.h  Wed Oct 12 16:01:38 2005
+++ b/tools/ioemu/vl.h  Wed Oct 12 16:04:11 2005
@@ -602,7 +602,7 @@
 
 /* pcnet.c */
 
-extern int nic_pcnet;
+extern int nic_ne2000;
 
 void pci_pcnet_init(PCIBus *bus, NetDriverState *nd);
 
diff -r d6e99066959a -r c81c8a2821aa tools/python/xen/xend/image.py
--- a/tools/python/xen/xend/image.py    Wed Oct 12 16:01:38 2005
+++ b/tools/python/xen/xend/image.py    Wed Oct 12 16:04:11 2005
@@ -257,7 +257,7 @@
     # Return a list of cmd line args to the device models based on the
     # xm config file
     def parseDeviceModelArgs(self, imageConfig, deviceConfig):
-        dmargs = [ 'cdrom', 'boot', 'fda', 'fdb',
+        dmargs = [ 'cdrom', 'boot', 'fda', 'fdb', 'ne2000', 
                    'localtime', 'serial', 'stdvga', 'isa', 'vcpus' ]
         ret = []
         for a in dmargs:
@@ -265,9 +265,10 @@
 
             # python doesn't allow '-' in variable names
             if a == 'stdvga': a = 'std-vga'
+            if a == 'ne2000': a = 'nic-ne2000'
 
             # Handle booleans gracefully
-            if a in ['localtime', 'std-vga', 'isa']:
+            if a in ['localtime', 'std-vga', 'isa', 'nic-ne2000']:
                 if v != None: v = int(v)
 
             log.debug("args: %s, val: %s" % (a,v))
diff -r d6e99066959a -r c81c8a2821aa tools/python/xen/xm/create.py
--- a/tools/python/xen/xm/create.py     Wed Oct 12 16:01:38 2005
+++ b/tools/python/xen/xm/create.py     Wed Oct 12 16:04:11 2005
@@ -363,6 +363,10 @@
 gopts.var('nographic', val='no|yes',
           fn=set_bool, default=0,
           use="Should device models use graphics?")
+
+gopts.var('ne2000', val='no|yes',
+          fn=set_bool, default=0,
+          use="Should device models use ne2000?")
 
 gopts.var('vnc', val='',
           fn=set_value, default=None,
@@ -540,7 +544,7 @@
     """
     args = [ 'memmap', 'device_model', 'vcpus', 'cdrom',
              'boot', 'fda', 'fdb', 'localtime', 'serial', 'macaddr', 'stdvga', 
-             'isa', 'nographic', 'vnc', 'vncviewer', 'sdl', 'display']
+             'isa', 'nographic', 'vnc', 'vncviewer', 'sdl', 'display', 
'ne2000']
     for a in args:
         if (vals.__dict__[a]):
             config_image.append([a, vals.__dict__[a]])

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Add a option for enabling ne2000 NIC device model, Xen patchbot -unstable <=