(SPAM?) Re: (SPAM?) [openib-general] [RFC] new ibv_get_devices() API -- avoid dlists

Sean Hefty mshefty at ichips.intel.com
Thu Nov 10 15:23:07 PST 2005


Roland Dreier wrote:
>  > Is ***list really what we want here?  Can we just get away with **list?
> 
> Yes -- a single device is represented by a struct ibv_device *.
> So an array of devices is represented by a struct ibv_device **.
> And a pointer to such an array is struct ibv_device ***.

I understand.  This is just API that I've seen that used '***'.  Why not just 
return a copy of the array?

>  > Would something like:
>  > 
>  > struct ibv_device * ibv_get_device(index);
>  > 
>  > work as well?
> 
> That could work as well.  But it doesn't handle hotplug quite as well.
> By returning a snapshot of all the known devices at a given moment, we
> at least have a chance at doing something sensible with devices
> appearing or disappearing.

This doesn't seem any worse to me.  The user can reference device_array[i] or 
call ibv_get_device(i).

I need to spend more time understanding how userspace hotplug will work.

- Sean



More information about the general mailing list