[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250103184030.5808-1-johndale@cisco.com>
Date: Fri, 3 Jan 2025 10:40:30 -0800
From: John Daley <johndale@...co.com>
To: kuba@...nel.org
Cc: andrew+netdev@...n.ch,
benve@...co.com,
davem@...emloft.net,
edumazet@...gle.com,
johndale@...co.com,
linyunsheng@...wei.com,
neescoba@...co.com,
netdev@...r.kernel.org,
pabeni@...hat.com,
satishkh@...co.com
Subject: Re: [PATCH net-next v3 4/6] enic: Use the Page Pool API for RX when MTU is less than page size
>On Tue, 31 Dec 2024 19:37:12 +0800 Yunsheng Lin wrote:
>> >> It seems the above has a similar problem of not using
>> >> page_pool_put_full_page() when page_pool_dev_alloc() API is used and
>> >> page_pool is created with PP_FLAG_DMA_SYNC_DEV flags.
>> >>
>> >> It seems like a common mistake that a WARN_ON might be needed to catch
>> >> this kind of problem.
>> >
>> > Agreed. Maybe also add an alias to page_pool_put_full_page() called
>> > something like page_pool_dev_put_page() to correspond to the alloc
>> > call? I suspect people don't understand the internals and "releasing
>> > full page" feels wrong when they only allocated a portion..
That is true in my case. I think if there was a page_pool_dev_put_page()
it would have caught my eye and I would have used it.
I made a v4 patchset uses page_pool_put_full_page().
>>
>> Yes, I guess so too.
>> But as all the alloc APIs have the 'dev' version of API:
>> page_pool_dev_alloc
>> page_pool_dev_alloc_frag
>> page_pool_dev_alloc_pages
>> page_pool_dev_alloc_va
>>
>> Only adding 'dev' does not seem to clear the confusion from API naming
>> perspective.
>
>page_pool_free_page()? We already have page_pool_free_va()
Powered by blists - more mailing lists