net: add skb_recycle_check() to enable netdriver skb recycling
authorLennert Buytenhek <buytenh@marvell.com>
Wed, 1 Oct 2008 09:33:12 +0000 (02:33 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Oct 2008 09:33:12 +0000 (02:33 -0700)
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().

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found