]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netmem: use netmem_desc instead of page to access ->pp in __netmem_get_pp()
authorByungchul Park <byungchul@sk.com>
Mon, 21 Jul 2025 02:18:25 +0000 (11:18 +0900)
committerJakub Kicinski <kuba@kernel.org>
Thu, 24 Jul 2025 00:46:54 +0000 (17:46 -0700)
commit38a436d4e26487e16ac6c1de17c030b1bef84d83
treee8edcacb49540ee1916aebb2e31910e329278b9d
parentf3d85c9ee51036ac7ed129ec16eef5df2192763e
netmem: use netmem_desc instead of page to access ->pp in __netmem_get_pp()

To eliminate the use of the page pool fields in struct page, the page
pool code should use netmem descriptor and APIs instead.

However, __netmem_get_pp() still accesses ->pp via struct page.  So
change it to use struct netmem_desc instead, since ->pp no longer will
be available in struct page.

While at it, add a helper, __netmem_to_nmdesc(), that can be used to
unsafely get pointer to netmem_desc backing the netmem_ref, only when
the netmem_ref is always backed by system memory.

Signed-off-by: Byungchul Park <byungchul@sk.com>
Link: https://patch.msgid.link/20250721021835.63939-3-byungchul@sk.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/netmem.h