[ 77/82] xen-netfront: delay gARP until backend switches to Connected
From: Ben Hutchings
Date: Mon Mar 18 2013 - 00:47:00 EST
3.2-stable review patch. If anyone has any objections, please let me know.
From: Laszlo Ersek <lersek@xxxxxxxxxx>
commit 08e34eb14fe4cfd934b5c169a7682a969457c4ea upstream.
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
(2) ensure the frontend only queues the gARP when it sees the backend move
These two together provide complete ordering. Sub-condition (1) is already
satisfied by commit f942dc2552b8 in Linus' tree, based on commit
6b0b80ca7165 from .
In general, the full condition is sufficient, not necessary, because,
according to , 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 .
Signed-off-by: Laszlo Ersek <lersek@xxxxxxxxxx>
Reviewed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
drivers/net/xen-netfront.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
@@ -1707,7 +1707,6 @@ static void netback_changed(struct xenbu
- case XenbusStateConnected:
@@ -1718,6 +1717,9 @@ static void netback_changed(struct xenbu
if (xennet_connect(netdev) != 0)
+ case XenbusStateConnected:
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/