[PATCH 08/14] staging/rdma/hfi1: Start adding building blocks for TID caching
ira.weiny
ira.weiny at intel.com
Thu Dec 17 20:56:58 UTC 2015
On Thu, Dec 17, 2015 at 02:59:52PM +0300, Dan Carpenter wrote:
> On Thu, Dec 17, 2015 at 02:00:18AM -0500, ira.weiny at intel.com wrote:
> > +}
> > +
> > +static int program_rcvarray(struct file *fp, unsigned long vaddr,
> > + struct tid_group *grp,
> > + struct tid_pageset *sets,
> > + unsigned start, u16 count, struct page **pages,
> > + u32 *tidlist, unsigned *tididx, unsigned *pmapped)
> > +{
>
> It's not clear what a zero return from this function means. Could we
> add some documentation?
Added the following.
/**
* program_rcvarray() - program an RcvArray group with receive buffers
* @fp: file pointer
* @vaddr: starting user virtual address
* @grp: RcvArray group
* @sets: array of struct tid_pageset holding information on physically
* contiguous chunks from the user buffer
* @start: starting index into sets array
* @count: number of struct tid_pageset's to program
* @pages: an array of struct page * for the user buffer
* @tidlist: the array of u32 elements when the information about the
* programmed RcvArray entries is to be encoded.
* @tididx: starting offset into tidlist
* @pmapped: (output parameter) number of pages programmed into the RcvArray
* entries.
*
* This function will program up to 'count' number of RcvArray entries from the
* group 'grp'. To make best use of write-combining writes, the function will
* perform writes to the unused RcvArray entries which will be ignored by the
* HW. Each RcvArray entry will be programmed with a physically contiguous
* buffer chunk from the user's virtual buffer.
*
* Return:
* -EINVAL if the requested count is larger than the size of the group,
* -ENOMEM or -EFAULT on error from set_rcvarray_entry(), or
* number of RcvArray entries programmed.
*/
Ira
>
> regards,
> dan carpenter
>
More information about the devel
mailing list