page_pool_dma_sync_for_cpu(9)
π page_pool_dma_sync_for_cpu(9) π
okay bestie, so we're in the Kernel API Manual today and this one is a lil function that syncs up your Rx page for the CPU after the hardware has already written to it β¨ literally the handoff moment between HW and your driver, and it's giving "passing the aux cord" energy π
β¨ NAME β¨
page_pool_dma_sync_for_cpu β sync that Rx page for the CPU after HW is done writing it, no cap π«Ά
πΈ SYNOPSIS πΈ
void page_pool_dma_sync_for_cpu (const struct page_pool *pool , const
struct page *page , u32 offset , u32 dma_sync_size );
π¦ ARGUMENTS π¦
poolβ thepage_poolthis page belongs to, iykyk πpageβ the page you're syncing, the main character froffsetβ offset from the start of the page to the "hard" start, but only if you're using PP frags π§dma_sync_sizeβ how big the chunk of data written to the page actually is π
π₯ DESCRIPTION π₯
So this is basically the shorthand version you reach for when you wanna sync your Rx pages before you go touching them in the driver β like a lil vibe check for your memory before the driver starts reading πβ¨
The caller must make sure the pool was created with PP_FLAG_DMA_MAP. Not optional. Don't skip it. That's the rule bestie π
Also super important: this version performs the DMA sync unconditionally, even if the associated PP doesn't do sync-for-device. Yes, unconditionally. It does not check. It does not care. It just syncs π
β SEE ALSO β
Kernel file ./include/net/page_pool/helpers.h page_pool allocator(9), page_pool_dev_alloc_pages(9), page_pool_dev_alloc_frag(9), page_pool_dev_alloc(9), page_pool_dev_alloc_va(9), page_pool_get_dma_dir(9), page_pool_fragment_page(9), page_pool_put_page(9), page_pool_put_full_page(9), page_pool_recycle_direct(9), page_pool_free_va(9), page_pool_get_dma_addr(9), page_pool_is_unreadable(9)
and that's the whole page, bestie π«Ά go sync responsibly π
this iconic lil number lives in ./include/net/page_pool and it's dated October 2026 β see you in the future, mwah π
π
π¦ 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