On 31/07/2023 23.11, Michael Chan wrote:
On Mon, Jul 31, 2023 at 1:44 PM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
tl;dr just set .max_len = PAGE_SIZE and all will be right.
OK I think I got it now. The page is only recycled when all the
fragments are recycled and so we can let page pool DMA sync the whole
page at that time.
Yes, Jakub is right, I see that now.
When using page_pool "frag" API (e.g. page_pool_dev_alloc_frag) then the
optimization I talked about isn't valid. We simply have to DMA sync the
entire page, when it gets back to the recycle stage.
--Jesper