Re: [PATCH v2 09/13] IB/cma: Add net_dev and private data checks to RDMA CM

Haggai Eran
2015-07-28T08:12:22Z

On 28/07/2015 02:07, Hefty, Sean wrote:
>> @@ -1040,6 +1040,181 @@ static int cma_save_net_info(struct sockaddr
>> *src_addr,
>> return cma_save_ip_info(src_addr, dst_addr, ib_event, service_id);
>> }
>>
>> +struct cma_req_info {
>> + struct ib_device *device;
>> + int port;
>> + const union ib_gid *local_gid;
>
> The use of a pointer to some gid inside some other structure looks questionable. There's no reference count held on another structure. We would be better off copying the GID or setting an index into the device GID table.
Okay, I'll copy the GID to the struct.

>
>> + __be64 service_id;
>> + u16 pkey;
>> +};
>
> Please relocate to the top of the source file to group it with other structure definitions.

Sure.

Thanks,
Haggai