Message ID | 20221130220803.3657490-22-willy@infradead.org (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Split page pools from struct page | expand |
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));