Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: skb: move skb_pp_recycle() to skbuff.c

skb_pp_recycle() is only used by skb_free_head() in
skbuff.c, so move it to skbuff.c.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yunsheng Lin and committed by
David S. Miller
4727bab4 127b7218

+7 -7
-7
include/linux/skbuff.h
··· 5050 5050 } 5051 5051 #endif 5052 5052 5053 - static inline bool skb_pp_recycle(struct sk_buff *skb, void *data) 5054 - { 5055 - if (!IS_ENABLED(CONFIG_PAGE_POOL) || !skb->pp_recycle) 5056 - return false; 5057 - return page_pool_return_skb_page(virt_to_page(data)); 5058 - } 5059 - 5060 5053 #endif /* __KERNEL__ */ 5061 5054 #endif /* _LINUX_SKBUFF_H */
+7
net/core/skbuff.c
··· 748 748 skb_get(list); 749 749 } 750 750 751 + static bool skb_pp_recycle(struct sk_buff *skb, void *data) 752 + { 753 + if (!IS_ENABLED(CONFIG_PAGE_POOL) || !skb->pp_recycle) 754 + return false; 755 + return page_pool_return_skb_page(virt_to_page(data)); 756 + } 757 + 751 758 static void skb_free_head(struct sk_buff *skb) 752 759 { 753 760 unsigned char *head = skb->head;