Subject: Re: [PATCH 1/2] net: Allow skb_recycle_check to be done in stages

From: David Daney <[email-masked]>
Date: Thu, 13 Oct 2011 08:35:00 -0700

On 10/13/2011 07:33 AM, Andy Fleming wrote:
> skb_recycle_check resets the skb if it's eligible for recycling.
> However, there are times when a driver might want to optionally
> manipulate the skb data with the skb before resetting the skb,
> but after it has determined eligibility.  We do this by splitting the
> eligibility check from the skb reset, creating two inline functions to
> accomplish that task.
>
> Signed-off-by: Andy Fleming<[email-masked]>

Acked-by: David Daney <[email-masked]>

I need this for my (Octeon) Ethernet driver as well.  Currently we have 
an ad hoc driver local implementation of this, but I would like to use 
this core code if possible.

> ---
>
> I found this useful for a driver we're working on where the device can
> do different things, depending on whether the skb is recycleable.
>
>   include/linux/skbuff.h |   21 +++++++++++++++++++
>   net/core/skbuff.c      |   51 ++++++++++++++++++++++++-----------------------
>   2 files changed, 47 insertions(+), 25 deletions(-)
>

[...]