[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0cbf592e-2f21-30ca-799e-5cc15e89c3f8@huawei.com>
Date: Tue, 15 Aug 2023 20:24:59 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Randy Dunlap <rdunlap@...radead.org>, <davem@...emloft.net>,
<kuba@...nel.org>, <pabeni@...hat.com>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>, Lorenzo Bianconi
<lorenzo@...nel.org>, Alexander Duyck <alexander.duyck@...il.com>, Liang Chen
<liangchen.linux@...il.com>, Alexander Lobakin
<aleksander.lobakin@...el.com>, Jesper Dangaard Brouer <hawk@...nel.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>, Eric Dumazet
<edumazet@...gle.com>, Jonathan Corbet <corbet@....net>, Alexei Starovoitov
<ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, John Fastabend
<john.fastabend@...il.com>, <linux-doc@...r.kernel.org>,
<bpf@...r.kernel.org>
Subject: Re: [PATCH net-next v6 5/6] page_pool: update document about frag API
On 2023/8/15 6:42, Randy Dunlap wrote:
> Hi--
Thanks for the reviewing.
>
...
>> @@ -100,6 +115,14 @@ static inline struct page *page_pool_alloc_frag(struct page_pool *pool,
>> return __page_pool_alloc_frag(pool, offset, size, gfp);
>> }
>> +/**
>> + * page_pool_dev_alloc_frag() - allocate a page frag.
>> + * @pool[in] pool from which to allocate
>> + * @offset[out] offset to the allocated page
>> + * @size[in] requested size
>
> Please use kernel-doc syntax/notation here.
Will change to:
/**
* page_pool_dev_alloc_frag() - allocate a page frag.
* @pool: pool from which to allocate
* @offset: offset to the allocated page
* @size: requested size
*
* Get a page frag from the page allocator or page_pool caches.
*
* Return:
* Returns allocated page frag, otherwise return NULL.
*/
>
>> + *
>> + * Get a page frag from the page allocator or page_pool caches.
>> + */
>> static inline struct page *page_pool_dev_alloc_frag(struct page_pool *pool,
>> unsigned int *offset,
>> unsigned int size)
>> @@ -143,6 +166,14 @@ static inline struct page *page_pool_alloc(struct page_pool *pool,
>> return page;
>> }
>> +/**
>> + * page_pool_dev_alloc() - allocate a page or a page frag.
>> + * @pool[in]: pool from which to allocate
>> + * @offset[out]: offset to the allocated page
>> + * @size[in, out]: in as the requested size, out as the allocated size
>
> and here.
/**
* page_pool_dev_alloc() - allocate a page or a page frag.
* @pool: pool from which to allocate
* @offset: offset to the allocated page
* @size: in as the requested size, out as the allocated size
*
* Get a page or a page frag from the page allocator or page_pool caches.
*
* Return:
* Returns a page or a page frag, otherwise return NULL.
*/
>
>> + *
>> + * Get a page or a page frag from the page allocator or page_pool caches.
>> + */
>> static inline struct page *page_pool_dev_alloc(struct page_pool *pool,
>> unsigned int *offset,
>> unsigned int *size)
>> @@ -165,6 +196,13 @@ static inline void *page_pool_cache_alloc(struct page_pool *pool,
>> return page_address(page) + offset;
>> }
>> +/**
>> + * page_pool_dev_cache_alloc() - allocate a cache.
>> + * @pool[in]: pool from which to allocate
>> + * @size[in, out]: in as the requested size, out as the allocated size
>
> and here.
/**
* page_pool_dev_cache_alloc() - allocate a cache.
* @pool: pool from which to allocate
* @size: in as the requested size, out as the allocated size
*
* Get a cache from the page allocator or page_pool caches.
*
* Return:
* Returns the addr for the allocated cache, otherwise return NULL.
*/
>
>> + *
>> + * Get a cache from the page allocator or page_pool caches.
>> + */
>> static inline void *page_pool_dev_cache_alloc(struct page_pool *pool,
>> unsigned int *size)
>> {
>> @@ -316,6 +354,14 @@ static inline void page_pool_recycle_direct(struct page_pool *pool,
>> page_pool_put_full_page(pool, page, true);
>> }
>> +/**
>> + * page_pool_cache_free() - free a cache into the page_pool
>> + * @pool[in]: pool from which cache was allocated
>> + * @data[in]: cache to free
>> + * @allow_direct[in]: freed by the consumer, allow lockless caching
>
> and here.
/**
* page_pool_cache_free() - free a cache into the page_pool
* @pool: pool from which cache was allocated
* @data: addr of cache to be free
* @allow_direct: freed by the consumer, allow lockless caching
*
* Free a cache allocated from page_pool_dev_cache_alloc().
*/
>
>> + *
>> + * Free a cache allocated from page_pool_dev_cache_alloc().
>> + */
>> static inline void page_pool_cache_free(struct page_pool *pool, void *data,
>> bool allow_direct)
>> {
>
> Thanks.
Powered by blists - more mailing lists