Re: [PATCH net-next v6 5/6] page_pool: update document about frag API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux