Re: [PATCH net-next 09/12] page_pool: add a couple of netmem counterparts
From: Alexander Lobakin
Date: Mon Dec 16 2024 - 10:59:31 EST
From: Mina Almasry <almasrymina@xxxxxxxxxx>
Date: Fri, 13 Dec 2024 11:13:33 -0800
> On Wed, Dec 11, 2024 at 9:31 AM Alexander Lobakin
> <aleksander.lobakin@xxxxxxxxx> wrote:
>>
>> Add the following Page Pool netmem wrappers to be able to implement
>> an MP-agnostic driver:
>>
>
> Sorry, we raced a bit here. Jakub merged my "page_pool_alloc_netmem",
> which does similar to what this patch does.
>
>> * page_pool{,_dev}_alloc_best_fit_netmem()
>>
>> Same as page_pool{,_dev}_alloc(). Make the latter a wrapper around
>> the new helper (as a page is always a netmem, but not vice versa).
>> 'page_pool_alloc_netmem' is already busy, hence '_best_fit' (which
>> also says what the helper tries to do).
>>
>
> I freed the page_pool_alloc_netmem name by doing a rename, and now
> page_pool_alloc_netmem is the netmem counterpart to page_pool_alloc. I
> did not however add a page_pool_dev_alloc equivalent.
>
>> * page_pool_dma_sync_for_cpu_netmem()
>>
>> Same as page_pool_dma_sync_for_cpu(). Performs DMA sync only if
>> the netmem comes from the host.
>>
>
> My series also adds page_pool_dma_sync_netmem_for_cpu, which should be
> the same as your page_pool_dma_sync_for_cpu_netmem.
Yep, I saw your changes, rebasing soon.
Thanks,
Olek