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
_______________________________________________
openib-general mailing list
openib-general@openib.org
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to