Re: [PATCH 04/37] IB/rdmavt: Add ib core device attributes to rvt driver params list

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

 



On Thu, Dec 10, 2015 at 02:29:18PM +0200, Haggai Eran wrote:
On 07/12/2015 22:43, Dennis Dalessandro wrote:
 struct rvt_dev_info {
+	/*
+	 * Prior to calling for registration the driver will be responsible for
+	 * allocating space for this structure. The driver will also need to
+	 * allocate space for any private device or per port data structures.
+	 * Alternatively rvt could do this allocation and the registration API
+	 * would then change to accept an "extra" piece to allocate.
I don't think you need rvt to allocate the private data, but even if you
decide to do that, there's no need for a comment that describes all the
alternative designs here.

Agree. This is another of those comments which was meant to provide an early look at the design (and alternatives) when I first posted to GitHub. The underlying issue here is who allocates the rvt_dev_info. The approach I went with was having the driver do the allocation. This also means there is no need for any "private" data in the rvt_dev_info structure. If drivers need some private struct they can just create a data structure and embed both rvt_dev_info and that private data. See struct qib_ibdev.

This comment needs updated/removed.


+	 *
+	 * The driver will also be
+	 * responsible for filling in certain members of dparms.props
+	 */

--
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
--
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