__netmem_address(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __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:


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