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-devel

[Xen-devel] Re: Experience with netchannel2

To: Steven Smith <steven.smith@xxxxxxxxxx>
Subject: [Xen-devel] Re: Experience with netchannel2
From: Sergey Tovpeko <tsv.devel@xxxxxxxxx>
Date: Thu, 02 Jul 2009 18:41:48 +0400
Cc: Steven Smith <Steven.Smith@xxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 02 Jul 2009 07:48:03 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=GOTdOcY0IdDW7lex3eCJrPhDqzMxOzChBiSLkiKg1cs=; b=YZvHQF8XL9xziS5SNFhtSIrzOnpQxKi7MpUTUhcw+75fKFSYp0/+poQB+zQLY6qXdS FIJjgVxG5k0p3RhZP9YHOpVcwHVnFdKCJW7W2kNo53aT9JeXtXUIs/K/NgWSbQtpfRbH 20synwEDU9tCIccqOW54/PuyS4233d7MRgcRA=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=gNLS7wWsusar0gnZb5rB/rESaAaCS0tv0sERk3vfZXuIRYiQO3+NQHfHML01eHsA2s 01th1y10eaGiL+wdDviaM3iZEUM5Cam8zCcA0/X8zFjotxANdoOgduhUJoRp2m3tC+SG 3oTcj6B3wGHkOKqmgFXrS2FgAs5E7SCLnMiGY=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20090701160743.GA16252@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <eea274560906290439t638b73b8w77ff488760776e0e@xxxxxxxxxxxxxx> <20090630115331.GA8688@xxxxxxxxxxxxxxxxxxxxxxxxxx> <4A4B3438.10206@xxxxxxxxx> <20090701160743.GA16252@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)
Hello, Steven!
Moreover, the domU is starting without 'bridge' key with
vif2 =[ '' ]
but what i have, are
1. Virtual network interface is created in dom0 with name 'eth1', while
in old netchannel1,  virtual network intarface
has the name 'vifN.M'. It's very strange that i have 'eth1' instead of
'vifN.M'.
Is it?  It's easy enough to change the name of the interface, but I've
never really understood why it was desirable.
I'd like to distinguish somehow, that device named 'vif' is virtual network interface for domU,
at least for testing purposes.


Thank you very much for your efforts and fixes.
Please, consider some minor changes in gnttab_request_version
I added the return code to it., because HYPERVISOR_grant_table_op could return -EFAULT, -EINVAL additional to -ENOSYS.
I attached the file.

Sergey Tovpeko.
diff --git a/drivers/xen/core/gnttab.c b/drivers/xen/core/gnttab.c
index 5314932..5f27756 100644
--- a/drivers/xen/core/gnttab.c
+++ b/drivers/xen/core/gnttab.c
@@ -654,28 +654,31 @@ static inline unsigned int max_nr_grant_frames(void)
        return xen_max;
 }
 
-static void gnttab_request_version(void)
+static int gnttab_request_version(void)
 {
         int rc;
         struct gnttab_set_version gsv;
+       int version = 2;
 
-        gsv.version = 2;
+        gsv.version = version;
         rc = HYPERVISOR_grant_table_op(GNTTABOP_set_version, &gsv, 1);
         if (rc == 0) {
-                grant_table_version = 2;
-               printk("<0>Grant table version 2.\n");
+               grant_table_version = version;
+               printk("<0>Grant table version %d.\n", grant_table_version);
         } else {
-                if (grant_table_version == 2) {
+               if (rc == -ENOSYS && grant_table_version == 2) {
                         /* If we've already used version 2 features,
                            but then suddenly discover that they're not
                            available (e.g. migrating to an older
                            version of Xen), almost unbounded badness
                            can happen. */
                         panic("we need grant tables version 2, but only 
version 1 is available");
+                       grant_table_version = 1;
+                       printk("<0>Grant table version 1.\n");
+                       rc = 0;
                 }
-                grant_table_version = 1;
-               printk("<0>Grant table version 1.\n");
         }
+       return rc;
 }
 
 #ifdef CONFIG_XEN
@@ -1011,7 +1014,10 @@ EXPORT_SYMBOL(gnttab_post_map_adjust);
 
 int gnttab_resume(void)
 {
-    gnttab_request_version();
+       int rc;
+
+       if (rc = gnttab_request_version())
+               return rc;
        if (max_nr_grant_frames() < nr_grant_frames)
                return -ENOSYS;
        return gnttab_map(0, nr_grant_frames - 1);
@@ -1092,8 +1098,10 @@ int gnttab_resume(void)
 {
        unsigned int max_nr_gframes, nr_gframes;
        unsigned int max_nr_sframes, nr_sframes;
+       int rc;
 
-        gnttab_request_version();
+       if (rc = gnttab_request_version())
+               return rc;
 
        nr_gframes = nr_grant_frames;
        max_nr_gframes = max_nr_grant_frames();
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>