net: xen-netback: correctly restart Tx after a VM restore/migrate
Subsystems (3)
PATCH 1/1 net: xen-netback: correctly restart Tx after a VM restore/migrate
If a VM is saved and restored (or migrated) the netback driver will no longer process any Tx packets from the frontend. xenvif_up() does not schedule the processing of any pending Tx requests from the front end because the carrier is off. Without this initial kick the frontend just adds Tx requests to the ring without raising an event (until the ring is full).
This was caused by 47103041e91794acdbc6165da0ae288d844c820b (net:
xen-netback: convert to hw_features) which reordered the calls to xenvif_up() and netif_carrier_on() in xenvif_connect().
--- drivers/net/xen-netback/interface.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/xen-netback/interface.c +2 -2
@@ -327,12 +327,12 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,xenvif_get (vif);rtnl_lock (); -if (netif_running (vif->dev)) -xenvif_up (vif);if (!vif->can_sg && vif->dev->mtu >ETH_DATA_LEN )dev_set_mtu (vif->dev,ETH_DATA_LEN );netdev_update_features (vif->dev);netif_carrier_on (vif->dev); +if (netif_running (vif->dev)) +xenvif_up (vif);rtnl_unlock ();return 0 ;
Signature · 1 line
1.7.2.5
Quoted 10 lines · David Vrabel
If a VM is saved and restored (or migrated) the netback driver will no longer process any Tx packets from the frontend.
xenvif_up()does not schedule the processing of any pending Tx requests from the front end because the carrier is off. Without this initial kick the frontend just adds Tx requests to the ring without raising an event (until the ring is full).This was caused by
47103041e91794acdbc6165da0ae288d844c820b(net:
xen-netback: convert tohw_features) which reordered the calls toxenvif_up()andnetif_carrier_on()inxenvif_connect().
Ah, so the bit of that patch which moved "netif_carrier_on(vif->dev);" should have actually moved the entire block
netif_carrier_on(vif->dev); if (netif_running(vif->dev)) xenvif_up(vif);
Since it it is logically a single thing. Make sense. Thanks!
Quoted 1 line
Signed-off-by David Vrabel <[email protected]>
Ian.
Quoted 23 lines
--- drivers/net/xen-netback/interface.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)drivers/net/xen-netback/interface.c +2
-2@@ -327,12 +327,12 @@ int xenvif_connect(struct xenvif *vif, unsigned long tx_ring_ref,xenvif_get (vif);rtnl_lock (); -if (netif_running (vif->dev)) -xenvif_up (vif);if (!vif->can_sg && vif->dev->mtu >ETH_DATA_LEN )dev_set_mtu (vif->dev,ETH_DATA_LEN );netdev_update_features (vif->dev);netif_carrier_on (vif->dev); +if (netif_running (vif->dev)) +xenvif_up (vif);rtnl_unlock ();return 0 ;
From: Ian Campbell <[email protected]>
Date: Fri, 30 Sep 2011 17:45:05 +0100
Quoted 18 lines · David Vrabel
Quoted 10 lines
If a VM is saved and restored (or migrated) the netback driver will no longer process any Tx packets from the frontend.
xenvif_up()does not schedule the processing of any pending Tx requests from the front end because the carrier is off. Without this initial kick the frontend just adds Tx requests to the ring without raising an event (until the ring is full).This was caused by
47103041e91794acdbc6165da0ae288d844c820b(net:
xen-netback: convert tohw_features) which reordered the calls toxenvif_up()andnetif_carrier_on()inxenvif_connect().Ah, so the bit of that patch which moved "
netif_carrier_on(vif->dev);" should have actually moved the entire blocknetif_carrier_on(vif->dev); if (netif_running(vif->dev)) xenvif_up(vif);
Quoted 5 lines
Since it it is logically a single thing. Make sense. Thanks!
Quoted 1 line
Signed-off-by David Vrabel <[email protected]>Acked-by Ian Campbell <[email protected]>
Applied, thanks.