Re: [PATCH for-next v2 1/2] IB/core: Add option to retrieve driver gid context from ib_gid_attr

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

 



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().

Instead I guess a new symbol as rdma_get_gid_attr_context() can be added
too.




[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