page_pool_put_netmem_bulk(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 in data. 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 the data area after running page_pool_put_netmem_bulk, because this function overwrites it. like, it's gone. don't come back looking for it. 😭

πŸ‘€ SEE ALSO πŸ‘€

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