[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHS8izMgF8nx87D9pWPmq1pfDm1v8x5Z6gc_eMHcYo8zKX-Lrw@mail.gmail.com>
Date: Fri, 1 Nov 2024 06:10:56 -0700
From: Mina Almasry <almasrymina@...gle.com>
To: Yunsheng Lin <linyunsheng@...wei.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>, Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>, Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH net-next v1 2/7] net: page_pool: create page_pool_alloc_netmem
On Fri, Nov 1, 2024 at 4:14 AM Yunsheng Lin <linyunsheng@...wei.com> wrote:
>
> On 2024/10/30 4:45, Mina Almasry wrote:
> > Create page_pool_alloc_netmem to be the mirror of page_pool_alloc.
> >
> > This enables drivers that want currently use page_pool_alloc to
> > transition to netmem by converting the call sites to
> > page_pool_alloc_netmem.
>
> For old API, page_pool_alloc_pages() always return a whole page, and
> page_pool_alloc() returns a whole page or a page fragment based on the
> requested size.
>
> For new netmem API, page_pool_alloc_netmems() always return a whole
> netmem, and page_pool_alloc_netmem() returns a whole netmem or a netmem
> fragment based on the requested size.
>
> Isn't it a little odd that old and new are not following the same
> pattern?
Hi Yunsheng,
The intention is that page_pool_alloc_pages is mirrored by
page_pool_alloc_netmems.
And page_pool_alloc is mirrored by page_pool_alloc_netmem.
>From your description, the behavior is the same for each function and
its mirror. What is the gap in the pattern that you see?
--
Thanks,
Mina
Powered by blists - more mailing lists