All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jody Belka <lists-xen@pimb.org>
To: xen-devel@lists.sourceforge.net
Cc: Mark Williamson <maw48@cl.cam.ac.uk>, Keir Fraser <kaf24@cl.cam.ac.uk>
Subject: Re: Multiple netif device channels
Date: Thu, 27 Jan 2005 01:51:22 +0100	[thread overview]
Message-ID: <20050127005122.GC2144@faith.gentoo.org> (raw)
In-Reply-To: <200501262036.34817.maw48@cl.cam.ac.uk>

[-- Attachment #1: Type: text/plain, Size: 2699 bytes --]

On Wed, Jan 26, 2005 at 08:36:34PM +0000, Mark Williamson wrote:
> > Ok, an update on the matter. The reason no interface appeared in the domU
> > netif backend was because xend wasn't actually configuring the domain as a
> > backend. The reason being that xend was setting the backend configuration
> > flags /after/ constructing the domain image [1], so nothing was happening.
> 
> Ah.  Do you have a patch for this we could apply?

Yep, patch attached. Also includes a change to make specifying the backend
domain more user friendly.


> > With that changed, a vif appears in the netif backend when the other domU
> > is started up. However, no actual network connection can be made between
> > the domains; ping just responds back with a destination host unreachable
> > error.
> 
> Have you tried the hack Andy suggested (giving the backend domain access to a 
> PCI device it has no drivers for) so that the backend domain will be 
> privileged?  If you don't elevate its privilege level some how it will 
> definitely not be able to function as a backend.

Yay. Tried that (pointed the backend domain to the unused onboard audio
controller :) and it worked perfectly.

One thing though; all backend interfaces have the same mac address,
FE:FF:FF:FF:FF:FF. I see that Keir committed this change, along with a note
about problems with bridging with the previous code.

If i modify the code such that i can specify an explicit backend vif mac
address to xend, and then that gets passed into the backend (with
fe:ff:ff:ff:ff:ff being sent if no explicit one is given), what would be the
best way to go about avoiding the problems mentioned when doing so?

In case you're wondering why i need this change, it's because i need some way
to distingush the vif's in the backend domain, so that i can configure them
easily with the linux hotplug system (since, obviously, xend is neither running
in the domain, nor can the dom0 instance configure the interface)


> > Seperately, although still connected to networking, the netfront driver has
> > code in it that prevents it from loading in a backend domain as well as the
> > initial domain. That should probably be reduced down to just checking for
> > the initial domain.
> 
> Yes, this can probably be safely removed now.  Does removing the backend check 
> work for you?

Seems to work fine. Tried it out after i finally got the inter-domU networking
working. No problems appeared with front only, back only or front-and-back
configurations. Patch attached for this as well.


> Thanks for working with us on this.

No probs. Had a good time working through the code to figure out what was going
on.



J

-- 
Jody Belka
knew (at) pimb (dot) org

[-- Attachment #2: tools.patch --]
[-- Type: text/plain, Size: 1845 bytes --]

diff -durN tools.orig/python/xen/xend/XendDomainInfo.py tools/python/xen/xend/XendDomainInfo.py
--- tools.orig/python/xen/xend/XendDomainInfo.py	2005-01-27 01:06:28.840379840 +0100
+++ tools/python/xen/xend/XendDomainInfo.py	2005-01-25 16:20:44.000000000 +0100
@@ -449,9 +449,9 @@
 
             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()
diff -durN tools.orig/python/xen/xend/server/netif.py tools/python/xen/xend/server/netif.py
--- tools.orig/python/xen/xend/server/netif.py	2005-01-25 10:09:39.000000000 +0100
+++ tools/python/xen/xend/server/netif.py	2005-01-27 01:19:29.043770896 +0100
@@ -140,7 +140,8 @@
         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 @@
         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)):

[-- Attachment #3: netfront.patch --]
[-- Type: text/plain, Size: 606 bytes --]

diff -durN linux-2.6.10-xen-sparse.orig/drivers/xen/netfront/netfront.c linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c
--- linux-2.6.10-xen-sparse.orig/drivers/xen/netfront/netfront.c	2005-01-27 01:02:55.724778336 +0100
+++ linux-2.6.10-xen-sparse/drivers/xen/netfront/netfront.c	2005-01-27 01:03:07.039058304 +0100
@@ -1295,8 +1295,7 @@
 {
     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");

  reply	other threads:[~2005-01-27  0:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19 19:57 Fw: Xen on /. again Trent Jaeger
2005-01-20 22:11 ` Jacob Gorm Hansen
2005-01-20 22:41   ` Mark Williamson
2005-01-20 23:30     ` Jacob Gorm Hansen
2005-01-21  0:14       ` Mark Williamson
2005-01-21  0:48     ` David Hopwood
2005-01-21  0:55       ` Mark Williamson
2005-01-21  1:32         ` David Hopwood
2005-01-21  1:38           ` Mark Williamson
2005-01-21  1:09       ` Reiner Sailer
2005-01-21  7:53       ` Steven Hand
2005-01-21  8:08         ` Steven Hand
2005-01-21  2:35     ` Jody Belka
2005-01-21 11:06       ` Mark A. Williamson
2005-01-21 11:22       ` Mark A. Williamson
2005-01-21 23:37         ` Jody Belka
2005-01-22 17:20           ` Mark Williamson
2005-01-22 18:16             ` Jody Belka
2005-01-23 17:52               ` Multiple netif device channels (was Fw: Xen on /. again) Mark Williamson
2005-01-25  0:32                 ` Jody Belka
2005-01-25 13:52                   ` Mark Williamson
2005-01-25 23:06                 ` Multiple netif device channels Jody Belka
2005-01-26 20:36                   ` Mark Williamson
2005-01-27  0:51                     ` Jody Belka [this message]
2005-01-27 14:00                       ` Jody Belka
2005-01-21  0:19   ` Fw: Xen on /. again Trent Jaeger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050127005122.GC2144@faith.gentoo.org \
    --to=lists-xen@pimb.org \
    --cc=kaf24@cl.cam.ac.uk \
    --cc=maw48@cl.cam.ac.uk \
    --cc=xen-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.