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>
This commit is contained in:
parent
127b7218bf
commit
4727bab4e9
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue