[RFC 12/19] netmem: introduce page_pool_recycle_direct_netmem()

From
Byungchul Park <byungchul@sk.com>
Date
2025-05-09 11:51:44
Also in
linux-mm, lkml
Reply to
Byungchul Park, 2025-05-09
All the callers to page_pool_recycle_direct() need to be converted to
use netmem descriptor and API instead of struct page things.

As part of the work, introduce page_pool_recycle_direct_netmem()
allowing the callers to use netmem descriptor and API.

Signed-off-by: Byungchul Park <byungchul@sk.com>
---
 include/net/page_pool/helpers.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/include/net/page_pool/helpers.h b/include/net/page_pool/helpers.h
index 582a3d00cbe23..9b7a3a996bbea 100644
--- a/include/net/page_pool/helpers.h
+++ b/include/net/page_pool/helpers.h
@@ -395,6 +395,12 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
 	page_pool_put_full_page(pool, page, true);
 }
 
+static inline void page_pool_recycle_direct_netmem(struct page_pool *pool,
+						   netmem_ref netmem)
+{
+	page_pool_put_full_netmem(pool, netmem, true);
+}
+
 #define PAGE_POOL_32BIT_ARCH_WITH_64BIT_DMA	\
 		(sizeof(dma_addr_t) > sizeof(unsigned long))
 
-- 
2.17.1
Thread (53 messages) 53 messages, 6 authors, last reply 2025-05-14
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help