__netmem_to_page(9)
π
__netmem_to_page(9) β brought to you by the Kernel API Manual β¨
okay so bestie, this page is literally called __netmem_to_page(9), and it is giving βI know exactly what Iβm doing, so Iβm skipping the safety checkβ energy π
π₯ no cap.
πΈ NAME πΈ
__netmem_to_page β unsafely get pointer to the &page backing @netmem π«Ά
β¨ SYNOPSIS β¨
struct page * __netmem_to_page (netmem_ref netmem );
π ARGUMENTS π
netmemβ the netmem reference to convert, periodt π
π¦ DESCRIPTION π¦
Itβs the unsafe version of netmem_to_page ππ. When netmem is always page-backed β like, for example, when itβs a header buffer β this one performs faster and generates smaller object code (no check for the LSB, no WARN). Slay for speed β¨π
π¨ But when netmem points to IOV, it provokes undefined behaviour. Not a cute vibe. Not iconic. Do not do this unless you know exactly what youβre doing, bestie ππ
π RETURN π
pointer to the page (garbage if netmem is not page-backed) πβ¨
π SEE ALSO π
- Kernel file
./include/net/netmem.hβ plus these little icons:netmem_ref(9),virt_to_netmem(9),__netmem_to_nmdesc(9),__netmem_get_pp(9),__netmem_address(9),netmem_is_pfmemalloc(9)π§π
mwah π this whole thing comes from the ./include/net source tree, October 2026 edition, and itβs still out here repping __netmem_to_page(9) in the Kernel API Manual πβ¨π«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms