]> git.itanic.dy.fi Git - linux-stable/commitdiff
net: skb: move skb_pp_recycle() to skbuff.c
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 21 Oct 2022 02:58:22 +0000 (10:58 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Oct 2022 12:03:43 +0000 (13:03 +0100)
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>
include/linux/skbuff.h
net/core/skbuff.c

index 7be5bb4c94b6d8db1349cf1454e9dbcf5683d294..59c9fd55699d63ab966665db0d97ba0b58de7404 100644 (file)
@@ -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 */
index 1d9719e72f9d9ea6ca40979ff3ba95afec4f5b37..9b3b19816d2dedbcdb1358cf1b792e9452935852 100644 (file)
@@ -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;