[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] xen-netfront: delay gARP until backend switches to Connected



On 06/28/11 15:33, Ian Campbell wrote:

> netback already waits (or should...) for hotplug-status to fire with
> "connected" before moving to state XenbusStateConnected. See
> hotplug_status_changed in drivers/net/xen-netback/xenbus.c. You need
> either the netback in upstream or something newer than 43223efd9bfd (C
> Feb 2010) if you are using e.g. xen.git#xen/next-2.6.32. That commit
> fixes pretty much the issue you describe.
> 
> I expected that netfront waited for the backend to hit
> XenbusStateConnected before sending the grat ARP but instead I find it
> happens when the backend hits XenbusStateInitWait. I'm not sure if that
> is a problem -- it appears to have been done this way since forever
> (even back in the classic Xen kernels) and I've never noticed a gARP go
> missing in the way you describe, but perhaps something isn't quite
> matching up any more.

In addition to backporting 43223efd9bfd to the RHEL-5 host side, we needed the
following in the RHEL-6 guest, in order to fix the network outage after live
migration. The patch is for xen/next-2.6.32. I also tested a Fedora-15 guest
(without the patch), and the backport to the host side alone was not sufficient
there either.

Thanks for the help and for considering this one.

Signed-off-by: Laszlo Ersek <lersek@xxxxxxxxxx>
---
 drivers/net/xen-netfront.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c
index 3f71199..214c3a4 100644
--- a/drivers/net/xen-netfront.c
+++ b/drivers/net/xen-netfront.c
@@ -1732,7 +1732,6 @@ static void netback_changed(struct xenbus_device *dev,
        case XenbusStateInitialised:
        case XenbusStateReconfiguring:
        case XenbusStateReconfigured:
-       case XenbusStateConnected:
        case XenbusStateUnknown:
        case XenbusStateClosed:
                break;
@@ -1743,6 +1742,9 @@ static void netback_changed(struct xenbus_device *dev,
                if (xennet_connect(netdev) != 0)
                        break;
                xenbus_switch_state(dev, XenbusStateConnected);
+               break;
+
+       case XenbusStateConnected:
                netif_notify_peers(netdev);
                break;
 
-- 
1.7.4.4


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.