From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dennis Dalessandro Subject: Re: [PATCH 04/37] IB/rdmavt: Add ib core device attributes to rvt driver params list Date: Thu, 10 Dec 2015 08:35:48 -0500 Message-ID: <20151210133548.GC11526@phlsvsds.ph.intel.com> References: <20151207204046.8144.18752.stgit@phlsvslse11.ph.intel.com> <20151207204314.8144.46170.stgit@phlsvslse11.ph.intel.com> <5669701E.7090302@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Return-path: Content-Disposition: inline In-Reply-To: <5669701E.7090302-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Haggai Eran Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mike Marciniszyn , Ira Weiny List-Id: linux-rdma@vger.kernel.org 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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html