nfp_net_rx_alloc_one(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ nfp_net_rx_alloc_one β€” Kernel API Manual ✨

okay so bestie, we're in the kernel API manual for nfp_net_rx_alloc_one(9) and honestly? it's giving "tiny function, big responsibilities" πŸ’…


🌸 NAME 🌸

nfp_net_rx_alloc_one β€” allocate and map a page frag for RX πŸŽ€

(like, it gets you a page frag and sorts out the DMA mapping, one-stop shop, no cap)


πŸ¦‹ SYNOPSIS πŸ¦‹

void * nfp_net_rx_alloc_one (struct nfp_net_dp *dp , dma_addr_t
       *dma_addr );

πŸ’– ARGUMENTS πŸ’–

  • dp β€” the NFP Net data path struct 🫢 (your whole data-path vibe lives in here)
  • dma_addr β€” pointer to storage for the DMA address. heads up: this is an output param, so the function writes the address back out through it πŸ“βœ¨

🧚 DESCRIPTION 🧚

so what does it actually do? it allocates a brand-new page frag and maps it for DMA. that's the whole personality. iconic, focused, no side quests 🌈


⭐ RETURN ⭐

returns the allocated page frag… or NULL on failure 😭 (so like, always vibe check your return value, fr fr)


πŸ‘‘ SEE ALSO πŸ‘‘

like the whole ring-buffer friend group πŸ’œ go read them too, iykyk


πŸ’€ reminder: NULL means it failed β€” don't just start DMA-ing into a vibes-only pointer, bestie πŸ™ˆ

and that's the page!! source/version lives at ./drivers/net/ethernet/netrono... and it's dated October 2026 πŸ—“οΈβœ¨ slay, go allocate responsibly πŸŽ€πŸ¦‹πŸ’…

πŸ“¦ where this page comes from