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: SKB paged fragment lifecycle on receive

To: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: SKB paged fragment lifecycle on receive
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 24 Jun 2011 15:48:21 -0700
Cc: "netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>, Rusty Russell <rusty@xxxxxxxxxxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 24 Jun 2011 19:04:39 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1308955477.5807.8.camel@xxxxxxxxxxxxxxxxxxxx>
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>
References: <1308930202.32717.144.camel@xxxxxxxxxxxxxxxxxxxxxx> <4E04C961.9010302@xxxxxxxx> <1308955477.5807.8.camel@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Lightning/1.0b3pre Thunderbird/3.1.10
On 06/24/2011 03:44 PM, Ian Campbell wrote:
> One problem with this is that some functions (__pskb_pull_tail) drop the
> ref count and then remove the page from the skb's fraglist. So by the
> time the destructor is called you have lost the page and cannot do the
> refcount checking.
>
> I suppose we could keep a queue of _all_ pages we ever put in an SKB
> which we poll.

Right, that seems like the only way to make sure we don't lose anything.

>  We could still check for pages with count==1 in the
> destructor. Apart from the other issues with the destructor not being
> copied over clone etc which would cause us to fall-back to polling the
> queue more often than not I reckon.

Yeah, sounds like it.

>> That said, I think an event-based rather than polling based mechanism
>> would be much more preferable.
> Absolutely.

>From what Eric and David were saying, it seems we don't really have any
other workable options.

    J

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