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

[Xen-changelog] [linux-2.6.18-xen] From: Laszlo Ersek <lersek@xxxxxxxxxx>



# HG changeset patch
# User Laszlo Ersek <lersek@xxxxxxxxxx>
# Date 1325576422 -3600
# Node ID 90182138690d8055b09f3cc0495666590341b434
# Parent  bd6298cb67d3ab2f0cf849bb60afa2f5b8898e8d
From: Laszlo Ersek <lersek@xxxxxxxxxx>
Subject: netfront: delay gARP until backend switches to Connected
Patch-mainline: n/a

After a guest is live migrated, the xen-netfront driver emits a gratuitous
ARP message, so that networking hardware on the target host's subnet can
take notice, and public routing to the guest is re-established. However,
if the packet appears on the backend interface before the backend is added
to the target host's bridge, the packet is lost, and the migrated guest's
peers become unable to talk to the guest.

A sufficient two-parts condition to prevent the above is:

(1) ensure that the backend only moves to Connected xenbus state after its
hotplug scripts completed, ie. the netback interface got added to the
bridge; and

(2) ensure the frontend only queues the gARP when it sees the backend move
to Connected.

These two together provide complete ordering. Sub-condition (1) is already
satisfied by commit f942dc2552b8 in Linus' tree, based on commit
6b0b80ca7165 from [1].

In general, the full condition is sufficient, not necessary, because,
according to [2], live migration has been working for a long time without
satisfying sub-condition (2). However, after 6b0b80ca7165 was backported
to the RHEL-5 host to ensure (1), (2) still proved necessary in the RHEL-6
guest. This patch intends to provide (2) for upstream.

The Reviewed-by line comes from [3].

[1] 
git://xenbits.xen.org/people/ianc/linux-2.6.git#upstream/dom0/backend/netback-history
[2] http://old-list-archives.xen.org/xen-devel/2011-06/msg01969.html
[3] http://old-list-archives.xen.org/xen-devel/2011-07/msg00484.html

Signed-off-by: Laszlo Ersek <lersek@xxxxxxxxxx>
Reviewed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
---


diff -r bd6298cb67d3 -r 90182138690d drivers/xen/netfront/netfront.c
--- a/drivers/xen/netfront/netfront.c   Tue Jan 03 08:39:04 2012 +0100
+++ b/drivers/xen/netfront/netfront.c   Tue Jan 03 08:40:22 2012 +0100
@@ -541,7 +541,6 @@
        switch (backend_state) {
        case XenbusStateInitialising:
        case XenbusStateInitialised:
-       case XenbusStateConnected:
        case XenbusStateReconfiguring:
        case XenbusStateReconfigured:
        case XenbusStateUnknown:
@@ -554,6 +553,9 @@
                if (network_connect(netdev) != 0)
                        break;
                xenbus_switch_state(dev, XenbusStateConnected);
+               break;
+
+       case XenbusStateConnected:
                send_fake_arp(netdev);
                break;
 

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


 


Rackspace

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