page_pool_put_netmem_bulk(9)
π page_pool_put_netmem_bulk β from the Kernel API Manual, bestie
okay so picture this: you're deep in the kernel, it's giving page_pool energy, and you've got a whole pile of netmem references that you need to let go of. that's this function. she's the "release references on multiple netmems" girlie, and yes she slays. β¨
πΈ SYNOPSIS πΈ
void page_pool_put_netmem_bulk (netmem_ref *data , u32 count );
that's it. two arguments, zero drama. π
π ARGUMENTS π
dataβ the array that's holding your netmem references. it's literally the whole lineup of netmems you're about to release, bestie. π¦countβ how many entries are actually indata. like, how many of the girls are showing up to the party. π₯
β¨ DESCRIPTION β¨
so what does she actually do? π
she tries to refill a number of netmems back into the ptr_ring cache, and she does it while holding the ptr_ring producer lock. get you a function that can multitask. π
but here's the plot twist: if the ptr_ring is full, page_pool_put_netmem_bulk will release the leftover netmems to the memory provider instead. so nobody gets left behind β they just get handed off somewhere else. iconic behavior honestly. π
she's built for a very specific vibe: page_pool_put_netmem_bulk is suitable to be run inside the driver NAPI tx completion loop for the XDP_REDIRECT use case. that's the main character energy right there. β
π¨ bestie pls read this β the caller must not use thedataarea after runningpage_pool_put_netmem_bulk, because this function overwrites it. like, it's gone. don't come back looking for it. π
π SEE ALSO π
- Kernel file
./net/core/page_pool.c page_pool_get_stats(9)page_pool_create_percpu(9)page_pool_create(9)page_pool_enable_direct_recycling(9)
the whole friend group, fr fr. π«Ά
and that's the page, babe π β brought to you straight out of ./net/core, dated October 2026, from the Kernel API Manual itself. go forth and release those netmems 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