page_pool_dma_sync_for_cpu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” the page_pool this page belongs to, iykyk πŸ‘‘
  • page β€” the page you're syncing, the main character fr
  • offset β€” 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