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: Netfront problems

To: Murillo Bernardes <mfb@xxxxxxxxxx>
Subject: [Xen-devel] Re: Netfront problems
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Fri, 25 Nov 2005 14:56:58 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 25 Nov 2005 14:56:56 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200511251105.06652.mfb@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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200511251105.06652.mfb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Nov 25, 2005 at 11:05:06AM -0200, Murillo Bernardes wrote:

> Hi,
> 
> I'm trying to fix the following error on netfront, but no sucess until now.
>
> 1. Problem:
>  -  On netfront_closing we unregister the net device (calling close_netdev)
>  -  When the frontend directory on store is removed the netfront_remove() is 
> called, and we call netif_disconnect_backend(), but "&info->tx_lock", 
> "&info->rx_lock" , etc, are not valid anymore and we get an OOOPS.
> 
> 2. If I call netif_free() from netfront_closing() I get:
> "WARNING: g.e. still in use!
> WARNING: leaking g.e. and page still in use!
> WARNING: g.e. still in use!
> WARNING: leaking g.e. and page still in use!"
> 
> Because this pages (info->tx and info->rx) still in use by hypervisor/dom0.

Yes, I've been discussing this with Keir and Ian, following your bug report
and first patch.  It would be nice if we could tear down cleanly, even when
packets are in flight, but as you've found out, this is quite fiddly, as the
backend may hold outstanding references to transmitted packets.  The easiest
solution might be to simply refuse to close down unless the network interface
has been closed down in userspace, and then it should be much easier to close
down the driver, because there will be no packets being transmitted.  This
does not seem like an unreasonable restriction to me.

For the receive queue it will be necessary to drop packets in the queue, and
remove the grants on that queue so that no more packets are received.  This
may require more synchronisation between frontend and backend than we have
already, I'm not sure.

Basically, it's quite a complicated piece of work still.  Network hotplugging
has never worked before, and it seems that there is still plenty of work
needed on the driver before it can support it.  You are more than welcome to
work on it, but I think that you probably ought to speak to Keir, who
understands the driver better than I do, before plowing in.

Cheers,

Ewan.

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

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