[ofa-general] [PATCH RFC] rds: add iwarp support
Steve Wise
swise at opengridcomputing.com
Mon Jul 7 14:20:43 PDT 2008
Jon Mason wrote:
> On Mon, Jul 07, 2008 at 04:10:09PM -0500, Steve Wise wrote:
>
>> Sean Hefty wrote:
>>
>>>> Maybe there's a better way?
>>>>
>>>>
>>> I would look at using rdma_resolve_ip, or using rdma_resolve_addr as is.
>>>
>>> The rdma_cm_id ensures that there's a reference on the ib_device for the pointer
>>> that's returned. The proposed interface returns a pointer without any way to
>>> verify that it's still valid, or know when it is no longer usable.
>>>
>>>
>>>
>> The rds module already _has_ cm_id's bound to these devices. So they
>> won't "go away" without rds getting an event. The service in question
>> was just a quick way to map an ip address to its associated struct
>> ib_device. Perhaps this just needs to be a function inside the rds
>> module as opposed to something exported from the cma proper...
>>
>
> Unfortunately, this cannot be rds only. All the data structs are local
> to cma.c.
>
> The question is, if given only a u32 ipaddr, is there a way to turn this
> into a struct ib_device *?
>
> Thanks,
> Jon
>
>
Ah yes. The cma dev list is static. But ib_find_cached_gid() is
exported. If you only really ever need to do this on active connections,
then you could walk your list of connected cm_ids and get the struct
ib_device for each and call ib_find_cached_gid() to see if its a match.
Would that work? It would handle setting up new connections, but maybe
that is a different path?
steve.
More information about the general
mailing list