[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHS8izPuwiPk49yjWgBYYa+uGuQ4fNtXaRF8+9cWJsf3gk04Hg@mail.gmail.com>
Date: Thu, 7 Nov 2024 13:08:00 -0800
From: Mina Almasry <almasrymina@...gle.com>
To: Yunsheng Lin <yunshenglin0825@...il.com>
Cc: Yunsheng Lin <linyunsheng@...wei.com>, 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 Sun, Nov 3, 2024 at 6:35 AM Yunsheng Lin <yunshenglin0825@...il.com> wrote:
>
> On 11/1/2024 9:10 PM, Mina Almasry wrote:
>
> ...
>
> >>
> >> 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?
>
> I was mostly referring to the API naming pattern.
>
> Isn't it better if page_pool_alloc is mirrored by netmem_pool_alloc and
> netmem_pool_alloc_netmems is mirrored by page_pool_alloc_pages() from
> API naming prespective?
>
I've been treating the page_pool_* prefix to all the page_pool
functions as constant in all the renames so far. I replace 'page' with
'netmem' when available, or add a _netmem postfix when available.
> And maybe page_pool_alloc_frag can be mirrored by netmem_pool_alloc_frag
> in the future?
>
> Also, it would be good to update Documentation/networking/page_pool.rst
> for those new netmem APIs, or create a new doc file for them.
>
Heard. I do have an action item to update the docs. Currently, outside
of drivers immediately looking to immediately adopt devmem tcp, there
is no need yet to use the netmem APIs, but I do hope to make them more
widespread (and perhaps deprecate the page APIs when it's time to do
so).
--
Thanks,
Mina
Powered by blists - more mailing lists