net: add documentation for skb recycling

Commit 04a4bb55bcf35b63d40fd2725e58599ff8310dd7 ("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: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Stephen Hemminger and committed by David S. Miller d1a203ea 920da692

+12
+12
net/core/skbuff.c
··· 449 449 __kfree_skb(skb); 450 450 } 451 451 452 + /** 453 + * skb_recycle_check - check if skb can be reused for receive 454 + * @skb: buffer 455 + * @skb_size: minimum receive buffer size 456 + * 457 + * Checks that the skb passed in is not shared or cloned, and 458 + * that it is linear and its head portion at least as large as 459 + * skb_size so that it can be recycled as a receive buffer. 460 + * If these conditions are met, this function does any necessary 461 + * reference count dropping and cleans up the skbuff as if it 462 + * just came from __alloc_skb(). 463 + */ 452 464 int skb_recycle_check(struct sk_buff *skb, int skb_size) 453 465 { 454 466 struct skb_shared_info *shinfo;