Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 4321

kernel-2.6.18-194.11.1.el5.src.rpm

From: Chris Lalancette <clalance@redhat.com>
Date: Mon, 8 Jun 2009 14:30:54 +0200
Subject: [xen] netback: change back to a flipping interface
Message-id: 4A2D047E.5070607@redhat.com
O-Subject: [RHEL5.4 PATCH]: Change back to a copying interface
Bugzilla: 479754
RH-Acked-by: Rik van Riel <riel@redhat.com>
RH-Acked-by: Don Dutile <ddutile@redhat.com>

All,
     The patch to fix BZ 479754 changed netback from advertising a flipping
interface to a copying interface for netfront by default.  Unfortunately, this
change broke save/restore across RHEL-5.3/RHEL-5.4.  That is, if you saved your
guest on a 5.3 dom0, upgraded to a 5.4 dom0, and then restored your guest, you
would no longer have networking inside the guest.  Since this would be one
common upgrade scenario for customers, this is a bad thing.
     After debugging the issue, I found that the bug actually lives in netfront.
 That is, when switching from a flipping to a copying interface on resume,
netfront passes a bunch of bogus grant frames to the hypervisor, which means
that all networking from then on fails (until the next guest reboot).  While we
could (and should) fix the bug in netfront, this doesn't help the already
deployed kernels out there (RHEL-5.3 and RHEL-4.8 guests).
     Because of that, the attached patch switches us back from a copying
interface to a flipping interface by default.  Luckily the important part of the
fix for BZ 479754 is still in place, so we shouldn't regress with that bugfix.
I've also opened up another BZ to track the fixing of netfront.  With this patch
in place, save/restore across RHEL-5.3 and 5.4 works happily.  This should
resolve BZ 503139.  Please review and ACK.

--
Chris Lalancette

diff --git a/drivers/xen/netback/xenbus.c b/drivers/xen/netback/xenbus.c
index 9026df0..d15ce95 100644
--- a/drivers/xen/netback/xenbus.c
+++ b/drivers/xen/netback/xenbus.c
@@ -93,22 +93,10 @@ static int netback_probe(struct xenbus_device *dev,
 			goto abort_transaction;
 		}
 
-		/* We support rx-copy path. */
 		err = xenbus_printf(xbt, dev->nodename,
 				    "feature-rx-copy", "%d", 1);
 		if (err) {
-			message = "writing feature-rx-copy";
-			goto abort_transaction;
-		}
-
-		/*
-		 * We don't support rx-flip path (except old guests who don't
-		 * grok this feature flag).
-		 */
-		err = xenbus_printf(xbt, dev->nodename,
-				    "feature-rx-flip", "%d", 0);
-		if (err) {
-			message = "writing feature-rx-flip";
+			message = "writing feature-copying";
 			goto abort_transaction;
 		}