nfp_net_rx_alloc_one(9)
β¨ 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 π
- Kernel file
./drivers/net/ethernet/netronome/nfp/nfp_net_dp.cπ nfp_net_tx_ring_init(9)nfp_net_rx_ring_init(9)nfp_net_rx_ring_reset(9)nfp_net_rx_ring_bufs_free(9)nfp_net_rx_ring_bufs_alloc(9)nfp_net_rx_ring_free(9)nfp_net_rx_ring_alloc(9)
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
- 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