All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Lennert Buytenhek <buytenh@wantstofly.org>
Cc: netdev@vger.kernel.org, Ram.Natarajan@Emulex.Com,
	Eric Dumazet <dada1@cosmosbay.com>,
	Ashish Karkare <akarkare@marvell.com>,
	Nicolas Pitre <nico@cam.org>
Subject: Re: [PATCHv2 1/2] [NET] add skb_recycle_check() to enable netdriver skb recycling
Date: Mon, 29 Sep 2008 01:38:24 +0400	[thread overview]
Message-ID: <20080928213824.GA25298@2ka.mipt.ru> (raw)
In-Reply-To: <20080928204633.GB19070@xi.wantstofly.org>

Hi Lennert.

On Sun, Sep 28, 2008 at 10:46:33PM +0200, Lennert Buytenhek (buytenh@wantstofly.org) wrote:
> 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?

-- 
	Evgeniy Polyakov

  reply	other threads:[~2008-09-28 21:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-28 20:46 [PATCHv2 1/2] [NET] add skb_recycle_check() to enable netdriver skb recycling Lennert Buytenhek
2008-09-28 21:38 ` Evgeniy Polyakov [this message]
2008-09-28 21:50   ` Lennert Buytenhek
2008-09-29  5:39     ` Evgeniy Polyakov
2008-09-29  9:46       ` Lennert Buytenhek
2008-09-29 14:33         ` Evgeniy Polyakov
2008-09-30  3:08           ` Lennert Buytenhek
2008-10-02  7:17             ` Evgeniy Polyakov
2008-09-29 20:21         ` Brandeburg, Jesse
2008-09-30  2:57           ` Lennert Buytenhek
2008-10-08  1:24           ` Terry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080928213824.GA25298@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=Ram.Natarajan@Emulex.Com \
    --cc=akarkare@marvell.com \
    --cc=buytenh@wantstofly.org \
    --cc=dada1@cosmosbay.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@cam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.