summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2021-08-06 10:46:19 +0800
committerJakub Kicinski <kuba@kernel.org>2021-08-09 15:49:00 -0700
commit57f05bc2ab2443b89c2e2562c05053bcc7d30e8b (patch)
treecaed6888bdd92daed5f868c8c01be6281be067e0 /include
parent2a2b6e3640c43a808dcb5226963e2cc0669294b1 (diff)
page_pool: keep pp info as long as page pool owns the page
Currently, page->pp is cleared and set everytime the page is recycled, which is unnecessary. So only set the page->pp when the page is added to the page pool and only clear it when the page is released from the page pool. This is also a preparation to support allocating frag page in page pool. Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/skbuff.h4
-rw-r--r--include/net/page_pool.h7
2 files changed, 1 insertions, 10 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 783cc2368bb1..6bdb0db3e825 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -4712,11 +4712,9 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb)
}
#ifdef CONFIG_PAGE_POOL
-static inline void skb_mark_for_recycle(struct sk_buff *skb, struct page *page,
- struct page_pool *pp)
+static inline void skb_mark_for_recycle(struct sk_buff *skb)
{
skb->pp_recycle = 1;
- page_pool_store_mem_info(page, pp);
}
#endif
diff --git a/include/net/page_pool.h b/include/net/page_pool.h
index 3dd62dd73027..8d7744d1c7c1 100644
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
@@ -253,11 +253,4 @@ static inline void page_pool_ring_unlock(struct page_pool *pool)
spin_unlock_bh(&pool->ring.producer_lock);
}
-/* Store mem_info on struct page and use it while recycling skb frags */
-static inline
-void page_pool_store_mem_info(struct page *page, struct page_pool *pp)
-{
- page->pp = pp;
-}
-
#endif /* _NET_PAGE_POOL_H */