__netmem_address(9)
π
__netmem_address(9) π
okay so welcome to the Kernel API Manual page for __netmem_address(9), bestie β this one is short but lowkey spicy because it's the unsafe shortcut. π«Ά
π·οΈ NAME π·οΈ
__netmem_address β unsafely get pointer to the memory backing @netmem. yes, the "unsafely" is doing a lot of work there π
π SYNOPSIS π
void * __netmem_address (netmem_ref netmem );
π§Ύ ARGUMENTS π§Ύ
netmemβ the netmem reference to get the pointer for. that's the whole argument, she's simple like that β¨
πΈ DESCRIPTION πΈ
okay so this is the unsafe version of netmem_address. When netmem is always page-backed β e.g. when it's a header buffer β it performs faster and generates smaller object code (no check for the LSB). efficiency slay π
careful bestie: when netmem points to IOV, this provokes undefined behaviour. not a vibe. not a slay. fr fr.
π RETURN π
pointer to the memory (garbage if netmem is not page-backed). so if it's not page-backed, you're literally getting garbage β do with that what you will π
π SEE ALSO π
Kernel file ./include/net/netmem.h:
netmem_ref(9)__netmem_to_page(9)virt_to_netmem(9)__netmem_to_nmdesc(9)__netmem_get_pp(9)netmem_is_pfmemalloc(9)
mwah π and that's the page! source/version: ./include/net; date: October 2026; entry: __netmem_address(9). go forth and be safe about your unsafe calls, bestie π«Ά
π¦ 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