virt_to_netmem(9)
π virt_to_netmem(9) π
okay so bestie, welcome to the Kernel API Manual π this page is virt_to_netmem(9), and itβs literally the glow-up from a virtual memory pointer to a netmem reference. itβs giving βpointer makeoverβ and weβre obsessed. no cap.
β¨ NAME β¨
virt_to_netmem β convert virtual memory pointer to a netmem reference. thatβs the whole vibe: pointer goes in, netmem reference comes out. slay.
π«Ά SYNOPSIS π«Ά
netmem_ref virt_to_netmem (const void *data );
π ARGUMENTS π
dataβ host memory pointer to convert. this is the main character argument, fr fr. hand over the host memory pointer and let the function do its thing.
πΈ RETURN πΈ
you get back a netmem reference to the page backing this virtual address. thatβs the return value, and yes itβs iconic.
π SEE ALSO π
also in the mix: the kernel file ./include/net/netmem.h, plus the whole squad:
netmem_ref(9)__netmem_to_page(9)__netmem_to_nmdesc(9)__netmem_get_pp(9)__netmem_address(9)netmem_is_pfmemalloc(9)
go off, iykyk π
xoxo, your kernel bestie π source/version: ./include/net β’ date: October 2026 β¨
π¦ 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