Commit 4727bab4 authored by Yunsheng Lin's avatar Yunsheng Lin Committed by David S. Miller
Browse files

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: default avatarYunsheng Lin <linyunsheng@huawei.com>
Acked-by: default avatarIlias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 127b7218
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -5050,12 +5050,5 @@ static inline void skb_mark_for_recycle(struct sk_buff *skb)
}
#endif

static inline bool skb_pp_recycle(struct sk_buff *skb, void *data)
{
	if (!IS_ENABLED(CONFIG_PAGE_POOL) || !skb->pp_recycle)
		return false;
	return page_pool_return_skb_page(virt_to_page(data));
}

#endif	/* __KERNEL__ */
#endif	/* _LINUX_SKBUFF_H */
+7 −0
Original line number Diff line number Diff line
@@ -748,6 +748,13 @@ static void skb_clone_fraglist(struct sk_buff *skb)
		skb_get(list);
}

static bool skb_pp_recycle(struct sk_buff *skb, void *data)
{
	if (!IS_ENABLED(CONFIG_PAGE_POOL) || !skb->pp_recycle)
		return false;
	return page_pool_return_skb_page(virt_to_page(data));
}

static void skb_free_head(struct sk_buff *skb)
{
	unsigned char *head = skb->head;