[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080928215035.GG19070@xi.wantstofly.org>
Date: Sun, 28 Sep 2008 23:50:35 +0200
From: Lennert Buytenhek <buytenh@...tstofly.org>
To: Evgeniy Polyakov <johnpol@....mipt.ru>
Cc: netdev@...r.kernel.org, Ram.Natarajan@...lex.Com,
Eric Dumazet <dada1@...mosbay.com>,
Ashish Karkare <akarkare@...vell.com>,
Nicolas Pitre <nico@....org>
Subject: Re: [PATCHv2 1/2] [NET] add skb_recycle_check() to enable netdriver skb recycling
On Mon, Sep 29, 2008 at 01:38:24AM +0400, Evgeniy Polyakov wrote:
> Hi Lennert.
Hi,
> > This patch adds skb_recycle_check(), which can be used by a network
> > driver after transmitting an skb to check whether this skb can be
> > recycled as a receive buffer.
> >
> > skb_recycle_check() checks that the skb is not shared or cloned, and
> > that it is linear and its head portion large enough (as determined by
> > the driver) to be recycled as a receive buffer. If these conditions
> > are met, it does any necessary reference count dropping and cleans
> > up the skbuff as if it just came from __alloc_skb().
>
> Shouldn't it also perfrom all actions kfree_skb() does except actual
> freeing, since given skb can be from socket, so it may leak dst entries
> and break socket memory accounting?
Doesn't it? It calls skb_release_head_state() (new function), which
should do that.
cheers,
Lennert
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists