[PATCH 21/24] netmem_to_virt

From
Matthew Wilcox (Oracle) <willy@infradead.org>
Date
2022-11-30 22:08:15
Also in
linux-mm
Reply to
Matthew Wilcox (Oracle), 2022-11-30
---
 include/net/page_pool.h | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/include/net/page_pool.h b/include/net/page_pool.h
index 222eedc39140..e13e3a8e83d3 100644
--- a/include/net/page_pool.h
+++ b/include/net/page_pool.h
@@ -112,6 +112,11 @@ static inline struct netmem *virt_to_netmem(const void *x)
 	return page_netmem(virt_to_head_page(x));
 }
 
+static inline void *netmem_to_virt(const struct netmem *nmem)
+{
+	return page_to_virt(netmem_page(nmem));
+}
+
 static inline int netmem_ref_count(const struct netmem *nmem)
 {
 	return page_ref_count(netmem_page(nmem));
-- 
2.35.1
Thread (36 messages) 36 messages, 4 authors, last reply 2022-12-08
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