On Thu, Dec 19, 2019 at 7:52 AM Parav Pandit <parav@xxxxxxxxxxxx> wrote: > > On 12/18/2019 7:38 PM, Jason Gunthorpe wrote: > > On Sun, Dec 15, 2019 at 10:20:00PM -0800, Selvin Xavier wrote: > >> Provide an option to retrieve the driver gid context from ib_gid_attr > >> structure. Introduce ib_gid_attr_info structure which include both > >> gid_attr and the GID's HW context. Replace the attr and context > >> members of ib_gid_table_entry with the new ib_gid_attr_info > >> structure. Vendor drivers can refer to its own HW gid context > >> using the container_of macro. > > > > This seems really weird. Why are we adding a new struct instead of > > adding context to the normal gid_attr, or adding some > > 'get_ib_attr_priv' call? > > Rest of the stack didn't need to touch context, so it is added only as > vendor driver facing container_of(). Added the new structure since I didn't want to move the private structure ib_gid_table_entry to a header file. > > Instead I guess a new symbol as rdma_get_gid_attr_context() can be added > too. I am okay with both adding context to gid_attr struct or adding a symbol. Let me know your preference. Or shall i handle this inside bnxt_re itself. Not sure whether any other drivers intend to use this.