Re: [PATCH 07/11] IB/cma: Helper functions to access port space IDRs

Haggai Eran
2015-06-21T12:51:45Z

On 16/06/2015 01:36, Hefty, Sean wrote:
>> Add helper functions to access the IDRs by port-space and port number.
>>
>> Pass around the port-space enum in cma.c instead of using pointers to
>> port-space IDRs.
>
> What is the motivation for this change?

In the next patch ("IB/cma: Add net_dev and private data checks to RDMA
CM"), in cma_id_from_event(), I pass the port-space that is extracted
from the service ID to cma_ps_find(). Without this patch, I would need
to find the correct port-space IDR, effectively duplicating the code in
cma_select_inet_ps().

Regards,
Haggai