bitkeeper revision 1.1159.223.47 (41f9109fKznqwLcV_lTngHAhBvwOZw)
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 27 Jan 2005 16:02:39 +0000 (16:02 +0000)
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>
Thu, 27 Jan 2005 16:02:39 +0000 (16:02 +0000)
Minor domU net-backend fixes.

linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c
tools/python/xen/xend/XendDomainInfo.py
tools/python/xen/xend/server/netif.py

index 61626a7b91673598cc0cab0d6dc222e21bebd0fa..ee53c8b1a6b486ef69211b1fdd5937a3cf89d0ab 100644 (file)
@@ -1295,8 +1295,7 @@ static int __init netif_init(void)
 {
     int err = 0;
 
-    if ( (xen_start_info.flags & SIF_INITDOMAIN) ||
-         (xen_start_info.flags & SIF_NET_BE_DOMAIN) )
+    if ( xen_start_info.flags & SIF_INITDOMAIN )
         return 0;
 
     IPRINTK("Initialising virtual ethernet driver.\n");
index 1a229a5599813fad3927a987daa3db8dc1e08df7..05647c83ab5379f0e5cacf8eb30cf8d333f37e75 100644 (file)
@@ -449,9 +449,9 @@ class XendDomainInfo:
 
             self.init_domain()
             self.configure_console()
+            self.configure_backends()
             self.construct_image()
             self.configure_restart()
-            self.configure_backends()
             deferred = self.configure()
             def cberr(err):
                 self.destroy()
index 9152c2abf4677067d9eb859b875d42da6b2346e9..d63c3424352628285637b7abcba15c4d8db3261b 100755 (executable)
@@ -140,7 +140,8 @@ class NetDev(controller.SplitDev):
         self.ipaddr = self._get_config_ipaddr(config) or []
         
         try:
-            self.backendDomain = int(sxp.child_value(config, 'backend', '0'))
+            xd = get_component('xen.xend.XendDomain')
+            self.backendDomain = int(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id)
         except:
             raise XendError('invalid backend domain')
 
@@ -161,7 +162,8 @@ class NetDev(controller.SplitDev):
         bridge = sxp.child_value(config, 'bridge')
         script = sxp.child_value(config, 'script')
         ipaddr = self._get_config_ipaddr(config)
-        backendDomain = sxp.child_value(config, 'backend', '0')
+        xd = get_component('xen.xend.XendDomain')
+        backendDomain = str(xd.domain_lookup(sxp.child_value(config, 'backend', '0')).id)
         if (mac is not None) and (mac != self.mac):
             raise XendError("cannot change mac")
         if (backendDomain is not None) and (backendDomain != str(self.backendDomain)):