[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <31ae2905-2da4-af6d-493a-55429a39e8a5@huawei.com>
Date: Thu, 20 Jul 2023 20:08:54 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Jakub Kicinski <kuba@...nel.org>, <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<hawk@...nel.org>, <ilias.apalodimas@...aro.org>
Subject: Re: [PATCH net-next 3/4] net: page_pool: hide
page_pool_release_page()
On 2023/7/20 9:04, Jakub Kicinski wrote:
> Documentation/networking/page_pool.rst | 11 ++++-------
> include/net/page_pool.h | 10 ++--------
> net/core/page_pool.c | 3 +--
> 3 files changed, 7 insertions(+), 17 deletions(-)
>
> diff --git a/Documentation/networking/page_pool.rst b/Documentation/networking/page_pool.rst
> index 873efd97f822..0aa850cf4447 100644
> --- a/Documentation/networking/page_pool.rst
> +++ b/Documentation/networking/page_pool.rst
> @@ -13,9 +13,9 @@ replacing dev_alloc_pages().
>
> API keeps track of in-flight pages, in order to let API user know
> when it is safe to free a page_pool object. Thus, API users
> -must run page_pool_release_page() when a page is leaving the page_pool or
> -call page_pool_put_page() where appropriate in order to maintain correct
> -accounting.
> +must call page_pool_put_page() to free the page, or attach
> +the page to a page_pool-aware objects like skbs marked with
> +skb_mark_for_recycle().
>
> API user must call page_pool_put_page() once on a page, as it
> will either recycle the page, or in case of refcnt > 1, it will
...
> diff --git a/include/net/page_pool.h b/include/net/page_pool.h
> index 126f9e294389..f1d5cc1fa13b 100644
> --- a/include/net/page_pool.h
> +++ b/include/net/page_pool.h
> @@ -18,9 +18,8 @@
> *
> * API keeps track of in-flight pages, in-order to let API user know
> * when it is safe to dealloactor page_pool object. Thus, API users
> - * must make sure to call page_pool_release_page() when a page is
> - * "leaving" the page_pool. Or call page_pool_put_page() where
> - * appropiate. For maintaining correct accounting.
> + * must call page_pool_put_page() where appropriate and only attach
> + * the page to a page_pool-aware objects, like skbs marked for recycling.
> *
> * API user must only call page_pool_put_page() once on a page, as it
> * will either recycle the page, or in case of elevated refcnt, it
It seems the above comment is almost the same as the one in page_pool.rst,
Is there a reason not removing the above to remove the duplicatation?
Powered by blists - more mailing lists