WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [PATCH] net: xen-netback: correctly restart Tx after a V

To: David Vrabel <david.vrabel@xxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] net: xen-netback: correctly restart Tx after a VM restore/migrate
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Fri, 30 Sep 2011 17:45:05 +0100
Cc: "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>
Delivery-date: Fri, 30 Sep 2011 09:46:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1317400671-21236-1-git-send-email-david.vrabel@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <1317400671-21236-1-git-send-email-david.vrabel@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Fri, 2011-09-30 at 17:37 +0100, David Vrabel wrote:
> 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().

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!

> Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Ian.

> ---
>  drivers/net/xen-netback/interface.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/xen-netback/interface.c 
> b/drivers/net/xen-netback/interface.c
> index 0ca86f9..1825629 100644
> --- a/drivers/net/xen-netback/interface.c
> +++ b/drivers/net/xen-netback/interface.c
> @@ -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;



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

<Prev in Thread] Current Thread [Next in Thread>