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] [xen-unstable] stubdom: drop lwip support

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] stubdom: drop lwip support
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 24 Apr 2009 09:10:11 -0700
Delivery-date: Fri, 24 Apr 2009 09:10:31 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1240485554 -3600
# Node ID 855e2f5ddb6702fddc4fb5afa15a323d8ef93c48
# Parent  4eef30c14a1437f5e2f636542c65d1cad13e80e6
stubdom: drop lwip support

Network support is still provided the same way: using the tap
interface, created in qemu using netfront.
The lwip stack is still available to avoid additional compilation
issues.
However the stubdom is not going to have its own vif anymore,
this means that the only vnc server supported is the one in dom0.
You can still enable the vnc server in a stubdom at compile time, if
you want so.

Probably the most important change caused by this patch to xen users
is that you don't have to specify two vif in the stubdom config file
anymore, but just one:

-vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
+vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34']

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 extras/mini-os/lib/sys.c  |   16 +++++++++-------
 extras/mini-os/main.c     |    2 +-
 extras/mini-os/netfront.c |   13 +++++++++----
 stubdom/README            |   16 ++--------------
 4 files changed, 21 insertions(+), 26 deletions(-)

diff -r 4eef30c14a14 -r 855e2f5ddb67 extras/mini-os/lib/sys.c
--- a/extras/mini-os/lib/sys.c  Thu Apr 23 10:11:33 2009 +0100
+++ b/extras/mini-os/lib/sys.c  Thu Apr 23 12:19:14 2009 +0100
@@ -677,7 +677,7 @@ static int select_poll(int nfds, fd_set 
 {
     int i, n = 0;
 #ifdef HAVE_LWIP
-    int sock_n, sock_nfds = 0;
+    int sock_n = 0, sock_nfds = 0;
     fd_set sock_readfds, sock_writefds, sock_exceptfds;
     struct timeval timeout = { .tv_sec = 0, .tv_usec = 0};
 #endif
@@ -711,12 +711,14 @@ static int select_poll(int nfds, fd_set 
            }
        }
     }
-    DEBUG("lwip_select(");
-    dump_set(nfds, &sock_readfds, &sock_writefds, &sock_exceptfds, &timeout);
-    DEBUG("); -> ");
-    sock_n = lwip_select(sock_nfds, &sock_readfds, &sock_writefds, 
&sock_exceptfds, &timeout);
-    dump_set(nfds, &sock_readfds, &sock_writefds, &sock_exceptfds, &timeout);
-    DEBUG("\n");
+    if (sock_nfds > 0) {
+        DEBUG("lwip_select(");
+        dump_set(nfds, &sock_readfds, &sock_writefds, &sock_exceptfds, 
&timeout);
+        DEBUG("); -> ");
+        sock_n = lwip_select(sock_nfds, &sock_readfds, &sock_writefds, 
&sock_exceptfds, &timeout);
+        dump_set(nfds, &sock_readfds, &sock_writefds, &sock_exceptfds, 
&timeout);
+        DEBUG("\n");
+    }
 #endif
 
     /* Then see others as well. */
diff -r 4eef30c14a14 -r 855e2f5ddb67 extras/mini-os/main.c
--- a/extras/mini-os/main.c     Thu Apr 23 10:11:33 2009 +0100
+++ b/extras/mini-os/main.c     Thu Apr 23 12:19:14 2009 +0100
@@ -62,7 +62,7 @@ static void call_main(void *p)
 
 #ifndef CONFIG_GRUB
     sparse((unsigned long) &__app_bss_start, &__app_bss_end - 
&__app_bss_start);
-#ifdef HAVE_LWIP
+#if defined(HAVE_LWIP) && !defined(CONFIG_QEMU)
     start_networking();
 #endif
     init_fs_frontend();
diff -r 4eef30c14a14 -r 855e2f5ddb67 extras/mini-os/netfront.c
--- a/extras/mini-os/netfront.c Thu Apr 23 10:11:33 2009 +0100
+++ b/extras/mini-os/netfront.c Thu Apr 23 12:19:14 2009 +0100
@@ -306,11 +306,16 @@ struct netfront_dev *init_netfront(char 
     int retry=0;
     int i;
     char* msg;
-    char* nodename = _nodename ? _nodename : "device/vif/0";
-
+    char nodename[256];
+    char path[256];
     struct netfront_dev *dev;
-
-    char path[strlen(nodename) + 1 + 10 + 1];
+    static int netfrontends = 0;
+
+    if (!_nodename)
+        snprintf(nodename, sizeof(nodename), "device/vif/%d", netfrontends);
+    else
+        strncpy(nodename, _nodename, strlen(nodename));
+    netfrontends++;
 
     if (!thenetif_rx)
        thenetif_rx = netif_rx;
diff -r 4eef30c14a14 -r 855e2f5ddb67 stubdom/README
--- a/stubdom/README    Thu Apr 23 10:11:33 2009 +0100
+++ b/stubdom/README    Thu Apr 23 12:19:14 2009 +0100
@@ -31,11 +31,10 @@ guest) with
 guest) with
 
 kernel = "/usr/lib/xen/boot/ioemu-stubdom.gz"
-vif = [ '', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
+vif = ['ip=10.0.1.1,mac=aa:00:00:12:23:34']
 disk = [  'file:/tmp/install.iso,hdc:cdrom,r', 'phy:/dev/sda6,hda,w', 
'file:/tmp/test,hdb,r' ]
 
 where
-- the first vif ('') is reserved for VNC (see below)
 - 'ip=10.0.1.1,mac= etc...' is the same net configuration as in the hvmconfig
 script,
 - and disk = is the same block configuration as in the hvmconfig script.
@@ -43,7 +42,7 @@ Display Configuration
 Display Configuration
 =====================
 
-There are three posibilities
+There are two possibilities
 
 * Using SDL
 
@@ -61,18 +60,6 @@ vfb = [ 'type=sdl' ]
 
 vfb = [ 'type=sdl, opengl=0' ]
 
-* Using a VNC server in the stub domain
-
-  - In hvmconfig, set vnclisten to "172.30.206.1" for instance.  Do not use a
-host name as Mini-OS does not have a name resolver.  Do not use 127.0.0.1 since
-then you will not be able to connect to it.
-
-vnc = 1
-vnclisten = "172.30.206.1"
-
-  - In hvmconfig-dm, fill the reserved vif with the same IP, for instance:
-
-vif = [ 'ip=172.30.206.1', 'ip=10.0.1.1,mac=aa:00:00:12:23:34']
 
 * Using a VNC server in dom0
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] stubdom: drop lwip support, Xen patchbot-unstable <=