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

Re: [Xen-devel] Resetting network device / skb leak

To: Jacob Gorm Hansen <jacob@xxxxxxxx>
Subject: Re: [Xen-devel] Resetting network device / skb leak
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 22 Apr 2004 07:19:13 +0100
Cc: Xen list <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 22 Apr 2004 09:19:34 +0100
Envelope-to: steven.hand@xxxxxxxxxxxx
In-reply-to: Your message of "Wed, 21 Apr 2004 19:38:47 +0200." <1082569127.902.22.camel@paleface>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> hi,
> 
> I seem to have a problem with the Linux xen-network driver leaking skbs.
> This is probably my own fault, upon resumption after migration I call
> this:
> 
> void network_resume(void)
> {
>     struct net_device* dev = __dev_get_by_name("eth0");
>     MOD_DEC_USE_COUNT;
> 
>     network_open(dev);
> }
> 
> -- which works fine. However, in network_open() the call to
> NETOP_RESET_RINGS seems to clear all the pointers to the old skbs, and
> network_alloc_rx_buffers() allocs a bunch of new ones. It suppose that
> means I have just leaked a whole bunch of skbs. I know the standard
> suspend/resume code performs almost a full ifup/ifdown (which I cannot
> do in my case) but I don't see any skb-freeing code in that case either?
> 
> I have tried dev_kfree_skb()'ing the contents of the np->rx_skbs[1:]
> array before calling network_open, but doing so just crashes Linux :-(
> 
> Any ideas?
> 
> Jacob

The correct suspend behaviour is caused by executing dev->stop().

Why are you not able to run the existing ifdown/ifup code? It doesn't
execute notifier lists so shouldn't affect routing tables or anything
like that.

 -- Keir


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel

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