Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1a203ea authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

net: add documentation for skb recycling



Commit 04a4bb55 ("net: add
skb_recycle_check() to enable netdriver skb recycling") added a
method for network drivers to recycle skbuffs, but while use of
this mechanism was documented in the commit message, it should
really have been added as a docbook comment as well -- this
patch does that.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 920da692
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -449,6 +449,18 @@ void kfree_skb(struct sk_buff *skb)
	__kfree_skb(skb);
	__kfree_skb(skb);
}
}


/**
 *	skb_recycle_check - check if skb can be reused for receive
 *	@skb: buffer
 *	@skb_size: minimum receive buffer size
 *
 *	Checks that the skb passed in is not shared or cloned, and
 *	that it is linear and its head portion at least as large as
 *	skb_size so that it can be recycled as a receive buffer.
 *	If these conditions are met, this function does any necessary
 *	reference count dropping and cleans up the skbuff as if it
 *	just came from __alloc_skb().
 */
int skb_recycle_check(struct sk_buff *skb, int skb_size)
int skb_recycle_check(struct sk_buff *skb, int skb_size)
{
{
	struct skb_shared_info *shinfo;
	struct skb_shared_info *shinfo;