Re: [PATCH 22/37] IB/rdmavt: Add queue pair data structure to rdmavt

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

 



On Thu, Dec 10, 2015 at 01:12:51PM -0600, Hefty, Sean wrote:
>> +struct rvt_rwqe {
>> +	u64 wr_id;
>> +	u8 num_sge;
>> +	struct ib_sge sg_list[0];
>> +};
>> +
>> +/*
>> + * This structure is used to contain the head pointer, tail pointer,
>> + * and receive work queue entries as a single memory allocation so
>> + * it can be mmap'ed into user space.
>> + * Note that the wq array elements are variable size so you can't
>> + * just index into the array to get the N'th element;
>> + * use get_rwqe_ptr() instead.
>
>Can you add/use an entry_size field?

I think we could work something like that, however what we have in
qib/hfi1
also works.  Any reason we really should change this?

I did not check to see what the drivers do. Using entry_size is straightforward, may provide the best performance, and can be done in common code, versus adding callbacks to all users.

Are you concerned that we have to do something different in each driver? If so, I do plan to move get_rwqe_ptr to rdmavt in a later patch. It won't be part of the drivers any more.

I kind of like what we have for get_rwqe_ptr, it illustrates how we are fishing out the pointer. I'll take another look at it though for the coming patch, it could save us from doing a bit of math on the fly.

-Denny
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux